diff --git a/mmv1/products/pubsub/Topic.yaml b/mmv1/products/pubsub/Topic.yaml index 5fff52cff69f..a20186eba3be 100644 --- a/mmv1/products/pubsub/Topic.yaml +++ b/mmv1/products/pubsub/Topic.yaml @@ -124,7 +124,6 @@ properties: name: 'schemaSettings' description: | Settings for validating messages published against a schema. - default_from_api: true properties: - !ruby/object:Api::Type::String name: 'schema' diff --git a/mmv1/third_party/terraform/services/pubsub/resource_pubsub_topic_test.go b/mmv1/third_party/terraform/services/pubsub/resource_pubsub_topic_test.go index 7a944302ea21..b8e3f9803fec 100644 --- a/mmv1/third_party/terraform/services/pubsub/resource_pubsub_topic_test.go +++ b/mmv1/third_party/terraform/services/pubsub/resource_pubsub_topic_test.go @@ -93,6 +93,9 @@ func TestAccPubsubTopic_schema(t *testing.T) { { Config: testAccPubsubTopic_updateWithNewSchema(topic, schema2), }, + { + Config: testAccPubsubTopic_updateWithNewSchema(topic, ""), + }, { ResourceName: "google_pubsub_topic.bar", ImportStateId: topic, @@ -228,7 +231,8 @@ resource "google_pubsub_topic" "bar" { } func testAccPubsubTopic_updateWithNewSchema(topic, schema string) string { - return fmt.Sprintf(` + if schema != "" { + return fmt.Sprintf(` resource "google_pubsub_schema" "foo" { name = "%s" type = "PROTOCOL_BUFFER" @@ -243,6 +247,13 @@ resource "google_pubsub_topic" "bar" { } } `, schema, topic) + } else { + return fmt.Sprintf(` + resource "google_pubsub_topic" "bar" { + name = "%s" + } + `, topic) + } } func testAccPubsubTopic_updateWithKinesisIngestionSettings(topic string) string { diff --git a/mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown b/mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown index a32f7fa8fb58..641c2e5338ea 100644 --- a/mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown +++ b/mmv1/third_party/terraform/website/docs/guides/version_6_upgrade.html.markdown @@ -113,3 +113,9 @@ Description of the change and how users should adjust their configuration (if ne ### `settings.ip_configuration.require_ssl` is now removed Removed in favor of field `settings.ip_configuration.ssl_mode`. + +## Resource: `google_pubsub_topic` + +### `schema_settings` no longer has a default value + +An empty value means the setting should be cleared. \ No newline at end of file