Skip to content

resource_aws_route53_zone should force a new record when switching from public to private #7614

@blckct

Description

@blckct

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.8

  • provider.aws v1.50.0

Affected Resource(s)

  • aws_route53_zone

Steps to Reproduce

  1. Create a zone as public by accident:
resource "aws_route53_zone" "local" {
  name = "example.local"
}
  1. terraform apply

  2. Add vpc

resource "aws_route53_zone" "local" {
name = "example.local"
vpc {
vpc_id = "${var.vpc_id}"
}
}

  1. terraform apply

  • aws_route53_zone.local: error associating Route53 Hosted Zone (xxxx) to VPC (xxxx: PublicZoneVPCAssociation: Attempting to associate public zone: xxx with vpc: xxxx
    status code: 400, request id: xxxx

Expected output

Terraform should force a new resource when switching from public to private. It used to do that with vpc_id parameter but that got depraciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/route53Issues and PRs that pertain to the route53 service.staleOld or inactive issues managed by automation, if no further action taken these will get closed.upstream-terraformAddresses functionality related to the Terraform core binary.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions