Skip to content

Commit

Permalink
Merge pull request #5207 from flexion/devex-rebuild-cognito
Browse files Browse the repository at this point in the history
Devex rebuild cognito
  • Loading branch information
jimlerza authored Aug 23, 2024
2 parents 3428f0c + 9e1fcf0 commit 1c704d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
16 changes: 5 additions & 11 deletions web-api/terraform/modules/dynamsoft/dynamsoft.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ resource "aws_instance" "dynamsoft" {
Name = "dynamsoft-${var.environment}"
environment = var.environment
}
user_data = data.template_file.setup_dynamsoft.rendered
user_data_replace_on_change = true

iam_instance_profile = "dynamsoft_s3_download_role"
}

data "template_file" "setup_dynamsoft" {
template = file("${path.module}/setup_dynamsoft.sh")

vars = {
user_data = templatefile("${path.module}/setup_dynamsoft.sh", {
dynamsoft_s3_zip_path = var.dynamsoft_s3_zip_path
dynamsoft_url = var.dynamsoft_url
dynamsoft_product_keys = var.dynamsoft_product_keys
}
})
user_data_replace_on_change = true

iam_instance_profile = "dynamsoft_s3_download_role"
}

resource "aws_security_group" "dynamsoft_load_balancer_security_group" {
Expand Down
11 changes: 2 additions & 9 deletions web-api/terraform/modules/everything-else-deprecated/cognito.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ resource "aws_cognito_user_pool_client" "client" {
explicit_auth_flows = ["ADMIN_NO_SRP_AUTH", "USER_PASSWORD_AUTH"]

generate_secret = false
allowed_oauth_flows_user_pool_client = true
allowed_oauth_flows_user_pool_client = false

token_validity_units {
access_token = "hours"
Expand All @@ -173,9 +173,6 @@ resource "aws_cognito_user_pool_client" "client" {
access_token_validity = 1
id_token_validity = 1

allowed_oauth_flows = ["code", "implicit"]
allowed_oauth_scopes = ["email", "openid", "profile", "phone", "aws.cognito.signin.user.admin"]
supported_identity_providers = ["COGNITO"]

user_pool_id = aws_cognito_user_pool.pool.id

Expand Down Expand Up @@ -336,7 +333,7 @@ resource "aws_cognito_user_pool_client" "irs_client" {
explicit_auth_flows = ["ADMIN_NO_SRP_AUTH", "USER_PASSWORD_AUTH"]

generate_secret = false
allowed_oauth_flows_user_pool_client = true
allowed_oauth_flows_user_pool_client = false
token_validity_units {
access_token = "hours"
id_token = "hours"
Expand All @@ -346,10 +343,6 @@ resource "aws_cognito_user_pool_client" "irs_client" {
access_token_validity = 1
id_token_validity = 1

allowed_oauth_flows = ["code", "implicit"]
allowed_oauth_scopes = ["email", "openid", "profile", "phone", "aws.cognito.signin.user.admin"]
supported_identity_providers = ["COGNITO"]

user_pool_id = aws_cognito_user_pool.irs_pool.id

write_attributes = [
Expand Down

0 comments on commit 1c704d4

Please sign in to comment.