Terraform module to manage certificates in AWS Certificate Manager
APACHE-2.0 License
Terraform module to manage certificates in AWS Certificate Manager.
This module supports creating validation records in zones hosted in the same account as the certificate and for zones hosted in a different account. To support this use case, an additional provider needs to be passed to the module as shown below.
provider "aws" {}
data "aws_route53_zone" "selected" {
name = "myzone.com."
}
module "certificate" {
source = "schubergphilis/mcaf-certificate/aws"
providers = { aws.route53 = aws }
common_name = "www.myzone.com"
zone_id = data.aws_route53_zone.selected.zone_id
}
provider "aws" {}
provider "aws" {
alias = "route53"
// Configuration for the remote account
// ...
}
data "aws_route53_zone" "selected" {
name = "myzone.com."
}
module "certificate" {
source = "schubergphilis/mcaf-certificate/aws"
providers = { aws.route53 = aws.route53 }
common_name = "www.myzone.com"
zone_id = data.aws_route53_zone.selected.zone_id
}
Name | Version |
---|---|
terraform | >= 1.7 |
aws | ~> 5.0 |
Name | Version |
---|---|
aws | ~> 5.0 |
aws.route53 | ~> 5.0 |
No modules.
Name | Type |
---|---|
aws_acm_certificate.default | resource |
aws_route53_record.default | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
common_name | Certificate common name | string |
n/a | yes |
zone_id | Route53 Zone ID to create validation records in | string |
n/a | yes |
subject_alternative_names | List of Subject Alternative Names (SANs) to include in the certificate | list(string) |
null |
no |
tags | Map of tags to add to resources | map(string) |
null |
no |
Name | Description |
---|---|
arn | Certificate ARN |
domain_name | Domain name for which the certificate is issued |
id | Certificate ID |
not_after | Expiration date and time of the certificate |
not_before | Start of the validity period of the certificate |
status | Status of the certificate |
Copyright: Schuberg Philis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.