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]: Breaking change in route53 record for alias setting #29072

Closed
lovrek93 opened this issue Jan 24, 2023 · 5 comments
Closed

[Bug]: Breaking change in route53 record for alias setting #29072

lovrek93 opened this issue Jan 24, 2023 · 5 comments
Assignees
Labels
bug Addresses a defect in current functionality. service/route53 Issues and PRs that pertain to the route53 service.

Comments

@lovrek93
Copy link

Terraform Core Version

1.0.9

AWS Provider Version

4.51.0

Affected Resource(s)

aws_route53_record

Expected Behavior

Alias configuration in TF should create Alias configuration.

Actual Behavior

Getting following error:

Error: Too many alias blocks

  on 25-records.tf line 26, in resource "aws_route53_record" "records":
  26:     content {

No more than 1 "alias" blocks are allowed

Relevant Error/Panic Output Snippet

Error: Too many alias blocks

  on 25-records.tf line 26, in resource "aws_route53_record" "records":
  26:     content {

No more than 1 "alias" blocks are allowed

Terraform Configuration Files

"records":{
"test": {
      "name": "test.cdn",
      "type": "A",
      "alias": {
        "fqdn": "example.net.",
        "zone_id": "zoneID",
        "evaluate_target_health": false
      }
    }
}
  # Alias configuration
  dynamic "alias" {
    iterator = al
    for_each = lookup(var.records[each.key], "alias", {})
    content {
      name                   = lookup(var.records[each.key].alias, "fqdn", null)
      zone_id                = lookup(var.records[each.key].alias, "zone_id", null)
      evaluate_target_health = lookup(var.records[each.key].alias, "evaluate_target_health", null)
    }
  }

Steps to Reproduce

Adding a new record with alias configuration and using newest AWS provider gives the error.

Debug Output

No response

Panic Output

No response

Important Factoids

This happens only on version 4.51.0 (works on all prior versions).
I found this issue that mentions the breaking change in file internal/service/route53/record.go on line 91
It seems to me that this breaking change was already implemented in version 4.51.0 and hence this problem is happening.
My advice would be revert "alias" for record to previous configuration (like on 4.50.0 for example).

References

No response

Would you like to implement a fix?

None

@lovrek93 lovrek93 added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jan 24, 2023
@github-actions
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 Jan 24, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Feb 2, 2023
@ewbankkit
Copy link
Contributor

Changed in #28894.

@gdavison gdavison self-assigned this Feb 17, 2023
@gdavison
Copy link
Contributor

Hi @lovrek93, thank you for submitting this. The provider was previously failing silently when more than one alias block was submitted.

It looks like you're trying to conditionally create the alias block if the record in the variable contains an alias. Based on the error message returned by Terraform, it looks like the for_each statement is returning more than one record.

I've tried debugging this, but I'm not able to simply place the dynamic block in an aws_route53_record resource because it does not parse. Could you please update this issue with the full aws_route53_record resource?

@gdavison gdavison added the waiting-response Maintainers are waiting on response from community or contributor. label Feb 17, 2023
@gdavison
Copy link
Contributor

Since we haven't heard back in several months, I'm going to close this issue. If you are still encountering the problem, please open a new issue.

@gdavison gdavison closed this as not planned Won't fix, can't repro, duplicate, stale May 30, 2023
@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label May 30, 2023
@github-actions
Copy link

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 Jun 30, 2023
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/route53 Issues and PRs that pertain to the route53 service.
Projects
None yet
Development

No branches or pull requests

4 participants