Skip to content

Commit

Permalink
ADD example terraform.tfvars files
Browse files Browse the repository at this point in the history
  • Loading branch information
ramesh-maddegoda committed Nov 8, 2024
1 parent ea6d0db commit 8c99489
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 7 deletions.
78 changes: 73 additions & 5 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -157,31 +157,31 @@
"filename": "terraform/README.md",
"hashed_secret": "f2d4e04179e44fa7386b985ac3c7ee4d95dfd65d",
"is_verified": false,
"line_number": 97,
"line_number": 102,
"is_secret": false
},
{
"type": "AWS Sensitive Information (Experimental Plugin)",
"filename": "terraform/README.md",
"hashed_secret": "659a4d010b74afeddbcb9c4e8eae01f4390eeacc",
"is_verified": false,
"line_number": 98,
"line_number": 103,
"is_secret": false
},
{
"type": "AWS Sensitive Information (Experimental Plugin)",
"filename": "terraform/README.md",
"hashed_secret": "bd3b85b91cb8cf6cfc6a4adc7a2505714939505b",
"is_verified": false,
"line_number": 98,
"line_number": 103,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "terraform/README.md",
"hashed_secret": "a356cb3f3d1c9797cf59daf5b22fc0c7434d8dc7",
"is_verified": false,
"line_number": 101,
"line_number": 107,
"is_secret": false
}
],
Expand Down Expand Up @@ -330,7 +330,75 @@
"line_number": 11,
"is_secret": false
}
],
"terraform/variables/terraform.tfvars.dev": [
{
"type": "AWS Sensitive Information (Experimental Plugin)",
"filename": "terraform/variables/terraform.tfvars.dev",
"hashed_secret": "f2d4e04179e44fa7386b985ac3c7ee4d95dfd65d",
"is_verified": false,
"line_number": 3,
"is_secret": false
},
{
"type": "AWS Sensitive Information (Experimental Plugin)",
"filename": "terraform/variables/terraform.tfvars.dev",
"hashed_secret": "226201cd08f00a589068e569d01716d0ad488ae4",
"is_verified": false,
"line_number": 4,
"is_secret": false
},
{
"type": "AWS Sensitive Information (Experimental Plugin)",
"filename": "terraform/variables/terraform.tfvars.dev",
"hashed_secret": "4592cff3a9944664c9c182333782a5d551ec2516",
"is_verified": false,
"line_number": 4,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "terraform/variables/terraform.tfvars.dev",
"hashed_secret": "b293afb11f1f9b32461ab510aacb65a27ccb6111",
"is_verified": false,
"line_number": 9,
"is_secret": false
}
],
"terraform/variables/terraform.tfvars.test": [
{
"type": "AWS Sensitive Information (Experimental Plugin)",
"filename": "terraform/variables/terraform.tfvars.test",
"hashed_secret": "f2d4e04179e44fa7386b985ac3c7ee4d95dfd65d",
"is_verified": false,
"line_number": 3,
"is_secret": false
},
{
"type": "AWS Sensitive Information (Experimental Plugin)",
"filename": "terraform/variables/terraform.tfvars.test",
"hashed_secret": "226201cd08f00a589068e569d01716d0ad488ae4",
"is_verified": false,
"line_number": 4,
"is_secret": false
},
{
"type": "AWS Sensitive Information (Experimental Plugin)",
"filename": "terraform/variables/terraform.tfvars.test",
"hashed_secret": "4592cff3a9944664c9c182333782a5d551ec2516",
"is_verified": false,
"line_number": 4,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "terraform/variables/terraform.tfvars.test",
"hashed_secret": "b293afb11f1f9b32461ab510aacb65a27ccb6111",
"is_verified": false,
"line_number": 9,
"is_secret": false
}
]
},
"generated_at": "2024-11-08T04:44:39Z"
"generated_at": "2024-11-08T07:13:21Z"
}
6 changes: 4 additions & 2 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ cd nucleus/terraform

4. Create a `terraform.tfvars` file locally under `./terraform/terraform.tfvars` and enter the value for variables specified in `variables.tf` file at `nucleus/terraform/terraform-modules/mwaa-env/variables.tf`. Ensure these values match with your AWS Setup and also the variable value types (ex: string `" "`, number `1`, list(string)`[" "]`, etc). Most of the below values can be obtained by the system admin team of your AWS account.

Note: Examples of `terraform.tfvars` files are available at `terraform/variables` directory for your reference.

- env : Name of the Cloud environment to deploy PDS Nucleus (E.g: "mcp-dev", "mcp-test")
- region : AWS Region
- vpc_id : VPC ID of your AWS VPC
Expand All @@ -76,7 +78,7 @@ cd nucleus/terraform
- (PDS_ATM, PDS_ENG, PDS_GEO, PDS_IMG, PDS_NAIF, PDS_RMS, PDS_SBN, PSA, JAXA, ROSCOSMOS)
- Please check https://nasa-pds.github.io/registry/user/harvest_job_configuration.html for PDS Node name descriptions.
- pds_nucleus_opensearch_urls : List of Node specific OpenSearch URLs (E.g.: ["https://abcdef.us-west-2.aoss.amazonaws.com", "https://opqrst.us-west-2.aoss.amazonaws.com"])
- pds_nucleus_opensearch_credential_relative_url : Opensearch Credential URL (E.g.: "http://169.254.170.2/AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")
- pds_nucleus_opensearch_credential_relative_url : Opensearch Credential URL (E.g.: "http://<IP ADDRESS>/AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")
- pds_nucleus_harvest_replace_prefix_with_list : List of harvest replace with strings (E.g.: ["s3://pds-sbn-nucleus-staging","s3://pds-img-nucleus-staging"])
- pds_nucleus_harvest_replace_prefix_with : Prefix to replace in PDS Harvest tool
Expand Down Expand Up @@ -112,7 +114,7 @@ aws_secretmanager_key_arn = "arn:aws:kms:us-west-2:12345678:key/12345-12
pds_node_names = ["PDS_SBN", "PDS_IMG"]
pds_nucleus_opensearch_urls = ["https://abcdef.us-west-2.aoss.amazonaws.com", "https://opqrst.us-west-2.aoss.amazonaws.com"]
pds_nucleus_opensearch_credential_relative_url = "http://169.254.170.2/AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
pds_nucleus_opensearch_credential_relative_url = "http://<IP ADDRESS>/AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
pds_nucleus_harvest_replace_prefix_with_list = ["s3://pds-sbn-nucleus-staging", "s3://pds-img-nucleus-staging"]
Expand Down
30 changes: 30 additions & 0 deletions terraform/variables/terraform.tfvars.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
env = "mcp-dev"
region = "us-west-2"
vpc_id = "vpc-12345678"
subnet_ids = ["subnet-12345678", "subnet-87654321"]
auth_alb_subnet_ids = ["subnet-12345678", "subnet-87654321"]
vpc_cidr = "10.2.0.0/16"
permission_boundary_for_iam_roles = "name_of_permission_boundary_iam_role"
database_availability_zones = ["us-west-2a"]
aws_secretmanager_key_arn = "arn:aws:kms:us-west-2:12345678:key/abcdef-abcd-abcd-abcd-abcdef2527g"

# Set node specific values the following lists in correct order. For the list of node names
# the following node name format should be used.
# (PDS_ATM, PDS_ENG, PDS_GEO, PDS_IMG, PDS_NAIF, PDS_RMS, PDS_SBN, PSA, JAXA, ROSCOSMOS)

pds_node_names = ["PDS_SBN", "PDS_IMG"]
pds_nucleus_opensearch_urls = ["https://abcdef.us-west-2.aoss.amazonaws.com", "https://pqrst.us-west-2.aoss.amazonaws.com"]
pds_nucleus_opensearch_credential_relative_url = "http://<IP ADDRESS>/AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
pds_nucleus_harvest_replace_prefix_with_list = ["s3://pds-sbn-nucleus-staging", "s3://pds-img-nucleus-staging"]


airflow_env_name = "pds-nucleus-airflow-env"
mwaa_dag_s3_bucket_name = "pds-nucleus-airflow-dags-bucket-mcp-dev"
pds_nucleus_staging_bucket_name_postfix = "staging-mcp-dev"
pds_nucleus_hot_archive_bucket_name_postfix = "archive-hot-mcp-dev"
pds_nucleus_cold_archive_bucket_name_postfix = "archive-cold-mcp-dev"
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"
30 changes: 30 additions & 0 deletions terraform/variables/terraform.tfvars.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
env = "mcp-test"
region = "us-west-2"
vpc_id = "vpc-12345678"
subnet_ids = ["subnet-12345678", "subnet-87654321"]
auth_alb_subnet_ids = ["subnet-12345678", "subnet-87654321"]
vpc_cidr = "10.2.0.0/16"
permission_boundary_for_iam_roles = "name_of_permission_boundary_iam_role"
database_availability_zones = ["us-west-2a"]
aws_secretmanager_key_arn = "arn:aws:kms:us-west-2:12345678:key/abcdef-abcd-abcd-abcd-abcdef2527g"

# Set node specific values the following lists in correct order. For the list of node names
# the following node name format should be used.
# (PDS_ATM, PDS_ENG, PDS_GEO, PDS_IMG, PDS_NAIF, PDS_RMS, PDS_SBN, PSA, JAXA, ROSCOSMOS)

pds_node_names = ["PDS_SBN", "PDS_IMG"]
pds_nucleus_opensearch_urls = ["https://abcdef.us-west-2.aoss.amazonaws.com", "https://pqrst.us-west-2.aoss.amazonaws.com"]
pds_nucleus_opensearch_credential_relative_url = "http://<IP ADDRESS>/AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
pds_nucleus_harvest_replace_prefix_with_list = ["s3://pds-sbn-nucleus-staging", "s3://pds-img-nucleus-staging"]


airflow_env_name = "pds-nucleus-airflow-env"
mwaa_dag_s3_bucket_name = "pds-nucleus-airflow-dags-bucket-mcp-dev"
pds_nucleus_staging_bucket_name_postfix = "staging-mcp-dev"
pds_nucleus_hot_archive_bucket_name_postfix = "archive-hot-mcp-dev"
pds_nucleus_cold_archive_bucket_name_postfix = "archive-cold-mcp-dev"
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"

0 comments on commit 8c99489

Please sign in to comment.