Skip to content

Commit

Permalink
update documententation
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Winkler authored and Scott Winkler committed Jul 31, 2018
1 parent 2be6f70 commit e162868
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 13 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"github.com/hashicorp/terraform/plugin"
"github.com/terraform-providers/terraform-provider-aws/aws"
"github.com/swinkler/terraform-provider-aws/aws"
)

func main() {
Expand Down
48 changes: 39 additions & 9 deletions website/docs/r/acm_certificate.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,62 @@ resource "aws_acm_certificate" "cert" {
Environment = "test"
}
}
#example with subject_alternative_names and domain_validation_options
resource "aws_acm_certificate" "cert" {
domain_name = "yolo.example.io"
validation_method = "EMAIL"
subject_alternative_names = ["app1.yolo.example.io", "yolo.example.io"]
domain_validation_options = [
{
domain_name = "yolo.example.io"
validation_domain = "example.io"
},
{
domain_name = "app1.mytest.rd.elliemae.io"
validation_domain = "example.io"
},
]
}
#basic example
resource "aws_acm_certificate" "cert" {
domain_name = "yolo.example.io"
validation_method = "EMAIL"
}
```

## Argument Reference

The following arguments are supported:

* `domain_name` - (Required) A domain name for which the certificate should be issued
* `subject_alternative_names` - (Optional) A list of domains that should be SANs in the issued certificate
* `domain_name` - (Required) A fully qualified domain name (FQDN) in the certificate. For example, www.example.com or example.com .
* `subject_alternative_names` - (Optional) One or more domain names (subject alternative names) included in the certificate. This list contains the domain names that are bound to the public key that is contained in the certificate. The subject alternative names include the canonical domain name (CN) of the certificate and additional domain names that can be used to connect to the website.
* `validation_method` - (Required) Which method to use for validation. `DNS` or `EMAIL` are valid, `NONE` can be used for certificates that were imported into ACM and then into Terraform.
* `domain_validaton_options` - (Optional) Contains information about the initial validation of each domain name that occurs. This is an array of maps that contains information about which validation_domain to use for domains in the subject_alternative_names list.
* `domain_name` - (Required) A fully qualified domain name (FQDN) in the certificate. For example, www.example.com or example.com .
* `validation_domain` - (Required) The domain name that ACM used to send domain validation emails
* `tags` - (Optional) A mapping of tags to assign to the resource.


## Attributes Reference

The following additional attributes are exported:

* `id` - The ARN of the certificate
* `arn` - The ARN of the certificate
* `domain_validation_options` - A list of attributes to feed into other resources to complete certificate validation. Can have more than one element, e.g. if SANs are defined. Only set if `DNS`-validation was used.
* `validation_emails` - A list of addresses that received a validation E-Mail. Only set if `EMAIL`-validation was used.
* `certificate_details` - A list of attributes to feed into other resources to complete certificate validation. Can have more than one element, e.g. if SANs are defined.

Domain validation objects export the following attributes:
Certficiate_detials objects export the following attributes:

* `domain_name` - The domain to be validated
* `resource_record_name` - The name of the DNS record to create to validate the certificate
* `resource_record_type` - The type of DNS record to create
* `resource_record_value` - The value the DNS record needs to have
* `domain_name` - A fully qualified domain name (FQDN) in the certificate. For example, www.example.com or example.com .
* `resource_record_name` - The name of the DNS record to create in your domain. This is supplied by ACM.
* `resource_record_type` - The type of DNS record. Currently this can be CNAME .
* `resource_record_value` - The value of the CNAME record to add to your DNS database. This is supplied by ACM.
* `validation_domain` - The domain name that ACM used to send domain validation emails.
* `validation_method` - One of EMAIl or DNS
* `validation_emails` - A list of email addresses that ACM used to send domain validation emails.

## Import

Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/acm_certificate_validation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ data "aws_route53_zone" "zone" {
}
resource "aws_route53_record" "cert_validation" {
name = "${aws_acm_certificate.cert.domain_validation_options.0.resource_record_name}"
type = "${aws_acm_certificate.cert.domain_validation_options.0.resource_record_type}"
name = "${aws_acm_certificate.cert.certificate_details.0.resource_record_name}"
type = "${aws_acm_certificate.cert.certificate_details.0.resource_record_type}"
zone_id = "${data.aws_route53_zone.zone.id}"
records = ["${aws_acm_certificate.cert.domain_validation_options.0.resource_record_value}"]
records = ["${aws_acm_certificate.cert.certificate_details.0.resource_record_value}"]
ttl = 60
}
Expand Down

0 comments on commit e162868

Please sign in to comment.