Closed nutanksingh closed 2 years ago
Is the resource created anyway? I see that we are loopingon Still creating...
But yes, this indicates a severe issue in the provider:
Stack trace from the terraform-provider-netapp-cloudmanager_v22.8.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xe275e4]
goroutine 66 [running]:
github.com/netapp/terraform-provider-netapp-cloudmanager/cloudmanager.resourceOCCMAWSRead(0xc0006718c0, 0x1079dc0, 0xc000674000, 0x1, 0x1)
github.com/netapp/terraform-provider-netapp-cloudmanager/cloudmanager/resource_netapp_cloudmanager_connector_aws.go:276 +0x604
github.com/netapp/terraform-provider-netapp-cloudmanager/cloudmanager.resourceOCCMAWSCreate(0xc0006718c0, 0x1079dc0, 0xc000674000, 0x2, 0x181dae0)
github.com/netapp/terraform-provider-netapp-cloudmanager/cloudmanager/resource_netapp_cloudmanager_connector_aws.go:242 +0xe90
github.com/hashicorp/terraform/helper/schema.(*Resource).Apply(0xc00008eb00, 0xc0001b53b0, 0xc000634d60, 0x1079dc0, 0xc000674000, 0x1, 0x0, 0x0)
github.com/hashicorp/terraform@v0.13.4/helper/schema/resource.go:308 +0x3b8
github.com/hashicorp/terraform/helper/schema.(*Provider).Apply(0xc00008f600, 0xc0001c1a28, 0xc0001b53b0, 0xc000634d60, 0xc00000e050, 0x1262508, 0xc00000e050)
github.com/hashicorp/terraform@v0.13.4/helper/schema/provider.go:297 +0x99
github.com/hashicorp/terraform/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00000e030, 0x1261740, 0xc00008c240, 0xc0001b5180, 0xc00000e030, 0xc00008c240, 0xc0000ebba0)
There is an issue when deploying the connector. The AWS instance is not created. The nil pointer dereference happened because we were not handling this error scenario correctly.
You would not see this if the AWS instance was successfully deployed.
Can you check your credentials file path? It is not found and this could be the root cause.
Fix in v22.8.1, reopen if issue still exist. Thank you.
Thanks. @lonico Upon further investigation , I confirmed that the connector instance wasn't created properly. I was running into this issue because more policies needed to be assigned for the IAM role that was creating the connector. I had to create the connector manually and then I compared the policies with what I was assigning in TF module to pin the issue.
@wenjun666 Thanks for fixing the error handling. I will give this new release a go.
I have upgraded my terraform plan yesterday to use the Terraform-provider-netapp-cloudmanager-22.8.0. This plan deploys connector in AWS account. Tf apply does run and deploys the connector but crashes with an error. Screenshot of the error is attached along with logs.
netapp-cloudmanager-provider-22.8.0.txt