Skip to content

Commit

Permalink
terraform_comment_syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
gdavison committed Sep 20, 2024
1 parent 57530eb commit a5499ec
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 29 deletions.
6 changes: 6 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,12 @@ testacc-tflint-dir: tflint-init ## Run tflint on Terraform directories
@tflint_config="$(PWD)/.ci/.tflint.hcl" ; \
tflint --config "$$tflint_config" --chdir=./internal/service --recursive

testacc-tflint-dir-fix: tflint-init ## fix Terraform directory linter findings
@echo "make: Acceptance Test Linting (standalone) / tflint..."
@# tflint always resolves config flies relative to the working directory when using --recursive
@tflint_config="$(PWD)/.ci/.tflint.hcl" ; \
tflint --config "$$tflint_config" --chdir=./internal/service --recursive --fix

testacc-tflint-embedded: tflint-init ## Run tflint on embedded Terraform configs
@echo "make: Acceptance Test Linting (embedded) / tflint..."
@find $(SVC_DIR) -type f -name '*_test.go' \
Expand Down
2 changes: 1 addition & 1 deletion internal/service/amp/testdata/Scraper/tags/main_gen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ CONFIG
source {
eks {
cluster_arn = aws_eks_cluster.test.arn
subnet_ids = aws_subnet.test.*.id
subnet_ids = aws_subnet.test[*].id
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "aws_lb" "test" {
subnets = aws_subnet.test[*].id
}

// acctest.ConfigVPCWithSubnets(rName, 1)
# acctest.ConfigVPCWithSubnets(rName, 1)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"

Expand All @@ -37,7 +37,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
4 changes: 2 additions & 2 deletions internal/service/apigateway/testdata/VPCLink/tags/main_gen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resource "aws_lb" "test" {
subnets = aws_subnet.test[*].id
}

// acctest.ConfigVPCWithSubnets(rName, 1)
# acctest.ConfigVPCWithSubnets(rName, 1)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"

Expand All @@ -32,7 +32,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aws_lb" "test" {
subnets = aws_subnet.test[*].id
}

// acctest.ConfigVPCWithSubnets(rName, 1)
# acctest.ConfigVPCWithSubnets(rName, 1)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"

Expand All @@ -36,7 +36,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "aws_lb" "test" {
subnets = aws_subnet.test[*].id
}

// acctest.ConfigVPCWithSubnets(rName, 1)
# acctest.ConfigVPCWithSubnets(rName, 1)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"

Expand All @@ -37,7 +37,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resource "aws_lb" "test" {
subnets = aws_subnet.test[*].id
}

// acctest.ConfigVPCWithSubnets(rName, 1)
# acctest.ConfigVPCWithSubnets(rName, 1)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"

Expand All @@ -38,7 +38,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "aws_lb" "test" {
subnets = aws_subnet.test[*].id
}

// acctest.ConfigVPCWithSubnets(rName, 1)
# acctest.ConfigVPCWithSubnets(rName, 1)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"

Expand All @@ -41,7 +41,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
4 changes: 2 additions & 2 deletions internal/service/apigateway/testdata/tmpl/vpc_link_tags.gtpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ resource "aws_lb" "test" {
subnets = aws_subnet.test[*].id
}

// acctest.ConfigVPCWithSubnets(rName, 1)
# acctest.ConfigVPCWithSubnets(rName, 1)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"

Expand All @@ -29,7 +29,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aws_security_group" "test" {
vpc_id = aws_vpc.test.id
}

// acctest.ConfigVPCWithSubnets(rName, 2)
# acctest.ConfigVPCWithSubnets(rName, 2)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
}
Expand All @@ -32,7 +32,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "aws_security_group" "test" {
vpc_id = aws_vpc.test.id
}

// acctest.ConfigVPCWithSubnets(rName, 2)
# acctest.ConfigVPCWithSubnets(rName, 2)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
}
Expand All @@ -27,7 +27,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resource "aws_security_group" "test" {
vpc_id = aws_vpc.test.id
}

// acctest.ConfigVPCWithSubnets(rName, 2)
# acctest.ConfigVPCWithSubnets(rName, 2)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
}
Expand All @@ -31,7 +31,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "aws_security_group" "test" {
vpc_id = aws_vpc.test.id
}

// acctest.ConfigVPCWithSubnets(rName, 2)
# acctest.ConfigVPCWithSubnets(rName, 2)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
}
Expand All @@ -32,7 +32,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ resource "aws_security_group" "test" {
vpc_id = aws_vpc.test.id
}

// acctest.ConfigVPCWithSubnets(rName, 2)
# acctest.ConfigVPCWithSubnets(rName, 2)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
}
Expand All @@ -33,7 +33,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "aws_security_group" "test" {
vpc_id = aws_vpc.test.id
}

// acctest.ConfigVPCWithSubnets(rName, 2)
# acctest.ConfigVPCWithSubnets(rName, 2)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
}
Expand All @@ -36,7 +36,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "aws_security_group" "test" {
vpc_id = aws_vpc.test.id
}

// acctest.ConfigVPCWithSubnets(rName, 2)
# acctest.ConfigVPCWithSubnets(rName, 2)
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
}
Expand All @@ -24,7 +24,7 @@ resource "aws_subnet" "test" {
cidr_block = cidrsubnet(aws_vpc.test.cidr_block, 8, count.index)
}

// acctest.ConfigAvailableAZsNoOptInDefaultExclude()
# acctest.ConfigAvailableAZsNoOptInDefaultExclude()
data "aws_availability_zones" "available" {
exclude_zone_ids = local.default_exclude_zone_ids
state = "available"
Expand Down

0 comments on commit a5499ec

Please sign in to comment.