When I run cdk deploy --all
to deploy all stacks, as suggested by the aws docs, I dont get the desired behavior.
If i run cdk list
I get a list of all my stacks as such:
pipeline
pipeline/alpha-stage/externalcommunication (alpha-stage-externalcommunication)
pipeline/alpha-stage/vpc (alpha-stage-vpc)
pipeline/alpha-stage/intercommunication (alpha-stage-intercommunication)
pipeline/alpha-stage/storage (alpha-stage-storage)
pipeline/alpha-stage/service (alpha-stage-service)
pipeline/alpha-stage/observability (alpha-stage-observability)
if I run cdk deploy --all
only the pipeline stack is created and deployed
[WARNING] aws-cdk-lib.aws_ec2.LaunchTemplateProps#keyName is deprecated.
- Use `keyPair` instead - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2-readme.html#using-an-existing-ec2-key-pair
This API will be removed in the next major release.
✨ Synthesis time: 3.02s
pipeline: deploying... [1/1]
pipeline: creating CloudFormation changeset...
✅ pipeline (no changes)
✨ Deployment time: 3.57s
Stack ARN:
arn:aws:cloudformation:eu-west-1:730335428471:stack/pipeline/2667ad20-0315-11ef-906b-0a89280ac13b
✨ Total time: 6.59s
I originally thought that maybe it wasnt seeing any differences in the other stacks, but when i deploy the stack manually it does see the diff and deploy it
cdk deploy pipeline/alpha-stage/externalcommunication --profile cs-dev
[WARNING] aws-cdk-lib.aws_ec2.LaunchTemplateProps#keyName is deprecated.
- Use `keyPair` instead - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2-readme.html#using-an-existing-ec2-key-pair
This API will be removed in the next major release.
✨ Synthesis time: 3.39s
alpha-stage-externalcommunication: start: Building cba1532de344d46fde76a38d8b956373267f9fbc4a7fe247ce6caa08f05a9fde:730335428471-eu-west-1
alpha-stage-externalcommunication: success: Built cba1532de344d46fde76a38d8b956373267f9fbc4a7fe247ce6caa08f05a9fde:730335428471-eu-west-1
alpha-stage-externalcommunication: start: Publishing cba1532de344d46fde76a38d8b956373267f9fbc4a7fe247ce6caa08f05a9fde:730335428471-eu-west-1
alpha-stage-externalcommunication: success: Published cba1532de344d46fde76a38d8b956373267f9fbc4a7fe247ce6caa08f05a9fde:730335428471-eu-west-1
pipeline/alpha-stage/externalcommunication (alpha-stage-externalcommunication): deploying... [1/1]
alpha-stage-externalcommunication: creating CloudFormation changeset...
[█████▊····················································] (1/10)
2:35:22 PM | UPDATE_IN_PROGRESS | AWS::CloudFormation::Stack | alpha-stage-externalcommunication
2:35:25 PM | CREATE_IN_PROGRESS | AWS::Route53::HostedZone
...
So why is deploy --all
not even attempting to deploy any stack other than pipeline
?