Skip to content

Commit

Permalink
Chaps Add dev env vars (#4549)
Browse files Browse the repository at this point in the history
  • Loading branch information
vertism authored Jan 16, 2024
1 parent abb64d2 commit fb47e92
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
9 changes: 6 additions & 3 deletions terraform/environments/cdpt-chaps/application_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"ami_image_id": "ami-06cdd5b44c17085ed",
"instance_type": "t3.medium",
"container_port": 80,
"s3_bucket_name": "chaps-dev-bucket"
"s3_bucket_name": "chaps-dev-bucket",
"client_id": "aa335a21-40a9-45a0-b0ef-16d65584b024"
},
"preproduction": {
"db_enabled": true,
Expand All @@ -42,7 +43,8 @@
"ami_image_id": "ami-06cdd5b44c17085ed",
"instance_type": "t3.medium",
"container_port": 80,
"s3_bucket_name": "chaps-staging-bucket"
"s3_bucket_name": "chaps-staging-bucket",
"client_id": ""
},
"production": {
"db_enabled": true,
Expand All @@ -64,7 +66,8 @@
"ami_image_id": "ami-06cdd5b44c17085ed",
"instance_type": "t3.medium",
"container_port": 80,
"s3_bucket_name": "chaps-production-bucket"
"s3_bucket_name": "chaps-production-bucket",
"client_id": ""
}
}
}
22 changes: 21 additions & 1 deletion terraform/environments/cdpt-chaps/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,26 @@ resource "aws_ecs_task_definition" "chaps_task_definition" {
}
}
environment = [
{
name = "RDS_HOSTNAME"
value = "${aws_db_instance.database.address}"
},
{
name = "RDS_USERNAME"
value = "${aws_db_instance.database.username}"
},
{
name = "RDS_PASSWORD"
value = "${aws_db_instance.database.password}"
},
{
name = "DB_NAME"
value = "${local.application_data.accounts[local.environment].db_name}"
},
{
name = "CLIENT_ID"
value = "${local.application_data.accounts[local.environment].client_id}"
}
]
}
])
Expand Down Expand Up @@ -227,7 +247,7 @@ resource "aws_security_group" "cluster_ec2" {
from_port = 1433
to_port = 1433
protocol = "tcp"
security_groups = [aws_security_group.db.id]
security_groups = [aws_security_group.db.id]
}

egress {
Expand Down

0 comments on commit fb47e92

Please sign in to comment.