how do i remove this pending sate. i tried to find...
# general
v
how do i remove this pending sate. i tried to find this pending state in exported stack but nothing there
Copy code
-   │     │  ├─ aws:ec2:LaunchConfiguration                 primary-eks-ng-nodeLaunchConfiguration                     deleting..     completing deletion from previous update
l
pulumi refresh
will get rid of most (all?) pending updates.
v
i refreshed a lot of time, did not help
l
Are you using an old version of the CLI? It's removed pending deletion updates for a long time...
v
i am running v3.39.1
l
Anyway, the workaround is to export the state (
pulumi stack export --file _stack_,json
), remove the pending operations from the bottom of the file, then re-import it.
v
i dont see any pending operations in exports
l
It's the last object in the file. If you're not seeing any pending operations, then that implies the stack you're upping isn't the stack you're exporting. Which would also explain why
pulumi refresh
isn't working.
v
I have confirmed and i am sure i am on the right stack
m
What happens when you let
pulumi up
run to completion?
v
its fails with error
m
What’s the error?
v
dependency related error
m
Like it can’t delete your
aws:ec2:LaunchConfiguration
because something else depends on it? Does it tell you what?
v
i can let it run for about 10 minutes and get back to you
m
Ok sounds good
v
Copy code
Type                            Name                                         Status                  Info
     pulumi:pulumi:Stack             allrites-infrastructure-production           **failed**              1 error
 -   ├─ aws:ec2:LaunchConfiguration  primary-eks-spot-ng-nodeLaunchConfiguration  **deleting failed**     1 error
 -   └─ aws:ec2:LaunchConfiguration  primary-eks-ng-nodeLaunchConfiguration       **deleting failed**     1 error

Diagnostics:
  aws:ec2:LaunchConfiguration (primary-eks-spot-ng-nodeLaunchConfiguration):
    error: deleting urn:pulumi:production::allrites-infrastructure::custom:resource:eks$eks:index:Cluster$eks:index:NodeGroup$aws:ec2/launchConfiguration:LaunchConfiguration::primary-eks-spot-ng-nodeLaunchConfiguration: 1 error occurred:
        * deleting Auto Scaling Launch Configuration (primary-eks-spot-ng-nodeLaunchConfiguration-53006be): ResourceInUse: Cannot delete launch configuration primary-eks-spot-ng-nodeLaunchConfiguration-53006be because it is attached to AutoScalingGroup primary-eks
-spot-ng-9605b88f-NodeGroup-1IOM4QBQ1FA64
        status code: 400, request id: cb251332-1cba-4ef2-94fa-24fd794a5896

  pulumi:pulumi:Stack (allrites-infrastructure-production):
    error: update failed

  aws:ec2:LaunchConfiguration (primary-eks-ng-nodeLaunchConfiguration):
    error: deleting urn:pulumi:production::allrites-infrastructure::custom:resource:eks$eks:index:Cluster$eks:index:NodeGroup$aws:ec2/launchConfiguration:LaunchConfiguration::primary-eks-ng-nodeLaunchConfiguration: 1 error occurred:
        * deleting Auto Scaling Launch Configuration (primary-eks-ng-nodeLaunchConfiguration-0a6e40c): ResourceInUse: Cannot delete launch configuration primary-eks-ng-nodeLaunchConfiguration-0a6e40c because it is attached to AutoScalingGroup primary-eks-ng-87a9fb
f1-NodeGroup-1XNKMJOHW71JQ
        status code: 400, request id: df6a095f-97b5-4ee7-9fb2-abd4431507bd

Resources:

Duration: 2m15s
here is the error
i see the pending operations are not in a different group anymore. they are just marked as
"delete": true
l
Looks like you need to delete an ASG.
👍 1
m
☝️ was just arriving at the same conclusion yeah
👍 1
v
Thank you, I have managed to resolve the issue by removing the pending operations. I think i have missed this new changes to pulumi where it does not separate the pending operation
l
I wasn't aware of it either.
m
Nor was I. 🤔 When the update completes, are all of the resources you expected to be deleted actually deleted from AWS?
v
no, i do not want to delete them, it randomly happened due to other issue. probably a bug in my code
m
Glad you’re unblocked, and thanks for calling this out @victorious-dusk-75271 — we’re updating our troubleshooting docs now to change that
pending_operations
reference to align with the new behavior of
pulumi refresh
(https://www.pulumi.com/blog/repairing-state-with-pulumi-refresh/)
🙌 1