GoogleCloudPlatform/cloud-foundation-fabric

Add var.labels to the resource "google_pubsub_subscription"

Closed this issue · 0 comments

Our sentinel policy checks if there are labels attached on resource level. We call CFF pubsub module and use var.labels in our configuration. Even though we assigned var.labels, resource "google_pubsub_topic" passed but resource "google_pubsub_subscription" failed in the sentinel evaluation.

Labels in subscription resource doesnt refer to var.labels. Can we fix that?

resource "google_pubsub_subscription" "default" {
for_each = var.subscriptions
project = var.project_id
name = each.key
topic = google_pubsub_topic.default.name
labels = each.value.labels
ack_deadline_seconds = each.value.ack_deadline_seconds
message_retention_duration = each.value.message_retention_duration
retain_acked_messages = each.value.retain_acked_messages
filter = each.value.filter
enable_message_ordering = each.value.enable_message_ordering
enable_exactly_once_delivery = each.value.enable_exactly_once_delivery