Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A topic's schema can't be changed after it's created. #12806

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/6697.txt
@@ -0,0 +1,3 @@
```release-note:bug
pubsub: Ensured topics are recreated when their schemas change.
```
2 changes: 2 additions & 0 deletions google/resource_pubsub_topic.go
Expand Up @@ -112,6 +112,7 @@ and is not a valid configuration.`,
"schema": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `The name of the schema that messages published should be
validated against. Format is projects/{project}/schemas/{schema}.
The value of this field will be _deleted-schema_
Expand All @@ -120,6 +121,7 @@ if the schema has been deleted.`,
"encoding": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validateEnum([]string{"ENCODING_UNSPECIFIED", "JSON", "BINARY", ""}),
Description: `The encoding of messages validated against schema. Default value: "ENCODING_UNSPECIFIED" Possible values: ["ENCODING_UNSPECIFIED", "JSON", "BINARY"]`,
Default: "ENCODING_UNSPECIFIED",
Expand Down