Open mattiarossi opened 1 year ago
Marking this as bug as I was able to reproduce this issue.
As an alternative we can use fromAttributes
method to retrieve a vpc using an ID.
Is there any workaround for this without using a specific VPC id?
+1 Just ran into this as well.
A lot of devs are facing this issue w.r.t several custom resources. Why is the PR not merged yet ?
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: