sparse-intern-71089
03/05/2020, 1:14 AMfaint-table-42725
03/05/2020, 1:36 AMfaint-table-42725
03/05/2020, 1:37 AMswift-painter-31084
03/05/2020, 4:00 AMconst policy = new aws.iam.Policy(
`${name}-secret-reader`,
{
path: `/secrets/${name}`,
policy: {
Version: "2012-10-17",
Statement: [
{
Action: ["ssm:getParameter"],
Effect: "Allow",
Resource: parameterStore.arn
}
]
}
}
);
Instead of trying to make a correctly formatted JSON document that validates as IAM policy, Pulumi gives you properties to work with just like other resources, and gives you some intellisense against known types (like I can ctrl+shift in VsCode and get the valid strings for Version ie. "2012-10-17"calm-quill-21760
03/05/2020, 9:07 PMcalm-quill-21760
03/05/2020, 9:08 PMcalm-quill-21760
03/05/2020, 9:24 PMconst policy = {
"Version": "2012-10-17",
"Statement": [
{
"Principal": [
{
"AWS": "*"
}
],
"Effect": "Allow",
"Action": [
"kms:*"
],
"Resource": "*"
}
]
};
calm-quill-21760
03/05/2020, 9:47 PM