elegant-dog-76355
02/27/2023, 5:48 PM"Principal": {{
"Service": "<http://s3.amazonaws.com|s3.amazonaws.com>"
}},
"Action": "sqs:SendMessage",
"Resource": "arn:aws:sqs:{get_aws_region_name()}:{get_aws_account_no()}:queue-3ca39a5"
}}
but if I try to use the arn output of a resource like so:
"Resource": "{queue.arn}"
I get the error: error: aws:sqs/queuePolicy:QueuePolicy resource 'test' has a problem: "policy" contains an invalid JSON: invalid character '\n' in string literal. Examine values at 'QueuePolicy.Policy'.
This happens even if i cast the queue.arn
into a string
variable and use the strip
function to remove any \n
. IF there a way to pass the output or a resource (like the arn
) into a policy without getting this error ?echoing-dinner-19531
02/27/2023, 5:48 PMelegant-dog-76355
02/28/2023, 9:22 AM