File tree Expand file tree Collapse file tree 5 files changed +39
-7
lines changed
Expand file tree Collapse file tree 5 files changed +39
-7
lines changed Original file line number Diff line number Diff line change 1+ name : Linters and formatters
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+ pull_request :
8+ branches :
9+ - ' **'
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Terraform linter
19+ run : |
20+ terraform version
21+ results=$(find . -type f -name "*.tf" ! -path "*/.terraform/*" -exec terraform fmt -check {} \;)
22+ if [ -n "$results" ]; then
23+ echo "Terraform files must be formatted with 'terraform fmt'. Please run 'terraform fmt' and commit the changes."
24+ echo "$results"
25+ exit 1
26+ fi
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ module "cluster" {
1414
1515module "grafana" {
1616 source = " ./modules/grafana"
17- repository_name = " postgres-grafana-on-ecs-grafana-repo"
17+ repository_name = " postgres-grafana-on-ecs-grafana-repo"
1818 cluster_id = module. cluster . cluster_id
1919 vpc_id = module. vpc . vpc_id
2020 vpc_public_subnets = module. vpc . public_subnets
@@ -27,7 +27,7 @@ module "grafana" {
2727
2828module "postgres" {
2929 source = " ./modules/postgres"
30- repository_name = " postgres-grafana-on-ecs-postgres-repo"
30+ repository_name = " postgres-grafana-on-ecs-postgres-repo"
3131 cluster_id = module. cluster . cluster_id
3232 vpc_id = module. vpc . vpc_id
3333 vpc_public_subnets = module. vpc . public_subnets
Original file line number Diff line number Diff line change 1+ # Cluster Module
2+
3+ ## Providers
4+ | Name | Version |
5+ | ------| ---------|
6+ | aws | ~ 5.7.0 |
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ resource "aws_ecs_task_definition" "task" {
2323 {
2424 name : " grafana" ,
2525 image : data.aws_ecr_repository.repository.repository_url,
26- container_name: " grafana" ,
26+ container_name : " grafana" ,
2727 essential : true ,
2828 cpu : 512 ,
2929 memory : 512 ,
Original file line number Diff line number Diff line change @@ -23,16 +23,16 @@ resource "aws_ecs_task_definition" "task" {
2323 {
2424 name : " postgres" ,
2525 image : data.aws_ecr_repository.repository.repository_url,
26- container_name: " postgres" ,
27- container_port: 5432 ,
26+ container_name : " postgres" ,
27+ container_port : 5432 ,
2828 essential : true ,
2929 cpu : 512 ,
3030 memory : 1024 ,
3131 portMappings : [
3232 {
3333 containerPort : 5432 ,
34- hostPort : 5432 ,
35- protocol : " tcp"
34+ hostPort : 5432 ,
35+ protocol : " tcp"
3636 }
3737 ],
3838 logConfiguration : {
You can’t perform that action at this time.
0 commit comments