Skip to content

Commit 767f252

Browse files
committed
Improve display on terraform registry
1 parent c4052ad commit 767f252

File tree

6 files changed

+184
-7
lines changed

6 files changed

+184
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# aws-acm-certificate Terraform Module
1+
# dflook/acm-certificate/aws Terraform Module
22

33
This module creates an ACM issued DNS validated certificate.
44
It supports automatically creating the required validation records where the zone is hosted by Route53.
55

6-
The [validation submodule](modules/validation) can be used with this resource to create the validation records in a Route53 Hosted Zone in another AWS account.
6+
The [validation submodule](https://registry.terraform.io/modules/dflook/acm-certificate/aws/latest/submodules/validation) can be used with this resource to create the validation records in a Route53 Hosted Zone in another AWS account.
77

88
This module can also be used to create certificates that include names that can't have their validation records automatically created.
99

@@ -69,7 +69,7 @@ The `domain_validation_options` attribute could also be used to create validatio
6969

7070
## Examples
7171

72-
See the full [examples](examples/) for more.
72+
See the full [examples](https://github.com/dflook/terraform-aws-acm-certificate/tree/main/examples) for more.
7373

7474
### A single name
7575

@@ -119,7 +119,7 @@ module "certificate" {
119119
This creates a certificate that includes a name that belongs to a Hosted Zone in another AWS account.
120120
The additional name must be in the `names` input variable with the zone id set to `null`, which prevents the module from trying to create the validation record itself.
121121

122-
You can use the `validation` submodule to create the validation records in the other account by passing in an aws provider configured for the correct account.
122+
You can use the [validation submodule](https://registry.terraform.io/modules/dflook/acm-certificate/aws/latest/submodules/validation) to create the validation records in the other account by passing in an aws provider configured for the correct account.
123123

124124
```hcl
125125
module "my_cert" {

examples/external_names/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
11
This is an example of creating a certificate that contains names in zones hosted by different providers.
2+
3+
```hcl
4+
provider "aws" {}
5+
provider "google" {}
6+
7+
data "aws_route53_zone" "example_com" {
8+
name = "example.com."
9+
}
10+
11+
module "my_cert" {
12+
source = "dflook/acm-certificate/aws"
13+
version = "1.0.0"
14+
15+
names = {
16+
"abc.example.com" : data.aws_route53_zone.example_com.zone_id
17+
"xyz.example.org" : null
18+
}
19+
}
20+
21+
resource "google_dns_record_set" "certificate_validate_second_zone" {
22+
for_each = module.my_cert.certificate.domain_validation_options
23+
24+
managed_zone = "example-org"
25+
26+
name = each.value.name
27+
type = each.value.type
28+
ttl = 60
29+
rrdatas = [each.value.record]
30+
}
31+
```
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
11
This is an example of creating a certificate that contains names for Route53 Hosted Zones in different AWS accounts.
2+
3+
```hcl
4+
provider "aws" {
5+
profile = "account-1"
6+
region = "eu-west-1"
7+
}
8+
9+
provider "aws" {
10+
alias = "account-2"
11+
profile = "account-2"
12+
region = "eu-west-1"
13+
}
14+
15+
data "aws_route53_zone" "example_com" {
16+
name = "example.com."
17+
}
18+
19+
data "aws_route53_zone" "example_org" {
20+
provider = aws.account-2
21+
name = "example.org."
22+
}
23+
24+
module "certificate" {
25+
source = "dflook/acm-certificate/aws"
26+
version = "1.0.0"
27+
28+
names = {
29+
"abc.example.com" : data.aws_route53_zone.example_com.zone_id
30+
"xyz.example.org" : null
31+
}
32+
}
33+
34+
module "certificate_validate_second_zone" {
35+
source = "dflook/acm-certificate/aws//modules/validation"
36+
version = "1.0.0"
37+
38+
providers = {
39+
aws = aws.account-2
40+
}
41+
42+
certificate = module.certificate.certificate
43+
44+
names = {
45+
"xyz.example.org" : data.aws_route53_zone.example_org.zone_id
46+
}
47+
}
48+
```

examples/non_automated/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,27 @@ Perhaps the DNS zone is controlled by a third party.
33

44
The `wait_for_issuance` input variable is set to `false` so the certificate resource is created and the ARN made available through the `arn` output before the certificate is issued.
55
The `domain_validation_options` output contains the validation records that still need to be created for the certificate to be issued.
6+
7+
```hcl
8+
provider "aws" {}
9+
10+
data "aws_route53_zone" "example_com" {
11+
name = "example.com."
12+
}
13+
14+
module "my_cert" {
15+
source = "dflook/acm-certificate/aws"
16+
version = "1.0.0"
17+
18+
names = {
19+
"abc.example.com" : data.aws_route53_zone.example_com.zone_id
20+
"xyz.example.com" : null
21+
}
22+
23+
wait_for_validation = false
24+
}
25+
26+
output "domain_validation_options" {
27+
value = module.my_cert.certificate.domain_validation_options
28+
}
29+
```

examples/simple/README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,77 @@
11
These examples demonstrate simple usage of this module.
2+
3+
```hcl
4+
provider "aws" {}
5+
6+
data "aws_route53_zone" "example_com" {
7+
name = "example.com."
8+
}
9+
10+
data "aws_route53_zone" "example_org" {
11+
name = "example.org."
12+
}
13+
14+
module "certificate" {
15+
source = "dflook/acm-certificate/aws"
16+
version = "1.0.0"
17+
18+
names = {
19+
"hello.example.com" : data.aws_route53_zone.example_com.zone_id
20+
}
21+
}
22+
23+
module "tags" {
24+
source = "dflook/acm-certificate/aws"
25+
version = "1.0.0"
26+
27+
names = {
28+
"world.example.com" : data.aws_route53_zone.example_com.zone_id
29+
}
30+
31+
tags = {
32+
"Example" : "tags"
33+
}
34+
}
35+
36+
module "multiple_names" {
37+
source = "dflook/acm-certificate/aws"
38+
version = "1.0.0"
39+
40+
names = {
41+
"abc.example.com" : data.aws_route53_zone.example_com.zone_id
42+
"xyz.example.com" : data.aws_route53_zone.example_com.zone_id
43+
}
44+
}
45+
46+
module "explicit_common_name" {
47+
source = "dflook/acm-certificate/aws"
48+
version = "1.0.0"
49+
50+
common_name = "yuiop.example.com"
51+
52+
names = {
53+
"qwert.example.com" : data.aws_route53_zone.example_com.zone_id
54+
"yuiop.example.com" : data.aws_route53_zone.example_com.zone_id
55+
}
56+
}
57+
58+
module "multiple_zones" {
59+
source = "dflook/acm-certificate/aws"
60+
version = "1.0.0"
61+
62+
names = {
63+
"foo.example.com" : data.aws_route53_zone.example_com.zone_id
64+
"bar.example.org" : data.aws_route53_zone.example_org.zone_id
65+
}
66+
}
67+
68+
module "wildcard" {
69+
source = "dflook/acm-certificate/aws"
70+
version = "1.0.0"
71+
72+
names = {
73+
"example.com" : data.aws_route53_zone.example_com.zone_id
74+
"*.example.com" : data.aws_route53_zone.example_com.zone_id
75+
}
76+
}
77+
```

modules/validation/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# aws-acm-certificate/validation_records Terraform Module
1+
# dflook/acm-certificate/aws//modules/validation Terraform Module
22

33
This module creates ACM validation records in Route53 hosted zones.
44
This should be used when the ACM certificate is in a different account to the Route53 Hosted Zone.
@@ -19,8 +19,8 @@ The hosted zone ids to create validation records in. The keys of the map are the
1919
- Type: aws_acm_certificate
2020
- Required
2121

22-
The certificate resource to validate. Should be the `certificate` output from the aws-acm-certificate module.
22+
The certificate resource to validate. Should be the `certificate` output from the [dflook/acm-certificate/aws](../../) module.
2323

2424
## Examples
2525

26-
See the [acm-certificate](../../) module for examples.
26+
See the [dflook/acm-certificate/aws](../../) module for examples.

0 commit comments

Comments
 (0)