From 8fe19ad7c2232957d84d22ba00d0338b79428d3d Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Sat, 12 Nov 2022 11:30:34 +0100 Subject: [PATCH] Rename bigquery_use_partitioned_table --- fast/stages/00-bootstrap/organization.tf | 6 +++--- modules/folder/README.md | 2 +- modules/folder/logging.tf | 4 ++-- modules/folder/variables.tf | 6 +++--- modules/organization/README.md | 18 +++++++++--------- modules/organization/logging.tf | 4 ++-- modules/organization/variables.tf | 8 ++++---- modules/project/README.md | 2 +- modules/project/logging.tf | 4 ++-- modules/project/variables.tf | 8 ++++---- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/fast/stages/00-bootstrap/organization.tf b/fast/stages/00-bootstrap/organization.tf index 7a12ea32..297e0f86 100644 --- a/fast/stages/00-bootstrap/organization.tf +++ b/fast/stages/00-bootstrap/organization.tf @@ -192,9 +192,9 @@ module "organization" { } logging_sinks = { for name, attrs in var.log_sinks : name => { - destination = local.log_sink_destinations[name].as_logging_destination - filter = attrs.filter - bigquery_use_partitioned_table = attrs.type == "bigquery" + bq_partitioned_table = attrs.type == "bigquery" + destination = local.log_sink_destinations[name].as_logging_destination + filter = attrs.filter } } } diff --git a/modules/folder/README.md b/modules/folder/README.md index 4e5e752f..c71cdacc 100644 --- a/modules/folder/README.md +++ b/modules/folder/README.md @@ -302,7 +302,7 @@ module "folder" { | [iam_additive_members](variables.tf#L85) | IAM additive bindings in {MEMBERS => [ROLE]} format. This might break if members are dynamic values. | map(list(string)) | | {} | | [id](variables.tf#L92) | Folder ID in case you use folder_create=false. | string | | null | | [logging_exclusions](variables.tf#L98) | Logging exclusions for this folder in the form {NAME -> FILTER}. | map(string) | | {} | -| [logging_sinks](variables.tf#L105) | Logging sinks to create for this folder. | map(object({…})) | | {} | +| [logging_sinks](variables.tf#L105) | Logging sinks to create for this folder. | map(object({…})) | | {} | | [name](variables.tf#L137) | Folder name. | string | | null | | [org_policies](variables.tf#L143) | Organization policies applied to this folder keyed by policy name. | map(object({…})) | | {} | | [org_policies_data_path](variables.tf#L183) | Path containing org policies in YAML format. | string | | null | diff --git a/modules/folder/logging.tf b/modules/folder/logging.tf index 517b74e1..e733dfbc 100644 --- a/modules/folder/logging.tf +++ b/modules/folder/logging.tf @@ -38,9 +38,9 @@ resource "google_logging_folder_sink" "sink" { disabled = each.value.disabled dynamic "bigquery_options" { - for_each = each.value.bigquery_use_partitioned_table != null ? [""] : [] + for_each = each.value.bq_partitioned_table != null ? [""] : [] content { - use_partitioned_tables = each.value.bigquery_use_partitioned_table + use_partitioned_tables = each.value.bq_partitioned_table } } diff --git a/modules/folder/variables.tf b/modules/folder/variables.tf index b5824884..03e2d7e7 100644 --- a/modules/folder/variables.tf +++ b/modules/folder/variables.tf @@ -105,7 +105,7 @@ variable "logging_exclusions" { variable "logging_sinks" { description = "Logging sinks to create for this folder." type = map(object({ - bigquery_use_partitioned_table = optional(bool) + bq_partitioned_table = optional(bool) description = optional(string) destination = object({ type = string @@ -128,9 +128,9 @@ variable "logging_sinks" { validation { condition = alltrue([ for k, v in var.logging_sinks : - v.bigquery_use_partitioned_table != true || v.destination.type == "bigquery" + v. != true || v.destination.type == "bigquery" ]) - error_message = "Can only set bigquery_use_partitioned_table when destination type is `bigquery`." + error_message = "Can only set when destination type is `bigquery`." } } diff --git a/modules/organization/README.md b/modules/organization/README.md index 3adbff3d..b99f9a29 100644 --- a/modules/organization/README.md +++ b/modules/organization/README.md @@ -311,22 +311,22 @@ module "org" { logging_sinks = { warnings = { - destination = module.gcs.as_logging_destination - filter = "severity=WARNING" + destination = module.gcs.as_logging_destination + filter = "severity=WARNING" } info = { destination = module.dataset.as_logging_destination filter = "severity=INFO" - bigquery_use_partitioned_table = true + bq_partitioned_table = true } notice = { - destination = module.pubsub.as_logging_destination - filter = "severity=NOTICE" + destination = module.pubsub.as_logging_destination + filter = "severity=NOTICE" } debug = { - destination = module.bucket.as_logging_destination - filter = "severity=DEBUG" - exclusions = { + destination = module.bucket.as_logging_destination + filter = "severity=DEBUG" + exclusions = { no-compute = "logName:compute" } } @@ -425,7 +425,7 @@ module "org" { | [iam_audit_config_authoritative](variables.tf#L105) | IAM Authoritative service audit logging configuration. Service as key, map of log permission (eg DATA_READ) and excluded members as value for each service. Audit config should also be authoritative when using authoritative bindings. Use with caution. | map(map(list(string))) | | null | | [iam_bindings_authoritative](variables.tf#L116) | IAM authoritative bindings, in {ROLE => [MEMBERS]} format. Roles and members not explicitly listed will be cleared. Bindings should also be authoritative when using authoritative audit config. Use with caution. | map(list(string)) | | null | | [logging_exclusions](variables.tf#L122) | Logging exclusions for this organization in the form {NAME -> FILTER}. | map(string) | | {} | -| [logging_sinks](variables.tf#L129) | Logging sinks to create for the organization. | map(object({…})) | | {} | +| [logging_sinks](variables.tf#L129) | Logging sinks to create for the organization. | map(object({…})) | | {} | | [org_policies](variables.tf#L161) | Organization policies applied to this organization keyed by policy name. | map(object({…})) | | {} | | [org_policies_data_path](variables.tf#L201) | Path containing org policies in YAML format. | string | | null | | [org_policy_custom_constraints](variables.tf#L207) | Organization policiy custom constraints keyed by constraint name. | map(object({…})) | | {} | diff --git a/modules/organization/logging.tf b/modules/organization/logging.tf index 57f2da1f..042228d4 100644 --- a/modules/organization/logging.tf +++ b/modules/organization/logging.tf @@ -37,9 +37,9 @@ resource "google_logging_organization_sink" "sink" { disabled = each.value.disabled dynamic "bigquery_options" { - for_each = each.value.bigquery_use_partitioned_table != null ? [""] : [] + for_each = each.value.bq_partitioned_table != null ? [""] : [] content { - use_partitioned_tables = each.value.bigquery_use_partitioned_table + use_partitioned_tables = each.value.bq_partitioned_table } } diff --git a/modules/organization/variables.tf b/modules/organization/variables.tf index 3fcbefea..636bba74 100644 --- a/modules/organization/variables.tf +++ b/modules/organization/variables.tf @@ -129,8 +129,8 @@ variable "logging_exclusions" { variable "logging_sinks" { description = "Logging sinks to create for the organization." type = map(object({ - bigquery_use_partitioned_table = optional(bool) - description = optional(string) + bq_partitioned_table = optional(bool) + description = optional(string) destination = object({ type = string target = string @@ -152,9 +152,9 @@ variable "logging_sinks" { validation { condition = alltrue([ for k, v in var.logging_sinks : - v.bigquery_use_partitioned_table != true || v.destination.type == "bigquery" + v.bq_partitioned_table != true || v.destination.type == "bigquery" ]) - error_message = "Can only set bigquery_use_partitioned_table when destination type is `bigquery`." + error_message = "Can only set bq_partitioned_table when destination type is `bigquery`." } } diff --git a/modules/project/README.md b/modules/project/README.md index 3ee8e312..55798a54 100644 --- a/modules/project/README.md +++ b/modules/project/README.md @@ -483,7 +483,7 @@ output "compute_robot" { | [labels](variables.tf#L82) | Resource labels. | map(string) | | {} | | [lien_reason](variables.tf#L89) | If non-empty, creates a project lien with this description. | string | | "" | | [logging_exclusions](variables.tf#L95) | Logging exclusions for this project in the form {NAME -> FILTER}. | map(string) | | {} | -| [logging_sinks](variables.tf#L102) | Logging sinks to create for this project. | map(object({…})) | | {} | +| [logging_sinks](variables.tf#L102) | Logging sinks to create for this project. | map(object({…})) | | {} | | [metric_scopes](variables.tf#L135) | List of projects that will act as metric scopes for this project. | list(string) | | [] | | [org_policies](variables.tf#L147) | Organization policies applied to this project keyed by policy name. | map(object({…})) | | {} | | [org_policies_data_path](variables.tf#L187) | Path containing org policies in YAML format. | string | | null | diff --git a/modules/project/logging.tf b/modules/project/logging.tf index 6293ac32..1e5948f7 100644 --- a/modules/project/logging.tf +++ b/modules/project/logging.tf @@ -37,9 +37,9 @@ resource "google_logging_project_sink" "sink" { disabled = each.value.disabled dynamic "bigquery_options" { - for_each = each.value.bigquery_use_partitioned_table != null ? [""] : [] + for_each = each.value.bq_partitioned_table != null ? [""] : [] content { - use_partitioned_tables = each.value.bigquery_use_partitioned_table + use_partitioned_tables = each.value.bq_partitioned_table } } diff --git a/modules/project/variables.tf b/modules/project/variables.tf index b3f8fa52..e31ee84c 100644 --- a/modules/project/variables.tf +++ b/modules/project/variables.tf @@ -102,8 +102,8 @@ variable "logging_exclusions" { variable "logging_sinks" { description = "Logging sinks to create for this project." type = map(object({ - bigquery_use_partitioned_table = optional(bool) - description = optional(string) + bq_partitioned_table = optional(bool) + description = optional(string) destination = object({ type = string target = string @@ -126,9 +126,9 @@ variable "logging_sinks" { validation { condition = alltrue([ for k, v in var.logging_sinks : - v.bigquery_use_partitioned_table != true || v.destination.type == "bigquery" + v.bq_partitioned_table != true || v.destination.type == "bigquery" ]) - error_message = "Can only set bigquery_use_partitioned_table when destination type is `bigquery`." + error_message = "Can only set bq_partitioned_table when destination type is `bigquery`." } }