Open jquag opened 6 months ago
Voting 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.
Seeing this as well. I assume related to recent changes here https://github.com/hashicorp/terraform-provider-aws/pull/36035 cc @nam054
Was this issue solved by https://github.com/hashicorp/terraform-provider-aws/pull/36967 ?
Actually, terraform plan
executed successfully in my environment using v5.48.0.
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