Skip to content

Commit

Permalink
Firestore: Mark identifier fields as immutable. (#11174) (#18821)
Browse files Browse the repository at this point in the history
[upstream:0ed911c6f2744cb4cfeba8c7a5768ea46befa8ca]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jul 23, 2024
1 parent 5ddd56b commit ddc8201
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/11174.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
firestore: fixes bug where fields database, collection, document_id, and field on resources could not be updated.
```
3 changes: 3 additions & 0 deletions google/services/firestore/resource_firestore_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ func ResourceFirestoreDocument() *schema.Resource {
"collection": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `The collection ID, relative to database. For example: chatrooms or chatrooms/my-document/private-messages.`,
},
"document_id": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `The client-assigned document ID to use for this document during creation.`,
},
"fields": {
Expand All @@ -77,6 +79,7 @@ func ResourceFirestoreDocument() *schema.Resource {
"database": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Description: `The Firestore database id. Defaults to '"(default)"'.`,
Default: "(default)",
},
Expand Down
3 changes: 3 additions & 0 deletions google/services/firestore/resource_firestore_field.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,19 @@ func ResourceFirestoreField() *schema.Resource {
"collection": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `The id of the collection group to configure.`,
},
"field": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `The id of the field to configure.`,
},
"database": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Description: `The Firestore database id. Defaults to '"(default)"'.`,
Default: "(default)",
},
Expand Down

0 comments on commit ddc8201

Please sign in to comment.