question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pulumi up fails second time when using firestore Index

See original GitHub issue

A 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:open
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
leezencommented, Sep 2, 2020

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?

0reactions
manastcommented, Sep 3, 2020

regarding deleteBeforeReplace, I agree on what you say.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found