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
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by