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

%!s(<nil>) error when trying to create a aws service discovery private dns namespace #5532

Closed
MrLarssonJr opened this issue Aug 13, 2018 · 6 comments · Fixed by #7118
Closed
Labels
bug Addresses a defect in current functionality. service/servicediscovery Issues and PRs that pertain to the servicediscovery service.
Milestone

Comments

@MrLarssonJr
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.11.7
aws provider v1.31.0

Affected Resource(s)

  • aws_service_discovery_private_dns_namespace

Terraform Configuration Files

resource "aws_service_discovery_private_dns_namespace" "xray-daemon" {
  name = "hoge.example.local"
  vpc = "${data.aws_vpc.core.id}"
}

Debug Output

Panic Output

Expected Behavior

A service discover private dns namespace should've been created or a proper error message.

(The corresponding aws cli command succeeds: aws servicediscovery create-private-dns-namespace --name hoge.example.local --vpc $myVPC

Actual Behavior

Error: Error applying plan:

1 error(s) occurred:

* aws_service_discovery_private_dns_namespace.xray-daemon: 1 error(s) occurred:

* aws_service_discovery_private_dns_namespace.xray-daemon: unexpected state 'FAIL', wanted target 'SUCCESS'. last error: %!s(<nil>)

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@bflad bflad added the service/servicediscovery Issues and PRs that pertain to the servicediscovery service. label Aug 13, 2018
@radeksimko radeksimko added the bug Addresses a defect in current functionality. label Aug 13, 2018
@MrLarssonJr
Copy link
Author

The runner running terraform was missing permission route53:CreateHostedZone resulting in the missing error message.

@anuragsernapally
Copy link

anuragsernapally commented Oct 22, 2018

* aws_iam_service_linked_role.es_iam: Error waiting for role (arn:aws:iam::xxxxxxxxxxx:role/aws-service-role/es.amazonaws.com/AWSServiceRoleForAmazonElasticsearchService) to be deleted: unexpected state 'FAILED', wanted target 'SUCCEEDED'. last error: %!s(<nil>)

Getting this error while deleting Service linked role during Elastic Search Destroy.
Resource for Creating Elastic Search Service Linked Role.

resource "aws_iam_service_linked_role" "es_iam" {
  aws_service_name = "es.amazonaws.com"
}

Destroy is successful if its run again.
Can you please let me know if this is a similar issue.
Thank you.

@bflad
Copy link
Contributor

bflad commented Jan 11, 2019

Pull request submitted: #7118

@bflad bflad added this to the v1.56.0 milestone Jan 14, 2019
@bflad
Copy link
Contributor

bflad commented Jan 14, 2019

Merged in support for the resources to report extended status from ErrorCode and ErrorMessage from the operations API response when Status is FAIL. This gives full details about why it failed, e.g.

aws_service_discovery_private_dns_namespace.subdomain: CANNOT_CREATE_HOSTED_ZONE: The VPC that you chose, vpc-0c04acdb2f40a49d6 in region us-west-2, is already associated with another private hosted zone that has an overlapping name space, wavsx.example.com.. (Service: AmazonRoute53; Status Code: 400; Error Code: ConflictingDomainExists; Request ID: 600b3096-15c4-11e9-97af-ade1478492a8)

This will release in version 1.56.0 of the Terraform AWS provider, likely middle of this week.

@bflad
Copy link
Contributor

bflad commented Jan 16, 2019

This has been released in version 1.56.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 1, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/servicediscovery Issues and PRs that pertain to the servicediscovery service.
Projects
None yet
4 participants