Skip to content

Commit

Permalink
A topic's schema can't be changed after it's created. (#6697) (#12806)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Oct 17, 2022
1 parent 10abd3e commit abf19d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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

0 comments on commit abf19d6

Please sign in to comment.