created my first stack... tried to modify it and g...
# general
m
created my first stack... tried to modify it and get the error below. The resource it has as pending did create so I'm not sure why pulumi refresh doesn't work. Not off to a strong start. Seems kind of clunky to resolve state problems by exporting to a file and then importing. We are using GCP. After I removed the pending resource(nodepool) and imported the export file it created a new node pool instead of updating the node pool I had. Not sure pulumi is ready for primetime on gcp at least. Anyone else successfully using pulumi to manage gcp infra?
Copy code
These resources are in an unknown state because the Pulumi CLI was interrupted while
waiting for changes to these resources to complete. You should confirm whether or not the
operations listed completed successfully by checking the state of the appropriate provider.
For example, if you are using AWS, you can confirm using the AWS Console.

Once you have confirmed the status of the interrupted operations, you can repair your stack
using 'pulumi stack export' to export your stack to a file. For each operation that succeeded,
remove that operation from the "pending_operations" section of the file. Once this is complete,
use 'pulumi stack import' to import the repaired stack.
b
Hey Mitch. is this using the gcp-native provider?
pending operations are usually only when the CLI is interrupted, did you get a successful
pulumi up
when you originally ran Pulumi?
m
I had to leave so I executed the command and left it running
b
did you get a "completed" event at the end?
m
no, that's why it was stuck in pending
the resource did create
not sure how to check on the native provider .. I initialized my project with :
Copy code
"@pulumi/gcp": "^5.0.0"
b
so pulumi continuously polls the GCP API in order to determine that the resource got created. If it got interrupted, the resource might have created, but Pulumi can't determine its current state - that's how you end up with
pending_operations
- it's a safety mechanism to ensure you don't create duplicate/overriding resources. I'd recommend running through it again but waiting till the calls have completed. You should see your outputs resolved and the bucket created like this:
Copy code
Do you want to perform this update? yes
Updating (dev):

     Type                   Name            Status
     pulumi:pulumi:Stack    quickstart-dev  created
 +   └─ gcp:storage:Bucket  my-bucket       created

Outputs:
  + bucketName: "<gs://my-bucket-62f8bc7>"

Resources:
    + 2 created

Duration: 3s
to answer this:
Anyone else successfully using pulumi to manage gcp infra?
We have a case study from Sourcegraph about how they use Pulumi on GCP https://www.pulumi.com/case-studies/sourcegraph/
👍 1
m
I'm running pulumi from my laptop so perhaps this would not have happened if I was running from a pipeline. I will continue to kick the tires. to fix this I had to do the export/import/delete stack/create stack.
b
it generally doesn't happen when running from a laptop either, it may be your laptop went to sleep, or was interrupted another way
👍 1