Closed unacceptable closed 3 years ago
I'd be happy to put in a PR for this if someone could point me in the right direction. In the mean time I just updated my .tflint.hcl in my module like so:
# null path will default to "/" (Optional)
# https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role#path
rule "aws_iam_role_invalid_path" {
enabled = false
}
If you intend for the value to be unset and for a provider or upstream default to be used, it's better to use null
. You can have a look at how the roles in this repo are generated. A change would have broader implications and wouldn't just apply to this one rule.
@bendrucker,
I didn't know that was a thing. I will have to give that a try. Thanks for the information.
Respectfully, Robert J.
Problem statement
When writing a terraform module with a
var.path
as the IAM Role path the following error is thrown:I believe that the regex pattern should be something like:
(^(\x{002F})|(\x{002F}[\x{0021}-\x{007F}]+\x{002F})$|^$)
to account for modules with variables that default to empty strings (which the provider will really default to/
).Version