Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem using pre-created ACM cert (Invalid index) #80

Closed
richardcase opened this issue Nov 12, 2019 · 3 comments · Fixed by #81
Closed

Problem using pre-created ACM cert (Invalid index) #80

richardcase opened this issue Nov 12, 2019 · 3 comments · Fixed by #81

Comments

@richardcase
Copy link

I am running into the following error when using a pre-existing certificate:

Error: Invalid index

  on .terraform/modules/atlantis.acm/terraform-aws-modules-terraform-aws-acm-566067c/main.tf line 6, in locals:
   6:   validation_domains = [for k, v in aws_acm_certificate.this[0].domain_validation_options : tomap(v) if contains(local.distinct_domain_names, v.domain_name)]
    |----------------
    | aws_acm_certificate.this is empty tuple

The given key does not identify an element in this collection value.

This is an issue with the underlying ACM module, see here. However, there is a PR open for a change to the module.

This occurs if you explicit supply a certificate ARN when using the atlantis module:

module "atlantis" {
  source  = "terraform-aws-modules/atlantis/aws"
  version = "~> 2.0"

  name = "atlantis"

  # ACM (SSL certificate) 
  certificate_arn = module.acm.this_acm_certificate_arn
...
antonbabenko added a commit that referenced this issue Nov 12, 2019
* Updated version of terraform-aws-acm module (fixed #80)

* Updated pre-commit hooks
@antonbabenko
Copy link
Member

Thanks for reporting this issue!

terraform-aws-acm module has been just fixed, so I've updated this one also - v2.3.0 of this module is out.

@richardcase
Copy link
Author

Thanks @antonbabenko

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants