Enable terraform_naming_convention in tflint (#3930)
* Draft terraform_naming_convention * Two fast/stages fixes for terraform_naming_convention * Disable terraform_naming_convention for resources for now * module fixes for terraform_naming_convention * tfdoc * Remove "moved" from recipe and needs-fixing * Fix moved for spoke_ra * fix tests * Use default (snake_case) for resources * factory.terraform_data.project-preconditions * First-pass migration of resources + tests * Fix tests/modules/organization * Require snake_case for variables; Add annotations for _testing * permit _fast_debug variable * Fix net_vpc_factory and net_vpc_firewall tests * tfdoc addons and recipe * Fix more tests * Fix some net-global -> net_global tests --------- Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
This commit is contained in:
@@ -119,14 +119,24 @@ resource "google_logging_organization_sink" "sink" {
|
||||
]
|
||||
}
|
||||
|
||||
resource "google_storage_bucket_iam_member" "storage-sinks-binding" {
|
||||
moved {
|
||||
from = google_storage_bucket_iam_member.storage-sinks-binding
|
||||
to = google_storage_bucket_iam_member.storage_sinks_binding
|
||||
}
|
||||
|
||||
resource "google_storage_bucket_iam_member" "storage_sinks_binding" {
|
||||
for_each = local.sink_bindings["storage"]
|
||||
bucket = each.value.destination
|
||||
role = "roles/storage.objectCreator"
|
||||
member = google_logging_organization_sink.sink[each.key].writer_identity
|
||||
}
|
||||
|
||||
resource "google_bigquery_dataset_iam_member" "bq-sinks-binding" {
|
||||
moved {
|
||||
from = google_bigquery_dataset_iam_member.bq-sinks-binding
|
||||
to = google_bigquery_dataset_iam_member.bq_sinks_binding
|
||||
}
|
||||
|
||||
resource "google_bigquery_dataset_iam_member" "bq_sinks_binding" {
|
||||
for_each = local.sink_bindings["bigquery"]
|
||||
project = split("/", each.value.destination)[1]
|
||||
dataset_id = split("/", each.value.destination)[3]
|
||||
@@ -134,7 +144,12 @@ resource "google_bigquery_dataset_iam_member" "bq-sinks-binding" {
|
||||
member = google_logging_organization_sink.sink[each.key].writer_identity
|
||||
}
|
||||
|
||||
resource "google_pubsub_topic_iam_member" "pubsub-sinks-binding" {
|
||||
moved {
|
||||
from = google_pubsub_topic_iam_member.pubsub-sinks-binding
|
||||
to = google_pubsub_topic_iam_member.pubsub_sinks_binding
|
||||
}
|
||||
|
||||
resource "google_pubsub_topic_iam_member" "pubsub_sinks_binding" {
|
||||
for_each = local.sink_bindings["pubsub"]
|
||||
project = split("/", each.value.destination)[1]
|
||||
topic = split("/", each.value.destination)[3]
|
||||
@@ -142,7 +157,12 @@ resource "google_pubsub_topic_iam_member" "pubsub-sinks-binding" {
|
||||
member = google_logging_organization_sink.sink[each.key].writer_identity
|
||||
}
|
||||
|
||||
resource "google_project_iam_member" "bucket-sinks-binding" {
|
||||
moved {
|
||||
from = google_project_iam_member.bucket-sinks-binding
|
||||
to = google_project_iam_member.bucket_sinks_binding
|
||||
}
|
||||
|
||||
resource "google_project_iam_member" "bucket_sinks_binding" {
|
||||
for_each = local.sink_bindings["logging"]
|
||||
project = split("/", each.value.destination)[1]
|
||||
role = "roles/logging.bucketWriter"
|
||||
@@ -154,14 +174,24 @@ resource "google_project_iam_member" "bucket-sinks-binding" {
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_project_iam_member" "project-sinks-binding" {
|
||||
moved {
|
||||
from = google_project_iam_member.project-sinks-binding
|
||||
to = google_project_iam_member.project_sinks_binding
|
||||
}
|
||||
|
||||
resource "google_project_iam_member" "project_sinks_binding" {
|
||||
for_each = local.sink_bindings["project"]
|
||||
project = each.value.destination
|
||||
role = "roles/logging.logWriter"
|
||||
member = google_logging_organization_sink.sink[each.key].writer_identity
|
||||
}
|
||||
|
||||
resource "google_logging_organization_exclusion" "logging-exclusion" {
|
||||
moved {
|
||||
from = google_logging_organization_exclusion.logging-exclusion
|
||||
to = google_logging_organization_exclusion.logging_exclusion
|
||||
}
|
||||
|
||||
resource "google_logging_organization_exclusion" "logging_exclusion" {
|
||||
for_each = var.logging_exclusions
|
||||
name = each.key
|
||||
org_id = local.organization_id_numeric
|
||||
|
||||
Reference in New Issue
Block a user