Populate custom resources CDK stacks with region and account #12575
Labels
bug
Something isn't working
custom-cdk
Issues related to custom CDK resource functionality
p2
regression
Flair label to track regressions
How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
11.1.1
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
When using a custom CDK deployment and trying to reference existing infrastructure, it is expected that the stack refrences a default account and region.
Usually it is possible to setup these values using the documented env variables CDK_DEFAULT_REGION/CDK_DEFAULT_ACCOUNT or AWS_DEFAULT_REGION/AWS_DEFAULT_ACCOUNT
but amplify does not honor these.
A possible solution was suggested in #9360 and a pr provided and an attempt to merge it was done in the v7.6.12 release but it has been reverted and this functionality is still missing/behaviour has reverted to functionality prior to v7.6.12
Expected behavior
being able to create a reference object to an existing resource like :
and not getting the 'missing env' error:
Reproduction steps
...
Project Identifier
No response
Log output
No response
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: