Skip to content

Commit

Permalink
Set database and collection during import of firestore index. (#3097) (
Browse files Browse the repository at this point in the history
…#1741)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Feb 10, 2020
1 parent 5f665fc commit 43cbe35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/3097.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
firestore: fixed import of `google_firestore_index` when database or collection were non-default.
```
2 changes: 2 additions & 0 deletions google-beta/resource_firestore_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ func resourceFirestoreIndexImport(d *schema.ResourceData, meta interface{}) ([]*
}

d.Set("project", stringParts[1])
d.Set("database", stringParts[3])
d.Set("collection", stringParts[5])
return []*schema.ResourceData{d}, nil
}

Expand Down

0 comments on commit 43cbe35

Please sign in to comment.