Add tflint to pipelines (#2220)

* Fix terraform_deprecated_index

https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_index.md

* Fix terraform_deprecated_interpolation

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_deprecated_interpolation.md

* Fix more indexing

* Remove unused variable

* Enable TFLint for modules

* Add tflint config file

* Fix chdir

* Lint modules

* TFLint fixes

* TFLint

* Fixes binauthz README

* Fixes DNS response policy tests. Restores MIG outputs.

* Fixes other DNS response policy tests.

* Update tests for fast 2-e

* Moar fixed tests

---------

Co-authored-by: Simone Ruffilli <sruffilli@google.com>
This commit is contained in:
Julio Castillo
2024-04-17 11:23:48 +03:00
committed by GitHub
parent 25bf17c837
commit 3af7e257d2
180 changed files with 2341 additions and 2317 deletions

View File

@@ -44,7 +44,7 @@ locals {
: (
try(var.vpc_connector.create, false) == false
? var.vpc_connector.name
: google_vpc_access_connector.connector.0.id
: google_vpc_access_connector.connector[0].id
)
)
}
@@ -121,7 +121,7 @@ resource "google_cloudfunctions2_function" "function" {
key = secret.key
project_id = secret.value.project_id
secret = secret.value.secret
version = try(secret.value.versions.0, "latest")
version = try(secret.value.versions[0], "latest")
}
}

View File

@@ -17,7 +17,7 @@
output "bucket" {
description = "Bucket resource (only if auto-created)."
value = try(
var.bucket_config == null ? null : google_storage_bucket.bucket.0, null
var.bucket_config == null ? null : google_storage_bucket.bucket[0], null
)
}
@@ -84,5 +84,5 @@ output "uri" {
output "vpc_connector" {
description = "VPC connector resource if created."
value = try(google_vpc_access_connector.connector.0.id, null)
value = try(google_vpc_access_connector.connector[0].id, null)
}