resource "aws_acm_certificate" "my_cert" {
domain_name = "*.some.domain"
validation_method = "NONE"
tags {
Creator = "Terraform"
Name = "my-cert"
Environment = "${var.env}"
}
}
Creates the acm certificate in Terraform based on existing ACM certificate using NONE as validation_method as specified in documentation https://www.terraform.io/docs/providers/aws/r/acm_certificate.html
Throws an error
According to https://github.com/terraform-providers/terraform-provider-aws/blob/80e4ae53941c6fc87239f1d704e2dfe6a4dec3b6/aws/resource_aws_acm_certificate.go#L166 NONE is returned if neither DNS or EMAIL are specified but even if an empty string is set as value for validation_method argument, same error as above. Removing the argument is not possible as it is required.
terraform applyterraform plan show nothing wrong by the way.
Hi @abrechon ๐ Sorry you're running into trouble here.
It looks like there might be some confusion about supporting existing certificates with the aws_acm_certificate resource.
Currently we only support the following scenarios with the aws_acm_certificate resource:
terraform import). This is currently where we use the NONE verification method.We currently do not support creating a certificate with a pre-existing private key+chain+certificate with the Terraform resource yet (e.g. implementing the ACM ImportCertificate API call), but there is already a separate feature request for that: #3560
If you believe the documentation can be clearer in this regard, please let us know. ๐ Otherwise, I'm going to close this issue as NONE is not a valid verification method when creating certificates and we have an earlier feature request issue for supporting creating certificates via ImportCertificate.
LGTM @bflad, i think yes the documentation could be a little more clearer to avoid misunderstanding.
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!
Most helpful comment
Hi @abrechon ๐ Sorry you're running into trouble here.
It looks like there might be some confusion about supporting existing certificates with the
aws_acm_certificateresource.Currently we only support the following scenarios with the
aws_acm_certificateresource:terraform import). This is currently where we use theNONEverification method.We currently do not support creating a certificate with a pre-existing private key+chain+certificate with the Terraform resource yet (e.g. implementing the ACM
ImportCertificateAPI call), but there is already a separate feature request for that: #3560If you believe the documentation can be clearer in this regard, please let us know. ๐ Otherwise, I'm going to close this issue as
NONEis not a valid verification method when creating certificates and we have an earlier feature request issue for supporting creating certificates viaImportCertificate.