Skip to content

Commit 4735383

Browse files
authored
add enforce_in_transit field in google_pubsub_topic (#12716)
1 parent 8086596 commit 4735383

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

mmv1/products/pubsub/Topic.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ properties:
133133
required: true
134134
item_type:
135135
type: String
136+
- name: "enforceInTransit"
137+
type: Boolean
138+
description: |
139+
If true, `allowedPersistenceRegions` is also used to enforce in-transit
140+
guarantees for messages. That is, Pub/Sub will fail topics.publish
141+
operations on this topic and subscribe operations on any subscription
142+
attached to this topic in any region that is not in `allowedPersistenceRegions`.
143+
required: false
136144
- name: 'schemaSettings'
137145
type: NestedObject
138146
description: |

mmv1/templates/terraform/examples/pubsub_topic_geo_restricted.tf.tmpl

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ resource "google_pubsub_topic" "{{$.PrimaryResourceId}}" {
55
allowed_persistence_regions = [
66
"europe-west3",
77
]
8+
enforce_in_transit = true
89
}
910
}

mmv1/third_party/terraform/services/pubsub/resource_pubsub_topic_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ resource "google_pubsub_topic" "foo" {
230230
allowed_persistence_regions = [
231231
"%s",
232232
]
233+
enforce_in_transit = false
233234
}
234235
}
235236
`, topic, key, value, region)

0 commit comments

Comments
 (0)