Skip to content
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

Error Updating oci_core_instance #2219

Open
carlosmartinezmoller opened this issue Oct 15, 2024 · 1 comment
Open

Error Updating oci_core_instance #2219

carlosmartinezmoller opened this issue Oct 15, 2024 · 1 comment
Labels

Comments

@carlosmartinezmoller
Copy link

carlosmartinezmoller commented Oct 15, 2024

Affected resources

affected_resources = oci_core_instance

From what I believe, although the tags update are under create_vnic_details of oci_core_instance

Versions

  • Installing hashicorp/oci v6.13.0...
  • Installed hashicorp/oci v6.13.0 (signed by HashiCorp)
  • Installing hashicorp/template v2.2.0...
  • Installed hashicorp/template v2.2.0 (signed by HashiCorp)

Panic output

Plan: 0 to add, 8 to change, 0 to destroy.
module.fws["fw01"].module.fw_instance.oci_core_instance.main: Modifying... [id=masked]
module.fws["fw02"].module.fw_instance.oci_core_instance.main: Modifying... [id=masked]

│ Error: Plugin did not respond

│ with module.fws["fw01"].module.fw_instance.oci_core_instance.main,
│ on .terraform/modules/fws.fw_instance/core_instance_01/main.tf line 2, in resource "oci_core_instance" "main":
│ 2: resource "oci_core_instance" "main" {

│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.


│ Error: Plugin did not respond

│ with module.fws["fw02"].module.fw_instance.oci_core_instance.main,
│ on .terraform/modules/fws.fw_instance/core_instance_01/main.tf line 2, in resource "oci_core_instance" "main":
│ 2: resource "oci_core_instance" "main" {

│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.

Stack trace from the terraform-provider-oci_v6.13.0 plugin:

panic: interface conversion: interface {} is map[string]interface {}, not map[string]map[string]interface {}

goroutine 38 [running]:
github.com/oracle/terraform-provider-oci/internal/service/core.(*CoreInstanceResourceCrud).Update(0xc006a0b240)
github.com/oracle/terraform-provider-oci/internal/service/core/core_instance_resource.go:1517 +0x2119
github.com/oracle/terraform-provider-oci/internal/tfresource.UpdateResource({0x87ac0f0, 0xc004191c80}, {0x872ca88, 0xc006a0b240})
github.com/oracle/terraform-provider-oci/internal/tfresource/crud_helpers.go:359 +0x134
github.com/oracle/terraform-provider-oci/internal/service/core.updateCoreInstance(0xc004191c80, {0x7dfd600, 0xc001ef5848})
github.com/oracle/terraform-provider-oci/internal/service/core/core_instance_resource.go:1045 +0x2ed
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0x879da28?, {0x879da28?, 0xc00359e750?}, 0xd?, {0x7dfd600?, 0xc001ef5848?})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:800 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc002340620, {0x879da28, 0xc00359e750}, 0xc00692bc70, 0xc004191b00, {0x7dfd600, 0xc001ef5848})
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:919 +0x83a
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc002b506a8, {0x879da28?, 0xc00359e690?}, 0xc006966370)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1078 +0xd5c
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc0001977c0, {0x879da28?, 0xc0035951d0?}, 0xc00693aa80)
github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:846 +0x3d0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x7a91d00, 0xc0001977c0}, {0x879da28, 0xc0035951d0}, 0xc004191000, 0x0)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000232e00, {0x879da28, 0xc003595140}, {0x87b2600, 0xc002c4a000}, 0xc002f4cc60, 0xc002b5f740, 0xcadaff8, 0x0)
google.golang.org/[email protected]/server.go:1385 +0xdd1
google.golang.org/grpc.(*Server).handleStream(0xc000232e00, {0x87b2600, 0xc002c4a000}, 0xc002f4cc60)
google.golang.org/[email protected]/server.go:1796 +0xfb8
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/[email protected]/server.go:1029 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 25
google.golang.org/[email protected]/server.go:1040 +0x125

Error: The terraform-provider-oci_v6.13.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Activity

module.fws["fw01"].module.fw_instance.oci_core_instance.main will be updated in-place
~ resource "oci_core_instance" "main" {
id = "masked"
# (22 unchanged attributes hidden)

 ~ create_vnic_details {
      ~ defined_tags             
          - "FinOps.creation_date"                 = "n_a" -> null
          - "FinOps.department"                    = "n_a" -> null
          - "FinOps.expiration_date"               = "n_a" -> null
          - "FinOps.requester"                     = "n_a" -> null
          - "FinOps.update_date"                   = "n_a" -> null
          - "ManageOperation.team"                 = "bbdd" -> null
          - "ManageOperation.working_hours"        = "8X5" -> null
          - "Oracle-Tags.CreatedBy"                = "[email protected]" -> null
          - "Oracle-Tags.CreatedOn"                = "2024-10-04T11:05:58.319Z" -> null
          - "SafetyGovernance.compliance"          = "iso27001" -> null
          - "SafetyGovernance.data_classification" = "internal" -> null
          - "SafetyGovernance.exposure"            = "internal" -> null
            # (7 unchanged elements hidden)
        }
        # (11 unchanged attributes hidden)
    }

    # (7 unchanged blocks hidden)
}
@carlosmartinezmoller
Copy link
Author

We modified provider.tf to use version 6.11.0 and it worked fine:
required_providers {
oci = {
source = "hashicorp/oci"
version = "6.11.0"
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant