white-secretary-18260
03/25/2021, 6:54 PMOutput<T>
(in typescript) to use a generated bucket name new-bucket-[the magic hash number]
in a previous task as a string value in an IAM policy in a later script:
const importPolicy = {
Version: '2012-10-17',
Statement: [
{
Sid: 's3Import',
Action: [
's3:GetObject',
's3:ListBucket'
],
Effect: 'Allow',
Resource: [
`arn:aws:s3:::${newS3.bucket}`, // <-- does not work
`arn:aws:s3:::${newS3.bucket}/*` // <-- does not work
]
}
]
}
billowy-army-68599
03/25/2021, 6:59 PMwhite-secretary-18260
03/25/2021, 7:06 PMOutput<string>
I need Input<string>
, I think I saw an example on converting this….microscopic-dress-1605
03/25/2021, 7:08 PMOuput<string>
to an Input<string>
.Input
to an Output
you need pulumi.output(input)
billowy-army-68599
03/25/2021, 7:12 PMwhite-secretary-18260
03/25/2021, 7:13 PMlittle-cartoon-10569
03/25/2021, 7:55 PMarn
property, does it do what you need? That would allow you to avoid any interpolation.white-secretary-18260
03/25/2021, 11:22 PM.bucket
property and it worked fine (need to restrict to paths in the policy. Thanks!