This message was deleted.
# aws
s
This message was deleted.
l
In general in Pulumi, getPolicyDocument isn't needed. You can assign a simple JSON object (technically of type aws.iam.PolicyDocument) to a Role as its policy (or to anything that has a policy). Would that make testing easier?
An example from my code base
m
Alright. Yes. That makes sense. I haven’t thought about that. I’ll give that a try. I wasn’t aware we could just assign a JSON. For some reason I thought it only accepted json string 🤦‍♂️ Thank you @little-cartoon-10569!
👍 1
But what is then the use case of
getPolicyDocument
.
l
I think: Terraform.
It's a carryover from the Terraform code where you can't write JSON.
m
Oh yes. Off course. Good point.
Well, that will certainly simplify testing!
💯 1