|
| 1 | +# AWS ACM Certificate |
| 2 | + |
| 3 | +Will create and attempt to validate an certificate in the [AWS ACM service](https://aws.amazon.com/certificate-manager/). This module uses DNS verification so the principal running this needs to be able to write to the supplied Route53 zone. |
| 4 | + |
| 5 | +NOTE: if you intend to use this certificate in a cloudfront distribution it must be created in `us-east-1` region. |
| 6 | + |
| 7 | +## Example |
| 8 | + |
| 9 | +```hcl |
| 10 | +module "cert" { |
| 11 | + source = "github.com/chanzuckerberg/cztack//aws-acm-certificate?ref=v0.40.0" |
| 12 | +
|
| 13 | + # the cert domain name |
| 14 | + cert_domain_name = "..." |
| 15 | +
|
| 16 | + # the route53 zone for validating the `cert_domain_name` |
| 17 | + aws_route53_zone_id = "..." |
| 18 | +
|
| 19 | + # an optional map of alternative : route53_zone_id |
| 20 | + cert_subject_alternative_names = {"foobar.com" = data.aws_route53_zone.foo.id} |
| 21 | +
|
| 22 | + # optional variable for tags |
| 23 | + tags = { |
| 24 | + project = "...", |
| 25 | + env = "...", |
| 26 | + service = "...", |
| 27 | + owner = "..." |
| 28 | + } |
| 29 | +} |
| 30 | +``` |
| 31 | + |
| 32 | +<!-- START --> |
| 33 | +## Requirements |
| 34 | + |
| 35 | +| Name | Version | |
| 36 | +|------|---------| |
| 37 | +| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.0.0 | |
| 38 | + |
| 39 | +## Providers |
| 40 | + |
| 41 | +| Name | Version | |
| 42 | +|------|---------| |
| 43 | +| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.0.0 | |
| 44 | + |
| 45 | +## Modules |
| 46 | + |
| 47 | +No modules. |
| 48 | + |
| 49 | +## Resources |
| 50 | + |
| 51 | +| Name | Type | |
| 52 | +|------|------| |
| 53 | +| [aws_acm_certificate.cert](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate) | resource | |
| 54 | +| [aws_acm_certificate_validation.cert](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/acm_certificate_validation) | resource | |
| 55 | +| [aws_route53_record.cert_validation](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route53_record) | resource | |
| 56 | + |
| 57 | +## Inputs |
| 58 | + |
| 59 | +| Name | Description | Type | Default | Required | |
| 60 | +|------|-------------|------|---------|:--------:| |
| 61 | +| <a name="input_aws_route53_zone_id"></a> [aws\_route53\_zone\_id](#input\_aws\_route53\_zone\_id) | n/a | `string` | n/a | yes | |
| 62 | +| <a name="input_cert_domain_name"></a> [cert\_domain\_name](#input\_cert\_domain\_name) | Like www.foo.bar.com or *.foo.bar.com | `string` | n/a | yes | |
| 63 | +| <a name="input_cert_subject_alternative_names"></a> [cert\_subject\_alternative\_names](#input\_cert\_subject\_alternative\_names) | A map of <alternative\_domain:route53\_zone\_id> | `map(string)` | `{}` | no | |
| 64 | +| <a name="input_tags"></a> [tags](#input\_tags) | Tags to apply to certificate | `map(string)` | `{}` | no | |
| 65 | +| <a name="input_validation_record_ttl"></a> [validation\_record\_ttl](#input\_validation\_record\_ttl) | n/a | `string` | `60` | no | |
| 66 | + |
| 67 | +## Outputs |
| 68 | + |
| 69 | +| Name | Description | |
| 70 | +|------|-------------| |
| 71 | +| <a name="output_arn"></a> [arn](#output\_arn) | n/a | |
| 72 | +| <a name="output_id"></a> [id](#output\_id) | n/a | |
| 73 | +<!-- END --> |
0 commit comments