Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 822dba4

Browse filesBrowse files
committed
works with other regions
1 parent 1b932eb commit 822dba4
Copy full SHA for 822dba4

File tree

Expand file treeCollapse file tree

8 files changed

+8
-11
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+8
-11
lines changed

‎base/README.md

Copy file name to clipboardExpand all lines: base/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ $ terraform apply
4141
| app | Name of the application. This value should usually match the application tag below. | string | | yes |
4242
| aws_profile | The AWS profile to use, this would be the same value used in AWS_PROFILE. | string | | yes |
4343
| image_tag_mutability | The tag mutability setting for the repository. | string | IMMUTABLE | |
44-
| region | The AWS region to use for the bucket and registry; typically `us-east-1`. Other possible values: `us-east-2`, `us-west-1`, or `us-west-2`. <br>Currently, Fargate is only available in `us-east-1`. | string | `us-east-1` | |
44+
| region | The AWS region to use for the bucket and registry. | string | `us-east-1` | |
4545
| saml_role | The role that will have access to the S3 bucket, this should be a role that all members of the team have access to. | string | | yes |
4646
| tags | A map of the tags to apply to various resources. The required tags are: <br>+ `application`, name of the app <br>+ `environment`, the environment being created <br>+ `team`, team responsible for the application <br>+ `contact-email`, contact email for the _team_ <br>+ `customer`, who the application was create for | map | `<map>` | yes |
4747

‎base/variables.tf

Copy file name to clipboardExpand all lines: base/variables.tf
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
* Common variables to use in various Terraform files (*.tf)
44
*/
55

6-
# The AWS region to use for the bucket and registry; typically `us-east-1`.
7-
# Other possible values: `us-east-2`, `us-west-1`, or `us-west-2`.
8-
# Currently, Fargate is only available in `us-east-1`.
6+
# The AWS region to use for the bucket and registry
97
variable "region" {
108
default = "us-east-1"
119
}

‎env/dev/README.md

Copy file name to clipboardExpand all lines: env/dev/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $ terraform apply
6666
| logz_url | The endpoint to use for sending logs to Logz.io | string | `https://listener.logz.io:8071` | no |
6767
| private_subnets | The private subnets, minimum of 2, that are a part of the VPC(s) | string | - | yes |
6868
| public_subnets | The public subnets, minimum of 2, that are a part of the VPC(s) | string | - | yes |
69-
| region | The AWS region to use for the dev environment's infrastructure Currently, Fargate is only available in `us-east-1`. | string | `us-east-1` | no |
69+
| region | The AWS region to use for the dev environment's infrastructure`. | string | `us-east-1` | no |
7070
| replicas | How many containers to run | string | `1` | no |
7171
| saml_role | The SAML role to use for adding users to the ECR policy | string | - | yes |
7272
| scale_down_cron | Default scale down at 7 pm every day | string | `cron(0 23 * * ? *)` | no |

‎env/dev/dashboard.tf

Copy file name to clipboardExpand all lines: env/dev/dashboard.tf
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ resource "aws_cloudwatch_dashboard" "cloudwatch_dashboard" {
3333
dashboard_name = "${var.app}-${var.environment}-fargate"
3434

3535
dashboard_body = <<EOF
36-
{"widgets":[{"type":"metric","x":12,"y":6,"width":12,"height":6,"properties":{"view":"timeSeries","stacked":false,"metrics":[["AWS/ECS","MemoryUtilization","ServiceName","${var.app}-${var.environment}","ClusterName","${var.app}-${var.environment}",{"color":"#1f77b4"}],[".","CPUUtilization",".",".",".",".",{"color":"#9467bd"}]],"region":"us-east-1","period":300,"title":"Memory and CPU utilization","yAxis":{"left":{"min":0,"max":100}}}},{"type":"metric","x":0,"y":6,"width":12,"height":6,"properties":{"view":"timeSeries","stacked":true,"metrics":[["AWS/ApplicationELB","HTTPCode_Target_5XX_Count","TargetGroup","${aws_alb_target_group.main.arn_suffix}","LoadBalancer","${aws_alb.main.arn_suffix}",{"period":60,"color":"#d62728","stat":"Sum"}],[".","HTTPCode_Target_4XX_Count",".",".",".",".",{"period":60,"stat":"Sum","color":"#bcbd22"}],[".","HTTPCode_Target_3XX_Count",".",".",".",".",{"period":60,"stat":"Sum","color":"#98df8a"}],[".","HTTPCode_Target_2XX_Count",".",".",".",".",{"period":60,"stat":"Sum","color":"#2ca02c"}]],"region":"us-east-1","title":"Container responses","period":300,"yAxis":{"left":{"min":0}}}},{"type":"metric","x":12,"y":0,"width":12,"height":6,"properties":{"view":"timeSeries","stacked":false,"metrics":[["AWS/ApplicationELB","TargetResponseTime","LoadBalancer","${aws_alb.main.arn_suffix}",{"period":60,"stat":"p50"}],["...",{"period":60,"stat":"p90","color":"#c5b0d5"}],["...",{"period":60,"stat":"p99","color":"#dbdb8d"}]],"region":"us-east-1","period":300,"yAxis":{"left":{"min":0,"max":3}},"title":"Container response times"}},{"type":"metric","x":12,"y":12,"width":12,"height":2,"properties":{"view":"singleValue","metrics":[["AWS/ApplicationELB","HealthyHostCount","TargetGroup","${aws_alb_target_group.main.arn_suffix}","LoadBalancer","${aws_alb.main.arn_suffix}",{"color":"#2ca02c","period":60}],[".","UnHealthyHostCount",".",".",".",".",{"color":"#d62728","period":60}]],"region":"us-east-1","period":300,"stacked":false}},{"type":"metric","x":0,"y":0,"width":12,"height":6,"properties":{"view":"timeSeries","stacked":true,"metrics":[["AWS/ApplicationELB","HTTPCode_Target_5XX_Count","LoadBalancer","${aws_alb.main.arn_suffix}",{"period":60,"stat":"Sum","color":"#d62728"}],[".","HTTPCode_Target_4XX_Count",".",".",{"period":60,"stat":"Sum","color":"#bcbd22"}],[".","HTTPCode_Target_3XX_Count",".",".",{"period":60,"stat":"Sum","color":"#98df8a"}],[".","HTTPCode_Target_2XX_Count",".",".",{"period":60,"stat":"Sum","color":"#2ca02c"}]],"region":"us-east-1","title":"Load balancer responses","period":300,"yAxis":{"left":{"min":0}}}}]}
36+
{"widgets":[{"type":"metric","x":12,"y":6,"width":12,"height":6,"properties":{"view":"timeSeries","stacked":false,"metrics":[["AWS/ECS","MemoryUtilization","ServiceName","${var.app}-${var.environment}","ClusterName","${var.app}-${var.environment}",{"color":"#1f77b4"}],[".","CPUUtilization",".",".",".",".",{"color":"#9467bd"}]],"region":"${var.region}","period":300,"title":"Memory and CPU utilization","yAxis":{"left":{"min":0,"max":100}}}},{"type":"metric","x":0,"y":6,"width":12,"height":6,"properties":{"view":"timeSeries","stacked":true,"metrics":[["AWS/ApplicationELB","HTTPCode_Target_5XX_Count","TargetGroup","${aws_alb_target_group.main.arn_suffix}","LoadBalancer","${aws_alb.main.arn_suffix}",{"period":60,"color":"#d62728","stat":"Sum"}],[".","HTTPCode_Target_4XX_Count",".",".",".",".",{"period":60,"stat":"Sum","color":"#bcbd22"}],[".","HTTPCode_Target_3XX_Count",".",".",".",".",{"period":60,"stat":"Sum","color":"#98df8a"}],[".","HTTPCode_Target_2XX_Count",".",".",".",".",{"period":60,"stat":"Sum","color":"#2ca02c"}]],"region":"${var.region}","title":"Container responses","period":300,"yAxis":{"left":{"min":0}}}},{"type":"metric","x":12,"y":0,"width":12,"height":6,"properties":{"view":"timeSeries","stacked":false,"metrics":[["AWS/ApplicationELB","TargetResponseTime","LoadBalancer","${aws_alb.main.arn_suffix}",{"period":60,"stat":"p50"}],["...",{"period":60,"stat":"p90","color":"#c5b0d5"}],["...",{"period":60,"stat":"p99","color":"#dbdb8d"}]],"region":"${var.region}","period":300,"yAxis":{"left":{"min":0,"max":3}},"title":"Container response times"}},{"type":"metric","x":12,"y":12,"width":12,"height":2,"properties":{"view":"singleValue","metrics":[["AWS/ApplicationELB","HealthyHostCount","TargetGroup","${aws_alb_target_group.main.arn_suffix}","LoadBalancer","${aws_alb.main.arn_suffix}",{"color":"#2ca02c","period":60}],[".","UnHealthyHostCount",".",".",".",".",{"color":"#d62728","period":60}]],"region":"${var.region}","period":300,"stacked":false}},{"type":"metric","x":0,"y":0,"width":12,"height":6,"properties":{"view":"timeSeries","stacked":true,"metrics":[["AWS/ApplicationELB","HTTPCode_Target_5XX_Count","LoadBalancer","${aws_alb.main.arn_suffix}",{"period":60,"stat":"Sum","color":"#d62728"}],[".","HTTPCode_Target_4XX_Count",".",".",{"period":60,"stat":"Sum","color":"#bcbd22"}],[".","HTTPCode_Target_3XX_Count",".",".",{"period":60,"stat":"Sum","color":"#98df8a"}],[".","HTTPCode_Target_2XX_Count",".",".",{"period":60,"stat":"Sum","color":"#2ca02c"}]],"region":"${var.region}","title":"Load balancer responses","period":300,"yAxis":{"left":{"min":0}}}}]}
3737
EOF
3838
}

‎env/dev/ecs-event-stream.tf

Copy file name to clipboardExpand all lines: env/dev/ecs-event-stream.tf
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ resource "aws_cloudwatch_dashboard" "ecs-event-stream" {
110110
"height": 18,
111111
"properties": {
112112
"query": "SOURCE '/aws/lambda/${var.app}-${var.environment}-ecs-event-stream' | fields @timestamp as time, detail.desiredStatus as desired, detail.lastStatus as latest, detail.stoppedReason as reason, detail.containers.0.reason as container_reason, detail.taskDefinitionArn as task_definition\n| filter @type != \"START\" and @type != \"END\" and @type != \"REPORT\"\n| sort detail.updatedAt desc, detail.version desc\n| limit 100",
113-
"region": "us-east-1",
113+
"region": "${var.region}",
114114
"title": "ECS Event Log"
115115
}
116116
}

‎env/dev/ecs.tf

Copy file name to clipboardExpand all lines: env/dev/ecs.tf
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ resource "aws_ecs_task_definition" "app" {
114114
"logDriver": "awslogs",
115115
"options": {
116116
"awslogs-group": "/fargate/service/${var.app}-${var.environment}",
117-
"awslogs-region": "us-east-1",
117+
"awslogs-region": "${var.region}",
118118
"awslogs-stream-prefix": "ecs"
119119
}
120120
}

‎env/dev/secrets-sidecar.tf

Copy file name to clipboardExpand all lines: env/dev/secrets-sidecar.tf
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ resource "aws_ecs_task_definition" "secrets_sidecar" {
100100
"logDriver": "awslogs",
101101
"options": {
102102
"awslogs-group": "${local.logs_group}",
103-
"awslogs-region": "us-east-1",
103+
"awslogs-region": "${var.region}",
104104
"awslogs-stream-prefix": "ecs"
105105
}
106106
}
@@ -130,7 +130,7 @@ resource "aws_ecs_task_definition" "secrets_sidecar" {
130130
"logDriver": "awslogs",
131131
"options": {
132132
"awslogs-group": "${local.logs_group}",
133-
"awslogs-region": "us-east-1",
133+
"awslogs-region": "${var.region}",
134134
"awslogs-stream-prefix": "ecs"
135135
}
136136
}

‎env/dev/variables.tf

Copy file name to clipboardExpand all lines: env/dev/variables.tf
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55

66
# The AWS region to use for the dev environment's infrastructure
7-
# Currently, Fargate is only available in `us-east-1`.
87
variable "region" {
98
default = "us-east-1"
109
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.