Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

ACM certificate error following update #7

Closed
webvictim opened this issue Dec 9, 2022 · 0 comments · Fixed by #8
Closed

ACM certificate error following update #7

webvictim opened this issue Dec 9, 2022 · 0 comments · Fixed by #8

Comments

@webvictim
Copy link
Contributor

Error: Invalid index
│
│   on .terraform/modules/teleport-cluster-terraform/acm.tf line 22, in resource "aws_route53_record" "cert_validation":
│   22:     for dvo in aws_acm_certificate.cert[0].domain_validation_options : dvo.domain_name => {
│     ├────────────────
│     │ aws_acm_certificate.cert is empty tuple
│
│ The given key does not identify an element in this collection value: the collection has no elements.

This shouldn't happen when use_acm is false.

webvictim added a commit that referenced this issue Dec 9, 2022
This was an oversight introduced in #5

Fixes #7
webvictim added a commit that referenced this issue Jan 12, 2023
* Only do ACM cert validation if ACM is actually in use

This was an oversight introduced in #5

Fixes #7

* Usage of aws_route53_record.cert_validation needs to become aws_route53_record.cert_validation[0]

Co-authored-by: Philippe M. Chiasson <gozer@goteleport.com>
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.

1 participant