Cox-Automotive / terraform-provider-alks

Terraform Provider for ALKS
MIT License
37 stars 23 forks source link

Add IAM role name validation #162

Closed cdowney closed 2 years ago

cdowney commented 2 years ago

This will add validation for name and name_prefix on the alks_iamrole and alks_iamtrustrole resources.

The for name, validations include: 1) name value length is <= 64 characters 2) name value matches the regex in AWS docs

The for name_prefix, validations include: 1) name_prefix value + unique suffix length is <= 64 2) name_prefix value matches the regex in AWS docs

Adding in this validation will ensure that IAM role naming issues are caught during the tf plan rather than during tf apply.

americk0 commented 2 years ago

Hey Cory, thanks for contributing. I like the changes you've made and just had a small thing I wanted to tweak which required I open a new branch so I'm closing this PR in favor of #163 which has all of these changes in it. Since I added some code myself I'll get one of my teammates to review so that we can merge it in

cdowney commented 2 years ago

Hey Cory, thanks for contributing. I like the changes you've made and just had a small thing I wanted to tweak which required I open a new branch so I'm closing this PR in favor of #163 which has all of these changes in it. Since I added some code myself I'll get one of my teammates to review so that we can merge it in

No problem, thank you!