Add BigQuery subcriptions to Pubsub module.
Pubsub can now have subscriptions that write directly to BigQuery. * https://cloud.google.com/pubsub/docs/bigquery In the Google Terraform provider, this is configured using an additional block inside a `google_pubsub_subscription` resource. * https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_subscription#nested_bigquery_config This PR adds a new input variable to the `pubsub` module, to optionally add this block to some of the subscriptions defined in the module.
This commit is contained in:
@@ -116,6 +116,16 @@ resource "google_pubsub_subscription" "default" {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dynamic "bigquery_config" {
|
||||
for_each = try(var.bigquery_subscription_configs[each.key], null) == null ? [] : [""]
|
||||
content {
|
||||
table = var.bigquery_subscription_configs[each.key].table
|
||||
use_topic_schema = var.bigquery_subscription_configs[each.key].use_topic_schema
|
||||
write_metadata = var.bigquery_subscription_configs[each.key].write_metadata
|
||||
drop_unknown_fields = var.bigquery_subscription_configs[each.key].drop_unknown_fields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_pubsub_subscription_iam_binding" "default" {
|
||||
|
||||
Reference in New Issue
Block a user