Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# module.ops_dns.aws_route53_vpc_association_authorization.name will be created
+ resource "aws_route53_vpc_association_authorization" "name" {
+ id = (known after apply)
+ vpc_id = "vpc-1"
+ vpc_region = (known after apply)
+ zone_id = "zone-1"
}
Plan: 1 to add, 0 to change, 0 to destroy.
By applying this plan, provider returns error: Error: reading Route53 VPC Association Authorization (zone-1:vpc-1): too many results: wanted 1, got 2
Relevant Error/Panic Output Snippet
Error: reading Route53 VPC Association Authorization (zone-1:vpc-1): too many results: wanted 1, got 2
with module.ops_dns.aws_route53_vpc_association_authorization.main,
on ../../../../../modules/aws/private-dns-authorization/main.tf line 14, in resource "aws_route53_vpc_association_authorization" "authorization":
14: resource "aws_route53_vpc_association_authorization" "name" {
New provider version tries to create (NOT recreate) a new aws_route53_vpc_association_authorization for already exists association_authorization
Debug Output
No response
Panic Output
No response
Important Factoids
By fetching current terraform state, we can see the resource is already exist (I double checked with aws-cli and aws console):
terraform state show module.ops_dns.aws_route53_vpc_association_authorization.name it returns the current state for the existing resource correctly:
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.
Terraform Core Version
1.5.7
AWS Provider Version
5.65.0
Affected Resource(s)
Expected Behavior
Terraform plan should report NOOP,
Actual Behavior
Terraform plan reports:
By applying this plan, provider returns error:
Error: reading Route53 VPC Association Authorization (zone-1:vpc-1): too many results: wanted 1, got 2
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Upgrade aws provider version from
5.38.0
to5.65.0
New provider version tries to create (NOT recreate) a new
aws_route53_vpc_association_authorization
for already existsassociation_authorization
Debug Output
No response
Panic Output
No response
Important Factoids
By fetching current terraform state, we can see the resource is already exist (I double checked with aws-cli and aws console):
terraform state show module.ops_dns.aws_route53_vpc_association_authorization.name
it returns the current state for the existing resource correctly:References
No response
Would you like to implement a fix?
None