blue-jelly-98553
11/06/2022, 9:49 PMpulumi.FileAsset
? Wanted to define an AWS policy in a policy.json
and then reference that file the code below, but pulumi preview is throwing this error when trying that method error: expected string or JSON map; got *resource.Asset
# Create a policy that allows the Lambda role to write to CloudWatch Logs
cloudwatch_policy = aws.iam.RolePolicy(
resource_name='pulumi-lambda-test-policy',
role=lambda_role.id,
policy=pulumi.FileAsset('./policies/cloudwatch_policy.json')
)
little-cartoon-10569
11/06/2022, 10:55 PMfs.readFileSync()
.blue-jelly-98553
11/06/2022, 11:00 PM