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

[Bug]: aws_route53_zone data source does not accept empty string inputs to zone_id and name anymore #37683

Closed
mkisielewski opened this issue May 24, 2024 · 5 comments · Fixed by #37686
Assignees
Labels
bug Addresses a defect in current functionality. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/route53 Issues and PRs that pertain to the route53 service.
Milestone

Comments

@mkisielewski
Copy link

Terraform Core Version

1.6.3, 1.8.4

AWS Provider Version

5.51.0

Affected Resource(s)

Expected Behavior

Passing empty string to aws_route53_zone data source should be possible as in previous provider versions.

Fallback to v5.50.0 works as expected:

data.aws_route53_zone.default: Reading...
data.aws_route53_zone.default: Read complete after 1s [id=XXXXXXXX]

No changes. Your infrastructure matches the configuration.

Actual Behavior

Using latest v5.51.0 version throws an error.

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Invalid combination of arguments
│ 
│   with data.aws_route53_zone.default,
│   on main.tf line 326, in data "aws_route53_zone" "default":
│  326:   zone_id      = var.parent_zone_id
│ 
│ "zone_id": only one of `name,zone_id` can be specified, but `name,zone_id` were specified.
╵
╷
│ Error: Invalid combination of arguments
│ 
│   with data.aws_route53_zone.default,
│   on main.tf line 327, in data "aws_route53_zone" "default":
│  327:   name         = var.parent_zone_name
│ 
│ "name": only one of `name,zone_id` can be specified, but `name,zone_id` were specified.
╵

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

Working:

variable "parent_zone_id" {
  description = "The parent zone id"
  type        = string
  default     = ""
}

variable "parent_zone_name" {
  description = "The parent zone name"
  type        = string
  default     = "internal.local"
}

data "aws_route53_zone" "default" {
  zone_id      = var.parent_zone_id
  name         = var.parent_zone_name
  private_zone = true
}

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.50.0"
    }
  }
}

Not working:

variable "parent_zone_id" {
  description = "The parent zone id"
  type        = string
  default     = ""
}

variable "parent_zone_name" {
  description = "The parent zone name"
  type        = string
  default     = "internal.local"
}

data "aws_route53_zone" "default" {
  zone_id      = var.parent_zone_id
  name         = var.parent_zone_name
  private_zone = true
}

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.51.0"
    }
  }
}

Steps to Reproduce

  1. Prepare tf file and set variable to any existing zone name in your AWS account and AWS provider version constraint to 5.51.0
  2. terraform init
  3. terraform plan
  4. Note the error
  5. Add version constraint to 5.50.0
  6. terraform init --upgrade
  7. terraform plan
  8. Finished without error

Debug Output

No response

Panic Output

No response

Important Factoids

Affects cloudposse/terraform-aws-route53-alias

References

No response

Would you like to implement a fix?

No

@mkisielewski mkisielewski added the bug Addresses a defect in current functionality. label May 24, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/route53 Issues and PRs that pertain to the route53 service. label May 24, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 24, 2024
@jar-b jar-b added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels May 24, 2024
@jar-b
Copy link
Member

jar-b commented May 24, 2024

Relates #37510

@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 24, 2024
@jar-b jar-b self-assigned this May 24, 2024
Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.52.0 milestone May 24, 2024
@jar-b jar-b modified the milestones: v5.52.0, v5.51.1 May 24, 2024
Copy link

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label May 30, 2024
Copy link

github-actions bot commented Jul 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2024
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. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/route53 Issues and PRs that pertain to the route53 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants