An open API service indexing awesome lists of open source software.

https://github.com/trussworks/terraform-aws-acm-cert

Creates a TLS certificate using AWS ACM for domains hosted on Route53.
https://github.com/trussworks/terraform-aws-acm-cert

acm aws-acm aws-route53 route53 terraform terraform-modules

Last synced: 6 months ago
JSON representation

Creates a TLS certificate using AWS ACM for domains hosted on Route53.

Awesome Lists containing this project

README

          

Creates a TLS certificate using AWS ACM for domains hosted on Route53.
The ACM certificate can also be attached to an ALB listener.

Creates the following resources:

- ACM certificate
- Route53 record used to validate TLS certificate
- Optional association with an ALB listener

## Usage

```hcl
module "acm_cert" {
source = "trussworks/acm-cert/aws"

alb_listener_arn = "arn:aws:elasticloadbalancing:us-west-2:..."
domain_name = "www.example.com"
zone_id = "ABCDEFGHIGJLK1234"
}
```

## Requirements

| Name | Version |
|------|---------|
| terraform | >= 1.0 |
| aws | >= 3.0 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 3.0 |

## Resources

| Name | Type |
|------|------|
| [aws_acm_certificate.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate) | resource |
| [aws_acm_certificate_validation.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate_validation) | resource |
| [aws_lb_listener_certificate.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lb_listener_certificate) | resource |
| [aws_route53_record.caa](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |
| [aws_route53_record.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| domain_name | Domain name to associate with the ACM certificate. | `string` | n/a | yes |
| zone_id | The Route53 zone id for which the certificate should be verified and issued. | `string` | n/a | yes |
| alb_listener_arn | Associate ACM certificate to an ALB listener. | `string` | `""` | no |
| caa_records | Add CAA records to route53. | `list(string)` | `[]` | no |

## Outputs

| Name | Description |
|------|-------------|
| acm_arn | The ARN of the validated ACM certificate. |

## Developer Setup

Install dependencies (macOS)

```shell
brew install pre-commit go terraform terraform-docs
pre-commit install --install-hooks
```