fast-florist-41572
08/11/2021, 9:24 AMpulumi.Any
where I want to define the resources as follows
"Resource": []interface{}{
pulumi.Sprintf("arn:aws:s3:::%s/AWSLogs/%s/*", ctBucket.ID(), logAccount.ID()),
},
That works fine if I inline it
But when I use a function instead like
func createS3BucketPolicyResources(bucket *s3.Bucket, accounts []*organizations.Account) []pulumi.StringOutput {
var resources []pulumi.StringOutput
for _, account := range accounts {
resource := pulumi.Sprintf("arn:aws:s3:::%s/AWSLogs/%s/*", bucket.ID(), account.ID())
resources = append(resources, resource)
}
return resources
}
I get an error marshaling properties: awaiting input property policy: cannot marshal an input of type pulumi.StringOutput with element type string as a value of type pulumi.StringOutput