Terraform module which creates ACM certificate resources on AWS.
Provision ACM certificate and Route53 record for certificates validation.
This module provides recommended settings:
- Use DNS to validate domain ownership
- Renew certificates automatically
module "certificate" {
  source      = "git::https://github.com/tmknom/terraform-aws-acm-certificate.git?ref=tags/1.1.0"
  domain_name = "example.com"
  zone_id     = "${aws_route53_zone.default.zone_id}"
}module "certificate" {
  source      = "git::https://github.com/tmknom/terraform-aws-acm-certificate.git?ref=tags/1.1.0"
  domain_name = "example.com"
  zone_id     = "${aws_route53_zone.default.zone_id}"
  ttl = "120"
  subject_alternative_names = [
    "stg.example.com",
    "dev.example.com",
  ]
  tags = {
    Environment = "prod"
  }
  enabled         = true
  timeouts_create = "5m"
}| Name | Description | Type | Default | Required | 
|---|---|---|---|---|
| domain_name | A domain name for which the certificate should be issued. | string | - | yes | 
| zone_id | The ID of the hosted zone in which create validation records. | string | - | yes | 
| enabled | Set to false to prevent the module from creating anything. | string | true | no | 
| subject_alternative_names | A list of domains that should be Subject Alternative Names in the issued certificate. | list | [] | no | 
| tags | A mapping of tags to assign to the resource. | map | {} | no | 
| timeouts_create | THow long to wait for a certificate to be issued. | string | 5m | no | 
| ttl | The TTL of the validation records. | string | 60 | no | 
| Name | Description | 
|---|---|
| acm_certificate_arn | The ARN of the certificate. | 
| acm_certificate_domain_validation_options | A list of attributes to feed into other resources to complete certificate validation. | 
| acm_certificate_id | The ARN of the certificate. | 
| route53_record_fqdns | FQDN built using the zone domain and name. | 
| route53_record_names | The name of the record. | 
export TF_VAR_domain_name=example.orgexport AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=ap-northeast-1git clone [email protected]:tmknom/terraform-aws-acm-certificate.git
cd terraform-aws-acm-certificate
make installcheck-format                   Check format code
cibuild                        Execute CI build
clean                          Clean .terraform
docs                           Generate docs
format                         Format code
help                           Show help
install                        Install requirements
lint                           Lint code
release                        Release GitHub and Terraform Module Registry
terraform-apply-complete       Run terraform apply examples/complete
terraform-apply-minimal        Run terraform apply examples/minimal
terraform-destroy-complete     Run terraform destroy examples/complete
terraform-destroy-minimal      Run terraform destroy examples/minimal
terraform-plan-complete        Run terraform plan examples/complete
terraform-plan-minimal         Run terraform plan examples/minimal
upgrade                        Upgrade makefile
Bump VERSION file, and run make release.
Apache 2 Licensed. See LICENSE for full details.