brief-car-60542
05/21/2023, 5:09 AMaws.iam.getPolicyDocument
, I feel there maybe some reason on when the getPolicyDocument
get interpolated.const role = new aws.iam.Role(
`${redshiftName}-s3-access-role`,
{
...
},
{ provider: config.providers[configEnvironment] as aws.Provider },
);
const keyPolicy = aws.iam.getPolicyDocument(
{
statements: [
{
actions: ['kms:Encrypt'],
effect: 'Allow',
principals: [
{
type: 'AWS',
identifiers: [`${role?.arn}`],
},
],
resources: ['*'],
sid: 'Allow use of the key.',
},
],
},
);
[0]: "Calling [toString] on an [Output<T>] is not supported.\n\nTo get the value of an Output<T> as an Output<string> consider either:\n1: o.apply(v => `prefix${v}suffix`)\n2: pulumi.interpolate `prefix${v}suffix`\n\nSee <https://pulumi.io/help/outputs> for more details.\nThis function may throw in a future version of @pulumi/pulumi."
${role?.arn}
is the value I want.little-cartoon-10569
05/21/2023, 8:19 PM