I have got an issue with Terraform when trying to create certificate and check for its validation.
I got this terraform file:
resource "aws_acm_certificate" "api_cert" {
domain_name = "google.com"
validation_method = "DNS"
}
output "domain_validation" {
value = "${aws_acm_certificate.api_cert.domain_validation_options}"
description = "Certificate domain name validation options"
}
resource "aws_acm_certificate_validation" "api_cert" {
certificate_arn = "${aws_acm_certificate.api_cert.arn}"
timeouts {
create = "2h"
}
}
We are using DNS servers out of AWS so I need to get domain_validation_options before the job is finished.
This is what I need :
- Terraform creates certificate
- Terraform prints domain_validation_options
- I change manually DNS records so certificate can be validated
- Run certificate_validation in terraform
- Terraform creates ELB with validated certificate
With file like this I get domain_validation_options after Step 4 fails...