glassechidna / stackit

Cross-platform CloudFormation CLI tool for easy synchronous and idempotent stack updates
Apache License 2.0
37 stars 7 forks source link

stackit hangs when run after import changeset #50

Open tekumara opened 3 years ago

tekumara commented 3 years ago

stackit just hangs without any indication of what's happening:

$ stackit up --stack-name s3-buckets --template infra/cloudformation/s3-buckets.yaml --region us-east-1
stackit version 0.0.39
tekumara commented 3 years ago

This was on a stack that I had created by importing resources. I updated the stack using another tool (parfait). The stack is now in a state that stackit is happy with, and stackit is no longer hanging.

tekumara commented 3 years ago

Can reproduce this reliably by creating and executing an import change set, eg:

    aws cloudformation create-change-set                                                \
        --stack-name $(stackname) --change-set-name $(LogicalResourceId)ImportChangeSet \
        --change-set-type IMPORT                                                        \
        --resources-to-import "[{\"ResourceType\":\"AWS::S3::Bucket\",\"LogicalResourceId\":\"$(LogicalResourceId)\",\"ResourceIdentifier\":{\"BucketName\":\"$(BucketName)\"}}]"    \
        --template-body file://infra/cloudformation/s3-buckets.yaml
    aws cloudformation describe-change-set --change-set-name $(LogicalResourceId)ImportChangeSet --stack-name $(stackname)
    aws cloudformation execute-change-set --change-set-name $(LogicalResourceId)ImportChangeSet --stack-name $(stackname)

And then try and run stackit as above.