pulumi up fails second time when using firestore Index
See original GitHub issueA index for firestore can easily be created by using:
const backupIndex = new gcp.firestore.Index(
"index",
{
collection: "mycollection",
fields: [
{
fieldPath: "onefield",
order: "ASCENDING",
},
{
fieldPath: "anotherfield",
order: "DESCENDING",
},
],
},
{
parent: this,
}
);
creates the index the first time pulumi up is executed. The second time however, even though no changes have been performed, a replace is scheduled for changing the fields:
gcp:firestore:Index index replace [diff: ~fields]
Furthermore this fails:
gcp:firestore:Index (backup):
error: Error creating Index: googleapi: Error 409: index already exists
Ok, so lets try changing the name of the index:
+ gcp:firestore:Index newIndex create
- gcp:firestore:Index index delete
It also fails:
error: Error creating Index: googleapi: Error 409: index already exists
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Troubleshooting Guide - Pulumi
This guide covers common troubleshooting techniques when using Pulumi, such as tracing, manually editing deployments, and resolving common errors.
Read more >gcp.firestore.Index - Pulumi
Documentation for the gcp.firestore.Index resource with examples, input properties, output properties, lookup functions, and supporting types.
Read more >gcp.cloudfunctionsv2.Function - Pulumi
Documentation for the gcp.cloudfunctionsv2.Function resource with examples, input properties, output properties, lookup functions, and supporting types.
Read more >gcp.cloudrunv2.Service - Pulumi
Max allowed time for an instance to respond to a request. A duration in seconds with up to nine fractional digits, ending with...
Read more >gcp.appengine.FlexibleAppVersion - Pulumi
Based on Google Compute Engine, the App Engine flexible environment automatically scales your app up and down while also balancing the load.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is tracked in https://github.com/pulumi/pulumi/issues/2625
Regarding the diff you saw, could you please provide the detailed diff? I wonder if it’s an ordering thing with the API returning a different order, in which case, could this be solved by ordering the fields in the same order?
regarding deleteBeforeReplace, I agree on what you say.