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

Fix firestore database autoname #2184

Merged
merged 5 commits into from
Aug 20, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions provider/provider_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,3 +920,10 @@ func TestFirestoreFieldPermadiffRegress2166(t *testing.T) {
pt.Up()
pt.Preview(optpreview.ExpectNoChanges())
}

func TestFirestoreDatabaseAutoname(t *testing.T) {
pt := pulumiTest(t, "test-programs/firestore-db-autoname")
proj := getProject()
pt.SetConfig("gcpProj", proj)
pt.Up()
}
2 changes: 1 addition & 1 deletion provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ func Provider() tfbridge.ProviderInfo {
// Firestore resources
"google_firestore_index": {Tok: gcpResource(gcpFirestore, "Index")},
"google_firestore_document": {Tok: gcpResource(gcpFirestore, "Document")},
"google_firestore_database": {Tok: gcpResource(gcpFirestore, "Database")},
"google_firestore_database": {Tok: gcpResource(gcpFirestore, "Database"), Fields: nameField(lowercaseAutoName())},
VenelinMartinov marked this conversation as resolved.
Show resolved Hide resolved
"google_firestore_field": {
Tok: gcpResource(gcpFirestore, "Field"),
Fields: map[string]*tfbridge.SchemaInfo{
Expand Down
12 changes: 12 additions & 0 deletions provider/test-programs/firestore-db-autoname/Pulumi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: firestore-db-autoname
runtime: yaml
config:
gcpProj: string
resources:
myFirestoreDatabase:
type: gcp:firestore:Database
properties:
type: "FIRESTORE_NATIVE"
project: ${gcpProj}
locationId: "us-central1"
deletionPolicy: DELETE
Loading