Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cumulus 3642 connect db #3698

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CUMULUS-3642: modify scripts and tf vars to try and connect to restor…
…ed db
  • Loading branch information
charleshuang80 committed Jul 2, 2024
commit 36c53aa407d6e22fb6e15c212285e4af756566bb
3 changes: 2 additions & 1 deletion bamboo/bootstrap-tf-deployment.sh
Original file line number Diff line number Diff line change
@@ -96,7 +96,8 @@ echo "Deploying Cumulus example to $DEPLOYMENT"
-var "token_secret=$TOKEN_SECRET" \
-var "permissions_boundary_arn=arn:aws:iam::$AWS_ACCOUNT_ID:policy/$ROLE_BOUNDARY" \
-var "pdr_node_name_provider_bucket=$PDR_NODE_NAME_PROVIDER_BUCKET" \
-var "rds_admin_access_secret_arn=$RDS_ADMIN_ACCESS_SECRET_ARN" \
-var "rds_security_group=$OTHER_DB_RDS_SECURITY_GROUP"\
-var "rds_admin_access_secret_arn=$OTHER_DB_RDS_ADMIN_ACCESS_SECRET_ARN" \
-var "orca_db_user_password=$ORCA_DATABASE_USER_PASSWORD" \
-var "orca_s3_access_key=$AWS_ACCESS_KEY_ID" \
-var "orca_s3_secret_key=$AWS_SECRET_ACCESS_KEY" \
2 changes: 2 additions & 0 deletions bamboo/set-bamboo-env-variables.sh
Original file line number Diff line number Diff line change
@@ -146,6 +146,8 @@ if [[ $bamboo_NGAP_ENV = "SIT" ]]; then
export PDR_NODE_NAME_PROVIDER_BUCKET=$bamboo_SIT_PDR_NODE_NAME_PROVIDER_BUCKET
export ORCA_DATABASE_USER_PASSWORD=$bamboo_SECRET_SIT_ORCA_DATABASE_USER_PASSWORD
DEPLOYMENT=$bamboo_SIT_DEPLOYMENT
export OTHER_DB_RDS_SECURITY_GROUP=$bamboo_SECRET_SIT_OTHER_DB_RDS_SECURITY_GROUP
export OTHER_DB_RDS_ADMIN_ACCESS_SECRET_ARN=$bamboo_SECRET_SIT_OTHER_DB_RDS_ADMIN_ACCESS_SECRET_ARN
fi

## Run detect-pr script and set flag to true/false
4 changes: 2 additions & 2 deletions example/cumulus-tf/main.tf
Original file line number Diff line number Diff line change
@@ -38,8 +38,8 @@ locals {
elasticsearch_security_group_id = lookup(data.terraform_remote_state.data_persistence.outputs, "elasticsearch_security_group_id", "")
protected_bucket_names = [for k, v in var.buckets : v.name if v.type == "protected"]
public_bucket_names = [for k, v in var.buckets : v.name if v.type == "public"]
rds_security_group = lookup(data.terraform_remote_state.data_persistence.outputs, "rds_security_group", "")
rds_credentials_secret_arn = lookup(data.terraform_remote_state.data_persistence.outputs, "database_credentials_secret_arn", "")
rds_security_group = var.rds_security_group
rds_credentials_secret_arn = var.rds_admin_access_secret_arn

vpc_id = var.vpc_id != null ? var.vpc_id : data.aws_vpc.application_vpc[0].id
subnet_ids = length(var.lambda_subnet_ids) > 0 ? var.lambda_subnet_ids : data.aws_subnets.subnet_ids[0].ids
2 changes: 1 addition & 1 deletion example/data-persistence-tf/main.tf
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ module "provision_database" {
permissions_boundary_arn = var.permissions_boundary_arn
rds_user_password = var.rds_user_password == "" ? random_string.db_pass.result : var.rds_user_password
rds_connection_timing_configuration = var.rds_connection_timing_configuration
dbRecreation = true
dbRecreation = false
lambda_timeouts = var.lambda_timeouts
lambda_memory_sizes = var.lambda_memory_sizes
}