(deploy): Can't deploy stack with cross region reference with --exclusively flag
- Dominant language
- TypeScript
- Stars
- 105
- Forks
- 122
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 71
Description
### Describe the bug
I have a cross region project (using crossRegionReferences) with 3 stacks. Two are deployed in eu-central-1 and the other (cloudfront distribution) is on us-east-1.
If I run `cdk deploy -e stack-common` it works perfectly. However if I run the `cdk deploy -e stack-cloudfront` it fails with:
```❌ stack-common failed: ToolkitError: Failed to create ChangeSet cdk-deploy-change-set on stack-common: FAILED, Parameters: [ssm:/cdk/exports/stack-common/] cannot be found. ```
I know the distribution exists in us-east-1 and I can see the parameter exists. This problem is resolved if I run without the flag --exclusively.
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Last Known Working CDK Library Version
_No response_
### Expected Behavior
Running cdk deploy --exclusively shouldn't report that resource cannot be found
### Current Behavior
❌ stack-common failed: ToolkitError: Failed to create ChangeSet cdk-deploy-change-set on stack-common: FAILED, Parameters: [ssm:/cdk/exports/stack-common/] cannot be found. `
### Reproduction Steps
cdk deploy -e stack-us-east-1
cdk deploy -e stack-outside us-east-1
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### AWS CDK Library version (aws-cdk-lib)
2.221.1
### AWS CDK CLI version
2.1029.2
### Node.js Version
22.22.1
### OS
macos 26.1
### Language
Python
### Language Version
python 3.12.10
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.