terraform-aws-modules / terraform-aws-acm

Terraform module to create AWS ACM resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/acm/aws
Apache License 2.0
184 stars 230 forks source link

feat: Cross-account DNS and ACM resource creation #114

Closed antonbabenko closed 2 years ago

antonbabenko commented 2 years ago

Follow up for #108

Fixes #108

PS: I had no push access to the original fork, so I have created this PR instead.

antonbabenko commented 2 years ago

@dannyibishev Thank you for the initial PR.

antonbabenko commented 2 years ago

This PR is included in version 4.1.0 :tada:

OneBadSanta commented 2 years ago

I am having difficulty getting an example included in this PR to work

https://github.com/terraform-aws-modules/terraform-aws-acm/blob/master/examples/complete-dns-validation/main.tf#L31-L52

When looking at main.tf, i do not see these providers located in resource sections. Am I missing something? How do I use this for cross-account?

Thanks

antonbabenko commented 2 years ago

@OneBadSanta providers blocks with different aliases (acm and route53) can be declared as shown in README here - https://github.com/terraform-aws-modules/terraform-aws-acm#usage-with-route53-dns-validation-and-separate-aws-providers . In the example you point, both instance of AWS provider are the same (aws).

OneBadSanta commented 2 years ago

@antonbabenko Thanks for the response. Right. I understand what you're saying. In that the module needs to be split apart in order to use 2 different providers. For me personally, this seems to miss the point of the usefulness of having a module for this purpose. I guess the question how is it possible that example one even works?

https://github.com/terraform-aws-modules/terraform-aws-acm/blob/master/examples/complete-dns-validation/main.tf#L13-L52

The resources do not in v4.1.0 do not have multiple providers. There is no mention of aws.acm and aws.dns, only the global default aws.

  providers = {
    aws.acm = aws,
    aws.dns = aws
  }

Am I missing something? Does my questions make sense?

Thanks

github-actions[bot] commented 1 year ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.