What can I do in this situation? I've created an E...
# general
e
What can I do in this situation? I've created an EKS cluster but for some reason the ASG is not tracked in my stack. I'm now stuck with a partial stack where if I try to
pulumi up
I get this:
Copy code
Updating (tableau/online-sandbox-vpc-0d18addcc5815ae23):

     Type                            Name                                                  Status                  Info
     pulumi:pulumi:Stack             eks-cluster-online-sandbox-vpc-0d18addcc5815ae23
 -   └─ aws:ec2:LaunchConfiguration  online-sandbox-2-eks-cluster-nodeLaunchConfiguration  **deleting failed**     1 error

Diagnostics:
  aws:ec2:LaunchConfiguration (online-sandbox-2-eks-cluster-nodeLaunchConfiguration):
    error: Plan apply failed: deleting urn:pulumi:online-sandbox-vpc-0d18addcc5815ae23::eks-cluster::eks:index:Cluster$aws:ec2/launchConfiguration:LaunchConfiguration::online-sandbox-2-eks-cluster-nodeLaunchConfiguration: ResourceInUse: Cannot delete launch configuration online-sandbox-2-eks-cluster-nodeLaunchConfiguration-dc81314 because it is attached to AutoScalingGroup online-sandbox-2-eks-cluster-6c6f620d-NodeGroup-132ENU1JW8B2B
        status code: 400, request id: 596c44a8-2334-11e9-97f9-6729550f923e
and
pulumi destroy
similarly fails:
Copy code
Destroying (tableau/online-sandbox-vpc-0d18addcc5815ae23):

     Type                            Name                                                  Status                  Info
     pulumi:pulumi:Stack             eks-cluster-online-sandbox-vpc-0d18addcc5815ae23
 -   └─ aws:ec2:LaunchConfiguration  online-sandbox-2-eks-cluster-nodeLaunchConfiguration  **deleting failed**     1 error

Diagnostics:
  aws:ec2:LaunchConfiguration (online-sandbox-2-eks-cluster-nodeLaunchConfiguration):
    error: Plan apply failed: deleting urn:pulumi:online-sandbox-vpc-0d18addcc5815ae23::eks-cluster::eks:index:Cluster$aws:ec2/launchConfiguration:LaunchConfiguration::online-sandbox-2-eks-cluster-nodeLaunchConfiguration: ResourceInUse: Cannot delete launch configuration online-sandbox-2-eks-cluster-nodeLaunchConfiguration-dc81314 because it is attached to AutoScalingGroup online-sandbox-2-eks-cluster-6c6f620d-NodeGroup-132ENU1JW8B2B
        status code: 400, request id: 336158ed-2334-11e9-bcbc-199ef247c334
Is there a way to import the ASG into the stack for tracking so it will also get deleted?
g
for some reason the ASG is not tracked in my stack
Do you have the ASG defined in your app and it is missing from your stack? Or is the ASG defined elsewhere?
e
The ASG is all hidden behind
new eks.Cluster
As a workaround I manually deleted the ASG in the console and then the
destroy
went through
but if I wasn't allowed to destroy it and needed to
up
instead I would have been in a jam
g
Right. Did your initial
up
complete successfully or did it error out? I'm wondering if we can reproduce the stack missing your ASG.
e
It errored out as above
g
That was on a stack and set of resources that already existed, correct? That was not the first
up
for those resources?
c
@microscopic-florist-22719 I’m not sure why or how this works, but it looks like this comes in from a tiny CF template. (1) under what circumstances could this result in an error like above, and shoudl I file a bug? (2) I’m sure there’s a good reason, but why use CF at all? cc @early-musician-41645