Closed r-token closed 1 year ago
Hey Ryan!
Unfortunately the workaround is the right approach. Since Lift variables are resolved into !Ref ...
, you cannot use them inside strings with interpolation like you did.
I'm going to close this one as this is the expected behavior, let me know if you have other ideas!
Description
I'm using the
storage
construct to create an S3 bucket and need to refer to the ARN + /* for various IAM permissions.Referring to
${construct:myBucket.bucketArn}/*
, though, throws a MalformedPolicyDocument error that saysResource [object Object]/* must be in ARN format or "*"
Is there a way to get the full ARN and then append the
/*
for things likes3:GetObject
ands3:PutObject
without doing the wholeFn::Join
dance?How to Reproduce
The following yaml will reproduce this error:
Referencing the construct and appending
/*
will throw theResource [object Object]/* must be in ARN format or "*"
error mentioned above.Additional Information
Versions:
Fn::Join
workaround: