Hi, I have a stack, which has provisioned 8 vms. B...
# aws
a
Hi, I have a stack, which has provisioned 8 vms. But when I try to destroy the stack, only 5 vms are listed in the details, and deleted. 3 vms are left behind, causing related SG and other resources cannot be deleted. The
destroy
command fails with
Copy code
10:31:44    pulumi:pulumi:Stack (xxxx-cluster-medium-0.297-202512030714-b77e8976-b4936n-xxxx):
10:31:44      error: update failed
10:31:44  
10:31:44    aws:ec2:SecurityGroup (security-group-deploy-cluster-medium-0.297-202512030714-b77e8976-b4936n-czentgr-eng):
10:31:44      error: deleting urn:pulumi:medium-0.297-202512030714-b77e8976-b4936n-xxxx::xxx-deploy-cluster::aws:ec2/securityGroup:SecurityGroup::security-group-xxx-cluster-medium-0.297-202512030714-b77e8976-b4936n-xxxx: 1 error occurred:
10:31:44      	* deleting Security Group (sg-063c6e05965cb1c76): DependencyViolation: resource sg-063c6e05965cb1c76 has a dependent object
10:31:44      	status code: 400, request id: d26e743d-7946-43a0-be5f-825b719bcf11
pulumi destroy --yes --refresh --stack ${STACK_NAME}
runs in a Jenkinsfile,
Any possible reason caused the incomplete state in pulumi cloud?
l
Someone may have evicted them?
a
I don't think so. There is no point for anyone to modify the state in pulumi cloud, other than the automation pipeline.
l
I have no other theories. Given that the resources weren't actually deleted, I can't see any other way for the state to forget about them...
e
I'd suggest raising a support ticket for this, if this was state in cloud the service team have audit logs for state data.
👍 1
f
@adamant-lawyer-19698 I suspect that the security group was referenced by some other security group, e.g. load balancer