-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
The new stack.exportValue() feature introduced in #12778 does not seem to work with resource parameters that would be referenced by Ref rather than GetAtt.
Reproduction Steps
const someSampleRole = new iam.Role(this, 'SomeSampleRole', {});
this.exportValue(someSampleRole.roleName);Results in: Error: exportValue: either supply 'name' or make sure to export a resource attribute (like 'bucket.bucketName')
What did you expect to happen?
Trying to break a deadly embrace where I used the roleName and roleArn in another stack. The roleArn is a GetAtt and the roleName is actually a Ref. The roleArn worked great, but roleName will not synthesize without me specifying the full export name which looks something like STACK_NAME:ExportsOutputRefSomeSampleRole1D3A83A01C1B4250.
What actually happened?
Error: Error: exportValue: either supply 'name' or make sure to export a resource attribute (like 'bucket.bucketName')
Environment
- CDK CLI Version : 1.88.0
- Framework Version: 1.88.0
- Node.js Version: v10.23.2
- OS : Amazon Linux 2
- Language (Version): TypeScript (3.8.3)
Other
N/A
This is 🐛 Bug Report