Code Monkey home page Code Monkey logo

terraform-aws-acm-certificate's Introduction

terraform-aws-acm-certificate

Terraform Actions Status Markdown Actions Status YAML Actions Status JSON Actions Status GitHub tag License

Terraform module which creates ACM certificate resources on AWS.

Description

Provision ACM certificate and Route53 record for certificates validation.

This module provides recommended settings:

  • Use DNS to validate domain ownership
  • Renew certificates automatically

Usage

Minimal

module "certificate" {
  source      = "git::https://github.com/tmknom/terraform-aws-acm-certificate.git?ref=tags/2.0.0"
  domain_name = "example.com"
  zone_id     = aws_route53_zone.default.zone_id
}

Complete

module "certificate" {
  source      = "git::https://github.com/tmknom/terraform-aws-acm-certificate.git?ref=tags/2.0.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"
}

Examples

Requirements

Name Version
terraform >= 0.12

Providers

Name Version
aws n/a

Inputs

Name Description Type Default Required
domain_name A domain name for which the certificate should be issued. string n/a yes
zone_id The ID of the hosted zone in which create validation records. string n/a yes
enabled Set to false to prevent the module from creating anything. bool true no
subject_alternative_names A list of domains that should be Subject Alternative Names in the issued certificate. list(string) [] no
tags A mapping of tags to assign to the resource. map(string) {} no
timeouts_create How long to wait for a certificate to be issued. string "5m" no
ttl The TTL of the validation records. number 60 no

Outputs

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.

Development

Development Requirements

Configure environment variables

Terraform variables for examples

export TF_VAR_domain_name=example.org

AWS credentials

export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=ap-northeast-1

Installation

git clone [email protected]:tmknom/terraform-aws-acm-certificate.git
cd terraform-aws-acm-certificate
make install

Makefile targets

apply-complete                 Run terraform apply examples/complete
apply-minimal                  Run terraform apply examples/minimal
check-format                   Check format code
clean                          Clean .terraform
destroy-complete               Run terraform destroy examples/complete
destroy-minimal                Run terraform destroy examples/minimal
diff                           Word diff
docs                           Generate docs
format                         Format code
help                           Show help
install                        Install requirements
lint                           Lint code
plan-complete                  Run terraform plan examples/complete
plan-minimal                   Run terraform plan examples/minimal
release                        Release GitHub and Terraform Module Registry
upgrade                        Upgrade makefile

Releasing new versions

Bump VERSION file, and run make release.

Terraform Module Registry

License

Apache 2 Licensed. See LICENSE for full details.

terraform-aws-acm-certificate's People

Contributors

tmknom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.