azavea / terraform-aws-acm-certificate

A Terraform module to create an Amazon Certificate Manager (ACM) certificate with Route 53 DNS validation.
Apache License 2.0
47 stars 41 forks source link
amazon-web-services aws aws-acm aws-route53 terraform terraform-modules

terraform-aws-acm-certificate

CircleCI

A Terraform module to create an Amazon Certificate Manager (ACM) certificate with Route 53 DNS validation.

Usage

When making use of this module, ensure that either the AWS_DEFAULT_REGION or AWS_REGION environment variable is set. This helps bypass validation checks that want the provider blocks within this module to have a region attribute specified.

provider "aws" {
  region = "us-east-1"
  alias  = "certificates"
}

provider "aws" {
  region = "us-west-2"
  alias  = "dns"
}

resource "aws_route53_zone" "default" {
  name = "azavea.com"
}

module "cert" {
  source = "github.com/azavea/terraform-aws-acm-certificate"

  providers = {
    aws.acm_account     = "aws.certificates"
    aws.route53_account = "aws.dns"
  }

  domain_name                       = "azavea.com"
  subject_alternative_names         = ["*.azavea.com"]
  hosted_zone_id                    = "${aws_route53_zone.default.zone_id}"
  validation_record_ttl             = "60"
  allow_validation_record_overwrite = true
}

Variables

Outputs