diff --git a/main.go b/main.go index 4d56a352b8d..5c4c1d8c0e0 100644 --- a/main.go +++ b/main.go @@ -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() { diff --git a/website/docs/r/acm_certificate.html.markdown b/website/docs/r/acm_certificate.html.markdown index 4236a860f07..c248255f4cc 100644 --- a/website/docs/r/acm_certificate.html.markdown +++ b/website/docs/r/acm_certificate.html.markdown @@ -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 diff --git a/website/docs/r/acm_certificate_validation.html.markdown b/website/docs/r/acm_certificate_validation.html.markdown index 9278da40655..9ffcc428035 100644 --- a/website/docs/r/acm_certificate_validation.html.markdown +++ b/website/docs/r/acm_certificate_validation.html.markdown @@ -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 }