-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_route53_record: plans that only change set_identifier
do not apply correctly
#7998
Comments
I'm getting the exact same behavior (granted in v1.60) with changing only the |
Still seeing this behavior in 0.12.19. |
Getting same behavior in 2.70.0. |
Still having this issue with |
I've encountered this issue as well. This issue is quite dangerous since it removes failed record from the Terraform state. |
Still an issue in |
I was trying to debug the issue and I've found out that the routing policy is not getting added to following is from cloud trail changeset if you update it using AWS console "changeBatch": {
"changes": [
{
"action": "DELETE",
"resourceRecordSet": {
"name": "dsdatsme.test.com.",
"type": "A",
"setIdentifier": "testtest",
"geoLocation": {
"continentCode": "AF"
},
"tTL": 300,
"resourceRecords": [
{
"value": "8.8.8.8"
}
]
}
},
{
"action": "CREATE",
"resourceRecordSet": {
"name": "dsdatsme.test.com",
"type": "A",
"setIdentifier": "testtest2222",
"geoLocation": {
"continentCode": "AF"
},
"tTL": 300,
"resourceRecords": [
{
"value": "8.8.8.8"
}
]
}
}
]
} whereas if you change ChangeBatch: {
Changes: [{
Action: "DELETE",
ResourceRecordSet: {
Name: "dsdatsme.test.com",
ResourceRecords: [{
Value: "8.8.8.8"
}],
SetIdentifier: "testtest1",
TTL: 300,
Type: "A"
}
},{
Action: "CREATE",
ResourceRecordSet: {
GeoLocation: {
ContinentCode: "AF"
},
Name: "dsdatsme.test.com",
ResourceRecords: [{
Value: "8.8.8.8"
}],
SetIdentifier: "testtest2",
TTL: 300,
Type: "A"
}
}],
Comment: "Managed by Terraform"
} So basically an error by AWS SDK is
@bflad can you guild me to solve this? |
Any movement on this? It's been open 2 years and we're still running into this issue |
Just ran into this, the error is pretty unhelpful and is pretty confusing. |
We got the same issue, can someone fix this ? 😿 |
Same error here. |
OK, I have identified the location of the problem in the code, and I have coded a test fix for I added a test for changing But the problem still exists for the routing policies Help is on the way! UPDATE[0]: Got |
PR is in: #25620 People who are affected (or just want to see this closed after 3 years!) and want to help get this prioritized for review, please hop over to the PR and hit the thumbs up emoji on the top comment? Thank you! PS @DSdatsme thanks for your comment above, the information above helped motivate me to realize I could fix this pretty quickly, definitely a help! |
Released in AWS provider v4.21.0 |
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. |
Community Note
Terraform Version
Terraform v0.11.11
Affected Resource(s)
Terraform Configuration Files
"Before" config
"After" config
Plan Output
Expected Behaviour
The terraform configuration should have been applied as stated in the plan, which suggests something such as
Actual Behaviour
The plan aborts, and the particular Route 53 record set then appears to be REMOVED from the state.
apply
ing the same plan again will allow CREATION of a new route53 recordset with weighted set identifierexample-bar
, but the subsequent outcome is that a "dangling"example-foo
recordset remains on Amazon's infrastructure without being reflected in the state.Steps to Reproduce
set_identifier
.set_identifier
Important Factoids
To summarise, my belief is that terraform is unable to
apply
changesets toaws_route53_record
that don't contain changes other than theset_identifier
field. If this is attempted, Terraform appears to throw an error and silently remove the offendingaws_route53_record
from internal state.To mitigate/workaround I had to apply the state twice (once for it to fail/"delete from state", once for it to add the new identifier) and then manually remove the duplicate records using the AWS Web Console.
References
I am not 100% certain but I believe #7199 was trying to describe the same issue.
The text was updated successfully, but these errors were encountered: