jeromegamez / terraform-aws-enforce-mfa

A terraform module to enforce MFA for AWS groups and users
https://registry.terraform.io/modules/jeromegamez/enforce-mfa
MIT License
24 stars 17 forks source link

Adapt the code to v0.12.x #1

Closed ainestal closed 4 years ago

ainestal commented 4 years ago

Some code changes so the module can be used with the new terraform v0.12.x version.

jeromegamez commented 4 years ago

@ainestal Thanks for the additional commits, I didn't get notified, so sorry for the late reply. Could you point me to the docs where it the &{...} notation is described instead of using $${...}?

I can't really test the changes at the moment, so I'm asking a lot of questions to make as sure as possible that I don't oversee something 😅

jeromegamez commented 4 years ago

While looking through the AWS docs and the policies I saw that https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_examples_aws_my-sec-creds-self-manage.html uses the ${...}s, and I used $${...} to escape the $ sign... When using &{...}, wouldn't this break then?

ainestal commented 4 years ago

@jeromegamez you can see the &{...} notation here https://www.terraform.io/docs/providers/aws/d/iam_policy_document.html#context-variable-interpolation

I tested it and it works fine :)

jeromegamez commented 4 years ago

Thank you for the link, I assumed that you got it working already, just wanted to be sure! I'll merge this and create a 2.0 release so that we can concentrate on #2 🎉