I keep getting an error, and I'm not quite sure ho...
# typescript
m
I keep getting an error, and I'm not quite sure how to get around it:
Copy code
aws:iam:RolePolicy (fooRolePolicy):
    error: aws:iam/rolePolicy:RolePolicy resource 'fooRolePolicy' has a problem: "policy" contains an invalid JSON: invalid character '\n' in string literal
the resource is built like this:
Copy code
new aws.iam.RolePolicy('fooRolePolicy', {
  role: fooRole.id,
  policy: `{
            "Version": "2012-10-17",
            "Statement": [
              {
                "Sid": "AWSCloudTrailCreateLogStream",
                "Effect": "Allow",
                "Action": [
                  "logs:CreateLogStream",
                  "logs:PutLogEvents"
                ],
                "Resource": "${foobarLogGroup.arn}:*"
              }
            ]
          }`,
})