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

tests/resource/route53_record: Hosted zone does not exist (GovCloud) #16390

Closed
YakDriver opened this issue Nov 23, 2020 · 2 comments · Fixed by #18057
Closed

tests/resource/route53_record: Hosted zone does not exist (GovCloud) #16390

YakDriver opened this issue Nov 23, 2020 · 2 comments · Fixed by #18057
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/ec2 Issues and PRs that pertain to the ec2 service. service/elbv2 Issues and PRs that pertain to the elbv2 service. service/route53 Issues and PRs that pertain to the route53 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Comments

@YakDriver
Copy link
Member

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 other comments that do not add relevant new information or questions, 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

Description

This tests fails in GovCloud:

TestAccAWSRoute53Record_Alias_VpcEndpoint

Not sure if the .com ending is causing this problem.

New or Affected Resource(s)

  • aws_route53_record

Potential Terraform Configuration

resource "aws_vpc" "test" {
  cidr_block = "10.0.0.0/16"

  tags = {
    Name = "yaktest"
  }
}

resource "aws_subnet" "test" {
  cidr_block = "10.0.0.0/24"
  vpc_id     = aws_vpc.test.id

  tags = {
    Name = "yaktest"
  }
}

resource "aws_lb" "test" {
  internal           = true
  load_balancer_type = "network"
  name               = "yaktest"
  subnets            = [aws_subnet.test.id]
}

resource "aws_security_group" "test" {
  name   = "yaktest"
  vpc_id = aws_vpc.test.id

  tags = {
    Name = "yaktest"
  }
}

resource "aws_vpc_endpoint_service" "test" {
  acceptance_required        = false
  network_load_balancer_arns = [aws_lb.test.id]
}

resource "aws_vpc_endpoint" "test" {
  private_dns_enabled = false
  security_group_ids  = [aws_security_group.test.id]
  service_name        = aws_vpc_endpoint_service.test.service_name
  subnet_ids          = [aws_subnet.test.id]
  vpc_endpoint_type   = "Interface"
  vpc_id              = aws_vpc.test.id
}

resource "aws_route53_zone" "test" {
  name = "notexample.com"

  vpc {
    vpc_id = aws_vpc.test.id
  }
}

resource "aws_route53_record" "test" {
  name    = "test"
  type    = "A"
  zone_id = aws_route53_zone.test.zone_id

  alias {
    evaluate_target_health = false
    name                   = lookup(aws_vpc_endpoint.test.dns_entry[0], "hosted_zone_id")
    zone_id                = lookup(aws_vpc_endpoint.test.dns_entry[0], "dns_name")
  }
}

Debug

resource_aws_route53_record_test.go:576: Step 2/3 error: Error running apply: 2020/11/23 15:50:02 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
        
        Error: [ERR]: Error building changeset: NoSuchHostedZone: The specified hosted zone does not exist.
        	status code: 404, request id: 77cc81a3-7260-499d-be40-3aa9386a4233

References

@YakDriver YakDriver added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. partition/aws-us-gov Pertains to the aws-us-gov partition. labels Nov 23, 2020
@ghost ghost added service/ec2 Issues and PRs that pertain to the ec2 service. service/elbv2 Issues and PRs that pertain to the elbv2 service. service/route53 Issues and PRs that pertain to the route53 service. labels Nov 23, 2020
@YakDriver
Copy link
Member Author

On latest versions, as of today, this test (TestAccAWSRoute53Record_Alias_VpcEndpoint) is still failing on GovCloud:

=== CONT  TestAccAWSRoute53Record_Alias_VpcEndpoint
    resource_aws_route53_record_test.go:606: Step 2/3 error: Error running apply: exit status 1
        
        Error: [ERR]: Error building changeset: NoSuchHostedZone: The specified hosted zone does not exist.
        	status code: 404, request id: 9c27b71a-d966-4cca-9eb4-d29f86dd7b1d
        
          on terraform_plugin_test.tf line 57, in resource "aws_route53_record" "test":
          57: resource "aws_route53_record" "test" {
        
        
--- FAIL: TestAccAWSRoute53Record_Alias_VpcEndpoint (423.10s)

@ghost
Copy link

ghost commented Apr 17, 2021

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 as resolved and limited conversation to collaborators Apr 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/ec2 Issues and PRs that pertain to the ec2 service. service/elbv2 Issues and PRs that pertain to the elbv2 service. service/route53 Issues and PRs that pertain to the route53 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant