File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ data "aws_caller_identity" "current" {}
12data "aws_partition" "current" {}
23
34resource "random_uuid" "suffix" {}
@@ -30,6 +31,9 @@ module "ecs" {
3031 source = " ./modules/ecs"
3132 depends_on = [module . lb ] # Prevents race conditions
3233
34+ aws_account_id = data. aws_caller_identity . current . account_id
35+ aws_region = var. region
36+
3337 suffix = local. suffix
3438
3539 subnets = var. ecs_subnets
Original file line number Diff line number Diff line change @@ -2,6 +2,22 @@ locals {
22 webhooks_endpoint = " https://${ var . server_domain } /webhooks"
33 backend_image = " ${ var . backend_image } :${ var . backend_image_tag } "
44 shared_envs = [
5+ {
6+ name = " AWS_ACCOUNT_ID" ,
7+ value = var.aws_account_id
8+ },
9+ {
10+ name = " AWS_DEFAULT_REGION" ,
11+ value = var.aws_region
12+ },
13+ {
14+ name = " AWS_REGION" ,
15+ value = var.aws_region
16+ },
17+ {
18+ name = " ENVIRONMENT" ,
19+ value = " prod"
20+ },
521 {
622 name = " SERVER_DOMAIN"
723 value = var.server_domain
Original file line number Diff line number Diff line change 1+ variable "aws_account_id" {
2+ type = string
3+ description = " The AWS account the services are being run in."
4+ }
5+
6+ variable "aws_region" {
7+ type = string
8+ description = " The AWS region the services are being run in."
9+ }
10+
111variable "suffix" {
212 type = string
313}
You can’t perform that action at this time.
0 commit comments