Skip to content

Commit b638848

Browse files
committed
Improve README
1 parent 1a35faa commit b638848

File tree

1 file changed

+16
-51
lines changed

1 file changed

+16
-51
lines changed

README.md

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Terraform AWS Certificate Manager (ACM) with Multi Zone Module
1+
# Terraform AWS Certificate Manager (ACM) with Multiple Hosted Zone Module
22

33
Terraform module to create an ACM resource that contains domains from multiple Route53 hosted zone.
44
ACM validation is using Route53 only.
55
This module supports terraform version 0.12 only.
66

77
## Usage
88

9-
The `domains` variable consist of list of map (object). Each object must consist **zone** and **domain** keys.
9+
The `domain_name` and `subject_alternative_names` variables consist of map (object) of string and list of map of string. Each object must consist **zone** and **domain** keys.
1010

11-
- The **zone** key must contains hosted zone name that must be hosted on Route53 in the same AWS account with the requested certificate.
12-
- The **domain** key contains domain name that will be used in the certificate in the domain name or subject alternative names section.
11+
- The **zone** key contains name of hosted zone where the domain belong. The hosted must be a public one on Route53 in the same AWS account with the requested certificate.
12+
- The **domain** key contains domain name that will be used in the certificate whether in the domain name or subject alternative names section.
1313

1414
```terraform
1515
module "acm" {
16-
source = "../"
16+
source = "../../"
1717
18-
domains = [
19-
{
20-
zone = "example.com"
21-
domain = "example.com"
22-
},
18+
domain_name = {
19+
zone = "example.com"
20+
domain = "example.com"
21+
}
22+
subject_alternative_names = [
2323
{
2424
zone = "example.com"
2525
domain = "*.example.com"
@@ -35,7 +35,7 @@ module "acm" {
3535
]
3636
3737
tags = {
38-
Name = "Test ACM multiple zone"
38+
Name = "Test ACM multiple hosted zone"
3939
}
4040
}
4141
```
@@ -45,49 +45,12 @@ module "acm" {
4545
- [Basic usage example](./examples/basic/)
4646
- [Use existing domain validations records](./examples/without-domain-validation)
4747

48-
## Conditional domain validation creation
49-
50-
Let's say we want to create a new ACM certificate and there is exiting ACM certificate with overlapping domain name.
51-
Most likely domain validation has been setup on Route53 and it makes the existing domain validation will be overwritten.
52-
Overwritting existing domain validation records might not be a desired behaviour.
53-
To change this behaviour, exclude setting domain validation records on Route53 by configuring the `validation_set_records` variable to **false**.
54-
55-
```terraform
56-
module "acm" {
57-
source = "../"
58-
59-
domains = [
60-
{
61-
zone = "example.com"
62-
domain = "example.com"
63-
},
64-
{
65-
zone = "example.com"
66-
domain = "*.example.com"
67-
},
68-
{
69-
zone = "example.org"
70-
domain = "example.org"
71-
},
72-
{
73-
zone = "example.org"
74-
domain = "*.example.org"
75-
}
76-
]
77-
78-
validation_set_records = false
79-
80-
tags = {
81-
Name = "Test ACM multiple zone"
82-
}
83-
}
84-
```
85-
8648
## Inputs
8749

8850
| Name | Description | Type | Default | Required |
8951
|------|-------------|------|---------|:--------:|
90-
| domains | List of map of string containing domain name for the certificate and its corresponding hosted zone name | `list(map(string))` | n/a | yes |
52+
| domain\_name | Domain name for the ACM certificate | `map(string)` | n/a | yes |
53+
| subject\_alternative\_names | List of subject alternative names for the ACM certificate | `list(map(string))` | n/a | yes |
9154
| tags | Key and value pair that will be added as tag | `map(string)` | `{}` | no |
9255
| validate\_certificate | Whether to validate certificate | `bool` | `true` | no |
9356
| validation\_allow\_overwrite\_records | Whether to allow overwrite of Route53 records | `bool` | `true` | no |
@@ -99,4 +62,6 @@ module "acm" {
9962
|------|-------------|
10063
| certificate\_arn | The ARN of the certificate |
10164
| certificate\_domain\_validation\_options | A list of attributes to feed into other resources to complete certificate validation |
102-
| certificate\_domains | List of domain names covered by the certificate |
65+
| certificate\_domains | List of domain names covered by the certificate |
66+
67+

0 commit comments

Comments
 (0)