Hey guys, opening this to a little discussion, what are some of the tradeoffs that you consider when deciding to create a Pulumi-backed IAM Policy Document via ONE of the following mechanisms:
1. Invoking
aws.iam.getPolicyDocument (function approach)
2. Assigning a variable of type
aws.iam.PolicyDocument (interface approach)
3. JSON.stringify approach e.g. (raw approach, inline or file, etc.)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const policy = new aws.iam.Policy("policy", {
name: "test_policy",
path: "/",
description: "My test policy",
policy: JSON.stringify({
Version: "2012-10-17",
Statement: [{
Action: ["ec2:Describe*"],
Effect: "Allow",
Resource: "*",
}],
}),
});
I'm also interested on how you guys are approach authoring them too, so if you have any unique practices, I'm interested to see!