Hi @Jim420,
You can create the resource ARNs you are looking for with a for
expression like this:
resources = [
for bn in var.bn : "${var.arn}${bn}/*"
]
Unless you will need to override arn:aws:s3:::
in some cases or will use it in many locations I’d probably just write it literally in the expression above, but I used the variable here to provide the most direct answer to your question.
Does that help you get the result you needed here?
(Unfortunately the forum interpreted your code sequences as block quotes rather than code, so they may have been corrupted and I might not be reading them correctly. To ensure correct literal formatting of your code blocks, it’s best to use the “Preformatted Text” button on the editor toolbar (it looks like a pair of pointy brackets, <>
) to add markup so that the forum can tell that you intend that portion to be code. If what I shared above doesn’t answer your question because I misread your examples, it’d be great if you could edit your post to improve the formatting. Thanks!)