Have a question? Please checkout our Slack Community or visit our Slack Archive.

Describe the Feature
Add validation to secrets and map_secrets's valueFrom to ensure it's an arn
Expected Behavior
Fail if any valueFrom does not use a valid arn format
Use Case
At the moment, this will error after an apply. An input validation would catch it earlier.
Describe Ideal Solution
Input var validation using a regex.
For example, this is a valid arn
arn:aws:ssm:us-east-2:snip:parameter/global/snip
Perhaps the regex from here hashicorp/terraform-provider-aws#8307
^arn:[\w-]+:([a-zA-Z0-9\-])+:([a-z]{2}-((?:gov|iso|isob)-)?[a-z]+-\d{1})?:(\d{12})?:(.*)$
or even simpler
Alternatives Considered
- Apply, fail, update.
- Be more vigilant when passing in inputs vars
Additional Context
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
Add validation to
secretsandmap_secrets'svalueFromto ensure it's an arnExpected Behavior
Fail if any
valueFromdoes not use a valid arn formatUse Case
At the moment, this will error after an apply. An input validation would catch it earlier.
Describe Ideal Solution
Input var validation using a regex.
For example, this is a valid arn
Perhaps the regex from here hashicorp/terraform-provider-aws#8307
or even simpler
Alternatives Considered
Additional Context