Open newtoncorp opened 1 month ago
I've noticed it is probably related to the resources which should be changed (not to the new resources) and apply works from the 2nd/3rd try, when only the resources to be created left in output.
I think this is just a bug in 6.12.0 where they added the security_attributes
stuff. They try to cast it to map[string]map[string]interface{}
but that's not how it's defined in the resource schema. I'm not sure exactly which security_attributes
this is blowing up on, but they all just say map[string]interface{}
https://github.com/oracle/terraform-provider-oci/blob/master/internal/service/core/core_instance_resource.go#L261-L267 https://github.com/oracle/terraform-provider-oci/blob/master/internal/service/core/core_instance_resource.go#L692-L697
You'd be better off going back to v6.11.0 until this is fixed.
Also in v6.12.0 they vendored in a pre-release copy of oracle-go-sdk, instead of waiting for v65.75.1. This all seems like a botched rush-job.
This bug has continued through 6.15.0. And more bugs have been filed like #2232 #2219 and #2210 . We have the same error when updated defined tags on an instance.
2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] The plugin encountered an error, and failed to respond to the 2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain 2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] more details. 2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] 2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] Stack trace from the terraform-provider-oci_v6.13.0 plugin: 2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] 2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] panic: interface conversion: interface {} is map[string]interface {}, not map[string]map[string]interface {} 2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] 2024/10/16 12:25:14[TERRAFORM_CONSOLE] [INFO] goroutine 56 [running]:
Mainly commenting hoping oracle picks up on the bug since they have released multiple versions with it persisting.
Community Note
Terraform Version and Provider Version
terraform version ?? plugin version v6.12.0
Affected Resource(s)
oci_core_instance
Terraform Configuration Files
nil
Debug Output
nil
Panic Output
Expected Behavior
Should turn the instance off
Actual Behavior
crash
Steps to Reproduce
try to turn off / on an instance using oci_core_instance state
Important Factoids
is happening since latest release v6.12.0
References