Rename bigquery_use_partitioned_table

This commit is contained in:
Julio Castillo 2022-11-12 11:30:34 +01:00
parent c7fe6da12e
commit 8fe19ad7c2
10 changed files with 31 additions and 31 deletions

View File

@ -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
}
}
}

View File

@ -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. | <code>map&#40;list&#40;string&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [id](variables.tf#L92) | Folder ID in case you use folder_create=false. | <code>string</code> | | <code>null</code> |
| [logging_exclusions](variables.tf#L98) | Logging exclusions for this folder in the form {NAME -> FILTER}. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [logging_sinks](variables.tf#L105) | Logging sinks to create for this folder. | <code title="map&#40;object&#40;&#123;&#10; bigquery_use_partitioned_table &#61; optional&#40;bool&#41;&#10; description &#61; optional&#40;string&#41;&#10; destination &#61; object&#40;&#123;&#10; type &#61; string&#10; target &#61; string&#10; &#125;&#41;&#10; disabled &#61; optional&#40;bool, false&#41;&#10; exclusions &#61; optional&#40;map&#40;string&#41;, &#123;&#125;&#41;&#10; filter &#61; string&#10; include_children &#61; optional&#40;bool, true&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [logging_sinks](variables.tf#L105) | Logging sinks to create for this folder. | <code title="map&#40;object&#40;&#123;&#10; bq_partitioned_table &#61; optional&#40;bool&#41;&#10; description &#61; optional&#40;string&#41;&#10; destination &#61; object&#40;&#123;&#10; type &#61; string&#10; target &#61; string&#10; &#125;&#41;&#10; disabled &#61; optional&#40;bool, false&#41;&#10; exclusions &#61; optional&#40;map&#40;string&#41;, &#123;&#125;&#41;&#10; filter &#61; string&#10; include_children &#61; optional&#40;bool, true&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [name](variables.tf#L137) | Folder name. | <code>string</code> | | <code>null</code> |
| [org_policies](variables.tf#L143) | Organization policies applied to this folder keyed by policy name. | <code title="map&#40;object&#40;&#123;&#10; inherit_from_parent &#61; optional&#40;bool&#41; &#35; for list policies only.&#10; reset &#61; optional&#40;bool&#41;&#10; allow &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; deny &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; enforce &#61; optional&#40;bool, true&#41; &#35; for boolean policies only.&#10; rules &#61; optional&#40;list&#40;object&#40;&#123;&#10; allow &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; deny &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; enforce &#61; optional&#40;bool, true&#41; &#35; for boolean policies only.&#10; condition &#61; object&#40;&#123;&#10; description &#61; optional&#40;string&#41;&#10; expression &#61; optional&#40;string&#41;&#10; location &#61; optional&#40;string&#41;&#10; title &#61; optional&#40;string&#41;&#10; &#125;&#41;&#10; &#125;&#41;&#41;, &#91;&#93;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [org_policies_data_path](variables.tf#L183) | Path containing org policies in YAML format. | <code>string</code> | | <code>null</code> |

View File

@ -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
}
}

View File

@ -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`."
}
}

View File

@ -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. | <code>map&#40;map&#40;list&#40;string&#41;&#41;&#41;</code> | | <code>null</code> |
| [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. | <code>map&#40;list&#40;string&#41;&#41;</code> | | <code>null</code> |
| [logging_exclusions](variables.tf#L122) | Logging exclusions for this organization in the form {NAME -> FILTER}. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [logging_sinks](variables.tf#L129) | Logging sinks to create for the organization. | <code title="map&#40;object&#40;&#123;&#10; bigquery_use_partitioned_table &#61; optional&#40;bool&#41;&#10; description &#61; optional&#40;string&#41;&#10; destination &#61; object&#40;&#123;&#10; type &#61; string&#10; target &#61; string&#10; &#125;&#41;&#10; disabled &#61; optional&#40;bool, false&#41;&#10; exclusions &#61; optional&#40;map&#40;string&#41;, &#123;&#125;&#41;&#10; filter &#61; string&#10; include_children &#61; optional&#40;bool, true&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [logging_sinks](variables.tf#L129) | Logging sinks to create for the organization. | <code title="map&#40;object&#40;&#123;&#10; bq_partitioned_table &#61; optional&#40;bool&#41;&#10; description &#61; optional&#40;string&#41;&#10; destination &#61; object&#40;&#123;&#10; type &#61; string&#10; target &#61; string&#10; &#125;&#41;&#10; disabled &#61; optional&#40;bool, false&#41;&#10; exclusions &#61; optional&#40;map&#40;string&#41;, &#123;&#125;&#41;&#10; filter &#61; string&#10; include_children &#61; optional&#40;bool, true&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [org_policies](variables.tf#L161) | Organization policies applied to this organization keyed by policy name. | <code title="map&#40;object&#40;&#123;&#10; inherit_from_parent &#61; optional&#40;bool&#41; &#35; for list policies only.&#10; reset &#61; optional&#40;bool&#41;&#10; allow &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; deny &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; enforce &#61; optional&#40;bool, true&#41; &#35; for boolean policies only.&#10; rules &#61; optional&#40;list&#40;object&#40;&#123;&#10; allow &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; deny &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; enforce &#61; optional&#40;bool, true&#41; &#35; for boolean policies only.&#10; condition &#61; object&#40;&#123;&#10; description &#61; optional&#40;string&#41;&#10; expression &#61; optional&#40;string&#41;&#10; location &#61; optional&#40;string&#41;&#10; title &#61; optional&#40;string&#41;&#10; &#125;&#41;&#10; &#125;&#41;&#41;, &#91;&#93;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [org_policies_data_path](variables.tf#L201) | Path containing org policies in YAML format. | <code>string</code> | | <code>null</code> |
| [org_policy_custom_constraints](variables.tf#L207) | Organization policiy custom constraints keyed by constraint name. | <code title="map&#40;object&#40;&#123;&#10; display_name &#61; optional&#40;string&#41;&#10; description &#61; optional&#40;string&#41;&#10; action_type &#61; string&#10; condition &#61; string&#10; method_types &#61; list&#40;string&#41;&#10; resource_types &#61; list&#40;string&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |

View File

@ -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
}
}

View File

@ -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`."
}
}

View File

@ -483,7 +483,7 @@ output "compute_robot" {
| [labels](variables.tf#L82) | Resource labels. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [lien_reason](variables.tf#L89) | If non-empty, creates a project lien with this description. | <code>string</code> | | <code>&#34;&#34;</code> |
| [logging_exclusions](variables.tf#L95) | Logging exclusions for this project in the form {NAME -> FILTER}. | <code>map&#40;string&#41;</code> | | <code>&#123;&#125;</code> |
| [logging_sinks](variables.tf#L102) | Logging sinks to create for this project. | <code title="map&#40;object&#40;&#123;&#10; bigquery_use_partitioned_table &#61; optional&#40;bool&#41;&#10; description &#61; optional&#40;string&#41;&#10; destination &#61; object&#40;&#123;&#10; type &#61; string&#10; target &#61; string&#10; &#125;&#41;&#10; disabled &#61; optional&#40;bool, false&#41;&#10; exclusions &#61; optional&#40;map&#40;string&#41;, &#123;&#125;&#41;&#10; filter &#61; string&#10; iam &#61; optional&#40;bool, true&#41;&#10; unique_writer &#61; optional&#40;bool&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [logging_sinks](variables.tf#L102) | Logging sinks to create for this project. | <code title="map&#40;object&#40;&#123;&#10; bq_partitioned_table &#61; optional&#40;bool&#41;&#10; description &#61; optional&#40;string&#41;&#10; destination &#61; object&#40;&#123;&#10; type &#61; string&#10; target &#61; string&#10; &#125;&#41;&#10; disabled &#61; optional&#40;bool, false&#41;&#10; exclusions &#61; optional&#40;map&#40;string&#41;, &#123;&#125;&#41;&#10; filter &#61; string&#10; iam &#61; optional&#40;bool, true&#41;&#10; unique_writer &#61; optional&#40;bool&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [metric_scopes](variables.tf#L135) | List of projects that will act as metric scopes for this project. | <code>list&#40;string&#41;</code> | | <code>&#91;&#93;</code> |
| [org_policies](variables.tf#L147) | Organization policies applied to this project keyed by policy name. | <code title="map&#40;object&#40;&#123;&#10; inherit_from_parent &#61; optional&#40;bool&#41; &#35; for list policies only.&#10; reset &#61; optional&#40;bool&#41;&#10; allow &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; deny &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; enforce &#61; optional&#40;bool, true&#41; &#35; for boolean policies only.&#10; rules &#61; optional&#40;list&#40;object&#40;&#123;&#10; allow &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; deny &#61; optional&#40;object&#40;&#123;&#10; all &#61; optional&#40;bool&#41;&#10; values &#61; optional&#40;list&#40;string&#41;&#41;&#10; &#125;&#41;&#41;&#10; enforce &#61; optional&#40;bool, true&#41; &#35; for boolean policies only.&#10; condition &#61; object&#40;&#123;&#10; description &#61; optional&#40;string&#41;&#10; expression &#61; optional&#40;string&#41;&#10; location &#61; optional&#40;string&#41;&#10; title &#61; optional&#40;string&#41;&#10; &#125;&#41;&#10; &#125;&#41;&#41;, &#91;&#93;&#41;&#10;&#125;&#41;&#41;">map&#40;object&#40;&#123;&#8230;&#125;&#41;&#41;</code> | | <code>&#123;&#125;</code> |
| [org_policies_data_path](variables.tf#L187) | Path containing org policies in YAML format. | <code>string</code> | | <code>null</code> |

View File

@ -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
}
}

View File

@ -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`."
}
}