Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_ses_domain_identity: Invalid domain name (trailing dot) #17630

Closed
eschwartz opened this issue Mar 19, 2018 · 2 comments
Closed

aws_ses_domain_identity: Invalid domain name (trailing dot) #17630

eschwartz opened this issue Mar 19, 2018 · 2 comments

Comments

@eschwartz
Copy link

Terraform Version

v0.11.3

Terraform Configuration Files

data "aws_route53_zone" "zone" {
  name = "foo.example.com."
}

resource "aws_ses_domain_identity" "ses_id" {
  domain = "${data.aws_route53_zone.zone.name}"
}

Debug Output

018-03-19T12:10:01.312-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: Action=VerifyDomainIdentity&Domain=foo.example.com.&Version=2010-12-01
2018-03-19T12:10:01.312-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: -----------------------------------------------------
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: 2018/03/19 12:10:01 [DEBUG] [aws-sdk-go] DEBUG: Response email/VerifyDomainIdentity Details:
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: ---[ RESPONSE ]--------------------------------------
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: HTTP/1.1 400 Bad Request
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: Connection: close
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: Content-Length: 290
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: Content-Type: text/xml
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: Date: Mon, 19 Mar 2018 17:10:01 GMT
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: X-Amzn-Requestid: 5c5ef414-2b98-11e8-83b9-19d2f68b5217
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: 
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: 
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: -----------------------------------------------------
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: 2018/03/19 12:10:01 [DEBUG] [aws-sdk-go] <ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4:   <Error>
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4:     <Type>Sender</Type>
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4:     <Code>InvalidParameterValue</Code>
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4:     <Message>Invalid domain name foo.example.com..</Message>
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4:   </Error>
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4:   <RequestId>5c5ef414-2b98-11e8-83b9-19d2f68b5217</RequestId>
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: </ErrorResponse>
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: 2018/03/19 12:10:01 [DEBUG] [aws-sdk-go] DEBUG: Validate Response email/VerifyDomainIdentity failed, not retrying, error InvalidParameterValue: Invalid domain name foo.example.com..
2018-03-19T12:10:01.974-0500 [DEBUG] plugin.terraform-provider-aws_v1.9.0_x4: 	status code: 400, request id: 5c5ef414-2b98-11e8-83b9-19d2f68b5217
2018/03/19 12:10:01 [ERROR] root: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* aws_ses_domain_identity.ses_id: Error requesting SES domain identity verification: InvalidParameterValue: Invalid domain name foo.example.com..
	status code: 400, request id: 5c5ef414-2b98-11e8-83b9-19d2f68b5217
2018/03/19 12:10:01 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* aws_ses_domain_identity.ses_id: Error requesting SES domain identity verification: InvalidParameterValue: Invalid domain name foo.example.com..
	status code: 400, request id: 5c5ef414-2b98-11e8-83b9-19d2f68b5217

Expected Behavior

The aws_ses_domain_identity resource should have applied successfully, with domain name foo.example.com.

Actual Behavior

The aws_ses_domain_identity resource attempted to use the domain name foo.example.com.. (two trailing dots), so terraform apply failed with:

* aws_ses_domain_identity.ses_id: Error requesting SES domain identity verification: InvalidParameterValue: Invalid domain name foo.example.com..

Additional Context

My understanding was that I could pass in a Route53 zone name with or without a trailing dot. However, it appears as though an extra trailing dot is being added to the domain name before sending the request to the Amazon API

Workaround

I should be able to get around the issue by removing the trailing dot

References

@ghost
Copy link

ghost commented Mar 19, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-aws#3836 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#3836.

@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants