Created
February 11, 2019 11:00
-
-
Save grodzik/485b73bd45c4c4ba7af0dd5e3c210cf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>_ terraform apply -var "domain=nonexistantexample.com" -var "subdomain=myapi" | |
data.aws_route53_zone.domain: Refreshing state... | |
An execution plan has been generated and is shown below. | |
Resource actions are indicated with the following symbols: | |
+ create | |
Terraform will perform the following actions: | |
+ aws_acm_certificate.crt | |
id: <computed> | |
arn: <computed> | |
domain_name: "myapi.nonexistantexample.com" | |
domain_validation_options.#: <computed> | |
subject_alternative_names.#: <computed> | |
validation_emails.#: <computed> | |
validation_method: "DNS" | |
+ aws_acm_certificate_validation.crt_val | |
id: <computed> | |
certificate_arn: "${aws_acm_certificate.crt.arn}" | |
validation_record_fqdns.#: <computed> | |
+ aws_api_gateway_domain_name.api | |
id: <computed> | |
certificate_arn: "${aws_acm_certificate.crt.arn}" | |
certificate_upload_date: <computed> | |
cloudfront_domain_name: <computed> | |
cloudfront_zone_id: <computed> | |
domain_name: "myapi.nonexistantexample.com." | |
endpoint_configuration.#: <computed> | |
regional_domain_name: <computed> | |
regional_zone_id: <computed> | |
+ aws_route53_record.crt_record | |
id: <computed> | |
allow_overwrite: "true" | |
fqdn: <computed> | |
name: "${aws_acm_certificate.crt.domain_validation_options.0.resource_record_name}" | |
records.#: <computed> | |
ttl: "60" | |
type: "${aws_acm_certificate.crt.domain_validation_options.0.resource_record_type}" | |
zone_id: "nonexistantexample.com." | |
+ aws_route53_record.record | |
id: <computed> | |
alias.#: "1" | |
alias.~2295693948.evaluate_target_health: "false" | |
alias.~2295693948.name: "${aws_api_gateway_domain_name.api.cloudfront_domain_name}" | |
alias.~2295693948.zone_id: "${aws_api_gateway_domain_name.api.cloudfront_zone_id}" | |
allow_overwrite: "true" | |
fqdn: <computed> | |
name: "myapi.nonexistantexample.com" | |
type: "A" | |
zone_id: "nonexistantexample.com." | |
Plan: 5 to add, 0 to change, 0 to destroy. | |
Do you want to perform these actions? | |
Terraform will perform the actions described above. | |
Only 'yes' will be accepted to approve. | |
Enter a value: yes | |
aws_acm_certificate.crt: Creating... | |
arn: "" => "<computed>" | |
domain_name: "" => "myapi.nonexistantexample.com" | |
domain_validation_options.#: "" => "<computed>" | |
subject_alternative_names.#: "" => "<computed>" | |
validation_emails.#: "" => "<computed>" | |
validation_method: "" => "DNS" | |
aws_acm_certificate.crt: Still creating... (10s elapsed) | |
aws_acm_certificate.crt: Creation complete after 12s (ID: arn:aws:acm:us-east-1:849706378308:cert...e/e483b07b-a4c3-4486-bb8a-28d278edb771) | |
aws_api_gateway_domain_name.api: Creating... | |
certificate_arn: "" => "arn:aws:acm:us-east-1:849706378308:certificate/e483b07b-a4c3-4486-bb8a-28d278edb771" | |
certificate_upload_date: "" => "<computed>" | |
cloudfront_domain_name: "" => "<computed>" | |
cloudfront_zone_id: "" => "<computed>" | |
domain_name: "" => "myapi.nonexistantexample.com." | |
endpoint_configuration.#: "" => "<computed>" | |
regional_domain_name: "" => "<computed>" | |
regional_zone_id: "" => "<computed>" | |
aws_route53_record.crt_record: Creating... | |
allow_overwrite: "" => "true" | |
fqdn: "" => "<computed>" | |
name: "" => "_30cd298592e99cf447c32d3798a5f346.myapi.nonexistantexample.com" | |
records.#: "" => "1" | |
records.888061547: "" => "_bae4649f0909cd41688723912bd2869d.hkvuiqjoua.acm-validations.aws." | |
ttl: "" => "60" | |
type: "" => "CNAME" | |
zone_id: "" => "nonexistantexample.com." | |
Error: Error applying plan: | |
2 error(s) occurred: | |
* aws_route53_record.crt_record: 1 error(s) occurred: | |
* aws_route53_record.crt_record: NoSuchHostedZone: No hosted zone found with ID: nonexistantexample.com. | |
status code: 404, request id: 565b779b-2deb-11e9-842c-234c57aa6fee | |
* aws_api_gateway_domain_name.api: 1 error(s) occurred: | |
* aws_api_gateway_domain_name.api: Error creating API Gateway Domain Name: BadRequestException: Trailing period should be omitted from domain name | |
status code: 400, request id: 56a81101-2deb-11e9-aadc-11aff297d7ee | |
Terraform does not automatically rollback in the face of errors. | |
Instead, your Terraform state file has been partially updated with | |
any resources that successfully completed. Please address the error | |
above and apply again to incrementally change your infrastructure. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment