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

[Version 2 Release] resource/aws_route53_zone: Remove deprecated top-level vpc_id and vpc_region arguments #7693

Closed
bflad opened this issue Feb 24, 2019 · 3 comments · Fixed by #7695
Labels
service/route53 Issues and PRs that pertain to the route53 service. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Feb 24, 2019

Description

Tracking issue for https://www.terraform.io/docs/providers/aws/guides/version-2-upgrade.html#resource-aws_route53_zone

vpc_id and vpc_region Argument Removal

Switch your Terraform configuration to vpc configuration block(s) instead.

For example, given this previous configuration:

resource "aws_route53_zone" "example" {
  # ... other configuration ...

  vpc_id = "..."
}

An updated configuration:

resource "aws_route53_zone" "example" {
  # ... other configuration ...

  vpc {
    vpc_id = "..."
  }
}
@bflad bflad added service/route53 Issues and PRs that pertain to the route53 service. technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Feb 24, 2019
@bflad bflad added this to the v2.0.0 milestone Feb 24, 2019
@bflad
Copy link
Contributor Author

bflad commented Feb 24, 2019

Pull request submitted: #7695

bflad added a commit that referenced this issue Feb 24, 2019
…guments

Reference: #7693

Output from acceptance testing:

```
--- PASS: TestAccAWSRoute53Zone_basic (46.72s)
--- PASS: TestAccAWSRoute53Zone_Comment (65.30s)
--- PASS: TestAccAWSRoute53Zone_DelegationSetID (53.41s)
--- PASS: TestAccAWSRoute53Zone_ForceDestroy (184.65s)
--- PASS: TestAccAWSRoute53Zone_ForceDestroy_TrailingPeriod (184.40s)
--- PASS: TestAccAWSRoute53Zone_multiple (61.31s)
--- PASS: TestAccAWSRoute53Zone_Tags (62.64s)
--- PASS: TestAccAWSRoute53Zone_VPC_Multiple (102.63s)
--- PASS: TestAccAWSRoute53Zone_VPC_Single (57.30s)
--- PASS: TestAccAWSRoute53Zone_VPC_Updates (176.68s)
--- PASS: TestAccAWSRoute53ZoneAssociation_basic (97.35s)
--- PASS: TestAccAWSRoute53ZoneAssociation_region (121.29s)
--- PASS: TestAccDataSourceAwsRoute53Zone (79.95s)
```
@mrozentsvayg
Copy link

mrozentsvayg commented Mar 13, 2019

Unfortunately, vpc block does not work as expected with aws_route53_zone_association.
For the simple code:

resource "aws_route53_zone" "xx" {
  name = "xx.test"
  vpc {
    vpc_id = "vpc-11111111"
  }
}

resource "aws_route53_zone_association" "xx" {
  zone_id    = "${aws_route53_zone.xx.zone_id}"
  vpc_id     = "vpc-22222222"
  vpc_region = "us-west-1"
}

association with another vpc will be initially created, removed with next apply, then created again and so on.
Output from subsequent runs provided below (vpc and zone ids are masked).
Should i create a separate issue or it could be picked up from here?
With vpc_id it was working as intended.

→ terraform version
Terraform v0.11.13
+ provider.aws v2.1.0
+ provider.null v2.1.0
+ provider.template v2.1.0
Terraform will perform the following actions:

  + aws_route53_zone.xx
      id:                        <computed>
      comment:                   "Managed by Terraform"
      force_destroy:             "false"
      name:                      "xx.test"
      name_servers.#:            <computed>
      vpc.#:                     "1"
      vpc.2645171986.vpc_id:     "vpc-11111111"
      vpc.2645171986.vpc_region: <computed>
      vpc_id:                    <computed>
      vpc_region:                <computed>
      zone_id:                   <computed>

  + aws_route53_zone_association.xx
      id:                        <computed>
      vpc_id:                    "vpc-22222222"
      vpc_region:                "us-west-1"
      zone_id:                   "${aws_route53_zone.xx.zone_id}"

Plan: 2 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_route53_zone.xx: Creating...
  comment:                   "" => "Managed by Terraform"
  force_destroy:             "" => "false"
  name:                      "" => "xx.test"
  name_servers.#:            "" => "<computed>"
  vpc.#:                     "" => "1"
  vpc.2645171986.vpc_id:     "" => "vpc-11111111"
  vpc.2645171986.vpc_region: "" => "<computed>"
  vpc_id:                    "" => "<computed>"
  vpc_region:                "" => "<computed>"
  zone_id:                   "" => "<computed>"
aws_route53_zone.xx: Still creating... (10s elapsed)
aws_route53_zone.xx: Still creating... (20s elapsed)
aws_route53_zone.xx: Still creating... (30s elapsed)
aws_route53_zone.xx: Still creating... (40s elapsed)
aws_route53_zone.xx: Still creating... (50s elapsed)
aws_route53_zone.xx: Creation complete after 58s (ID: ZZZZZZZZZZZZZZ)
aws_route53_zone_association.xx: Creating...
  vpc_id:     "" => "vpc-22222222"
  vpc_region: "" => "us-west-1"
  zone_id:    "" => "ZZZZZZZZZZZZZZ"
aws_route53_zone_association.xx: Still creating... (10s elapsed)
aws_route53_zone_association.xx: Still creating... (20s elapsed)
aws_route53_zone_association.xx: Still creating... (30s elapsed)
aws_route53_zone_association.xx: Still creating... (40s elapsed)
aws_route53_zone_association.xx: Creation complete after 47s (ID: ZZZZZZZZZZZZZZ:vpc-22222222)

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
Terraform will perform the following actions:

  ~ aws_route53_zone.xx
      vpc.#:                 "2" => "1"
      vpc.1474358627.vpc_id: "vpc-22222222" => ""
      vpc.2645171986.vpc_id: "vpc-11111111" => "vpc-11111111"


Plan: 0 to add, 1 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_route53_zone.xx: Modifying... (ID: ZZZZZZZZZZZZZZ)
  vpc.#:                 "2" => "1"
  vpc.1474358627.vpc_id: "vpc-22222222" => ""
  vpc.2645171986.vpc_id: "vpc-11111111" => "vpc-11111111"
aws_route53_zone.xx: Still modifying... (ID: ZZZZZZZZZZZZZZ, 10s elapsed)
aws_route53_zone.xx: Still modifying... (ID: ZZZZZZZZZZZZZZ, 20s elapsed)
aws_route53_zone.xx: Still modifying... (ID: ZZZZZZZZZZZZZZ, 30s elapsed)
aws_route53_zone.xx: Still modifying... (ID: ZZZZZZZZZZZZZZ, 40s elapsed)
aws_route53_zone.xx: Modifications complete after 47s (ID: ZZZZZZZZZZZZZZ)

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
Terraform will perform the following actions:

  + aws_route53_zone_association.xx
      id:         <computed>
      vpc_id:     "vpc-22222222"
      vpc_region: "us-west-1"
      zone_id:    "ZZZZZZZZZZZZZZ"

Plan: 1 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_route53_zone_association.xx: Creating...
  vpc_id:     "" => "vpc-22222222"
  vpc_region: "" => "us-west-1"
  zone_id:    "" => "ZZZZZZZZZZZZZZ"
aws_route53_zone_association.xx: Still creating... (10s elapsed)
aws_route53_zone_association.xx: Still creating... (20s elapsed)
aws_route53_zone_association.xx: Still creating... (30s elapsed)
aws_route53_zone_association.xx: Still creating... (40s elapsed)
aws_route53_zone_association.xx: Creation complete after 47s (ID: ZZZZZZZZZZZZZZ:vpc-22222222)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Terraform will perform the following actions:

  ~ aws_route53_zone.xx
      vpc.#:                 "2" => "1"
      vpc.1474358627.vpc_id: "vpc-22222222" => ""
      vpc.2645171986.vpc_id: "vpc-11111111" => "vpc-11111111"


Plan: 0 to add, 1 to change, 0 to destroy.

@ghost
Copy link

ghost commented Mar 31, 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 Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/route53 Issues and PRs that pertain to the route53 service. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
2 participants