Skip to content

Commit

Permalink
UPDATE README, examples of .tfvars files and minor code format changes.
Browse files Browse the repository at this point in the history
Refer to issue: #123
  • Loading branch information
ramesh-maddegoda committed Feb 4, 2025
1 parent bbbafdb commit 888c8aa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ system admin team of your AWS account)

6. PDS Registry (OpenSearch) is accessible from the AWS account which is used to deploy PDS Nucleus)

7. A Cognito User Pool to maintain the Nucleus users
7. A Cognito User Pool to manage Nucleus users

8. A certificate to be used for the ALB Listener facing Airflow UI

Expand Down Expand Up @@ -94,7 +94,7 @@ Note: Examples of `terraform.tfvars` files are available at `terraform/variable
- pds_nucleus_config_bucket_name : S3 Bucket name to keep temporary configurations (E.g.: pds-nucleus-config-mcp-test)
- pds_nucleus_default_airflow_dag_id : The default example DAG to be included for testing (E.g.: pds-basic-registry-load-use-case)
- pds_registry_loader_harvest_task_role_arn: An IAM role which is associated with a Cognito user group
- cognito_user_pool_id: The ID of the Cognito user pool which is sued to create Nuclues user accounts
- cognito_user_pool_id: The ID of the Cognito user pool which is used to create Nuclues user accounts
- cognito_user_pool_domain: Cognitp domain name of the Cognito user pool which is sued to create Nuclues user accounts
- auth_alb_listener_certificate_arn: ARN of the certificate to be used for the ALB Listener facing Airflow UI

Expand Down
7 changes: 0 additions & 7 deletions terraform/terraform-modules/cognito-auth/cognito-auth.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ data "aws_iam_policy_document" "alb_auth_lambda_execution_role_policy" {
}
}


resource "aws_iam_role" "pds_nucleus_alb_auth_lambda_execution_role" {
name = "pds_nucleus_alb_auth_lambda_execution_role"

Expand Down Expand Up @@ -114,7 +113,6 @@ resource "null_resource" "install_dependencies" {
}
}


data "archive_file" "pds_nucleus_auth_alb_function_zip_packages" {
type = "zip"
source_dir = "${path.module}/lambda/package"
Expand Down Expand Up @@ -149,8 +147,6 @@ resource "aws_cloudwatch_log_group" "pds_nucleus_product_processing_status_track
name = "/aws/lambda/pds_nucleus_auth_alb"
}



resource "aws_lambda_permission" "lambda_permissions_auth_alb" {
statement_id = "AllowExecutionFromlb"
action = "lambda:InvokeFunction"
Expand Down Expand Up @@ -222,7 +218,6 @@ resource "aws_lb_listener_rule" "aws_console_sso_rule" {
}
}


# Cognito user pool client
resource "aws_cognito_user_pool_client" "cognito_user_pool_client_for_mwaa" {
name = "pds-nucleus-airflow-ui-client"
Expand All @@ -235,7 +230,6 @@ resource "aws_cognito_user_pool_client" "cognito_user_pool_client_for_mwaa" {
supported_identity_providers = ["COGNITO"]
}


# Common assume role policy
data "aws_iam_policy_document" "pds_nucleus_airflow_assume_role" {
statement {
Expand All @@ -252,7 +246,6 @@ data "aws_iam_policy_document" "pds_nucleus_airflow_assume_role" {
}



# Airflow Admin Role

data "aws_iam_policy_document" "pds_nucleus_airflow_admin_policy" {
Expand Down
4 changes: 4 additions & 0 deletions terraform/variables/terraform.tfvars.dev
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ pds_nucleus_config_bucket_name = "pds-nucleus-config-mcp-dev"
pds_nucleus_default_airflow_dag_id = "pds-basic-registry-load-use-case"

pds_registry_loader_harvest_task_role_arn = "arn:aws:iam::12345678:role/pds-registry-loader-harvest-role"

cognito_user_pool_id = "us-west-2_ABCDEFG"
cognito_user_pool_domain = "pds-registry"
auth_alb_listener_certificate_arn = "arn:aws:acm:us-west-2:123456789:certificate/ca123456-abcd-abcd-1234-abcdefghi"
4 changes: 4 additions & 0 deletions terraform/variables/terraform.tfvars.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ pds_nucleus_config_bucket_name = "pds-nucleus-config-mcp-dev"
pds_nucleus_default_airflow_dag_id = "pds-basic-registry-load-use-case"

pds_registry_loader_harvest_task_role_arn = "arn:aws:iam::12345678:role/pds-registry-loader-harvest-role"

cognito_user_pool_id = "us-west-2_ABCDEFG"
cognito_user_pool_domain = "pds-registry"
auth_alb_listener_certificate_arn = "arn:aws:acm:us-west-2:123456789:certificate/ca123456-abcd-abcd-1234-abcdefghi"

0 comments on commit 888c8aa

Please sign in to comment.