-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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]: nil pointer dereference error in dms.checkDefaultValues #36588
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I ran into a similar issue today. In my task setting, I had null values for items we didn't need. After hitting the nil pointer panic, did like jquag and looked at task_settings_json.go and any key that was assigned with nil, I removed from my settings and after that it worked like a charm. |
I'm facing the same issue now. It happened when I updated the terraform-provider-aws v5.42.0. |
Was this issue solved by #36967 ? |
Terraform Core Version
1.5.1
AWS Provider Version
5.42.0
Affected Resource(s)
aws_dms_replication_task
Expected Behavior
I expect the aws_dms_replication_task resource to be created successfully the first time as well as being updated successfully on subsequent changes.
Actual Behavior
The resource is created successfully but fails on any updates.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Sorry, I can't provide a full set of configuration files for this issue but I believe the key is having
BeforeImageSettings
defined in theaws_dms_replication_task
resource as below...Steps to Reproduce
Apply the terraform including an
aws_dms_replication_task
similar to the provided.The first apply should succeed.
Apply the terraform a second time and you should see the error.
Debug Output
No response
Panic Output
No response
Important Factoids
Based on what I see in the source code where the panic is happening (github.com/hashicorp/terraform-provider-aws/internal/service/dms/task_settings_json.go:233), it looks like it is not expected that a
value
fromdefaultMap
would be nil. However, as can be seen on line 48, thedefaultSettings
map is created with a value ofnil
for the key"BeforeImageSettings"
.I suspect this causes the panic if ever the aws_dms_replication_task includes "BeforeImageSettings".
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: