Skip to content

[BUG] CME resource provider crash for Azure account #228

Description

@deutmeyerbrianpfg

Provider version = "2.9.0"
CME version = Take 299
When creating an Azure account in CME:

resource "checkpoint_management_cme_accounts_azure" "azure" {
  name           = "azure-test"
  directory_id   = "some-value-here"
  application_id = "some-value-here"
  client_secret  = "secret_value"
  subscription   = "some-value-here"
  domain         = "MyDomain"
  environment    = "AzureCloud"
}

It results in this error:

checkpoint_management_cme_accounts_azure.azure: Creating...
╷
│ Error: Plugin did not respond
│ 
│   with checkpoint_management_cme_accounts_azure.azure,
│   on azure.tf line 9, in resource "checkpoint_management_cme_accounts_azure" "azure":
│    9: resource "checkpoint_management_cme_accounts_azure" "azure" {
│ 
│ 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-checkpoint_v2.9.0 plugin:

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

goroutine 28 [running]:
github.com/CheckPointSW/terraform-provider-checkpoint/checkpoint.readManagementCMEAccountsAzure(0xc0012b31f0?, {0x1289a00?, 0xc0000dafc0})
	github.com/CheckPointSW/terraform-provider-checkpoint/checkpoint/resource_checkpoint_management_cme_accounts_azure.go:134 +0x5b9
github.com/CheckPointSW/terraform-provider-checkpoint/checkpoint.createManagementCMEAccountsAzure(0x11a1cc0?, {0x1289a00?, 0xc0000dafc0})
	github.com/CheckPointSW/terraform-provider-checkpoint/checkpoint/resource_checkpoint_management_cme_accounts_azure.go:202 +0x70f
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc000242c80, 0xc00128d9a0, 0xc00128ab20, {0x1289a00, 0xc0000dafc0})
	github.com/hashicorp/terraform-plugin-sdk@v1.17.0/helper/schema/resource.go:320 +0x438
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc00053c180, 0xc0010f7990, 0x12af8bf?, 0xf?)
	github.com/hashicorp/terraform-plugin-sdk@v1.17.0/helper/schema/provider.go:294 +0x70
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00000ece0, {0xc0012b2c40?, 0x5172c6?}, 0xc0012b2c40)
	github.com/hashicorp/terraform-plugin-sdk@v1.17.0/internal/helper/plugin/grpc_provider.go:895 +0x7c5
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1275220?, 0xc00000ece0}, {0x1540050, 0xc0012d18f0}, 0xc00058c420, 0x0)
	github.com/hashicorp/terraform-plugin-sdk@v1.17.0/internal/tfplugin5/tfplugin5.pb.go:3305 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00057a700, {0x15435a0, 0xc0001aca80}, 0xc000e5e300, 0xc000b7ce40, 0x1b9d0c0, 0x0)
	google.golang.org/grpc@v1.32.0/server.go:1194 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc00057a700, {0x15435a0, 0xc0001aca80}, 0xc000e5e300, 0x0)
	google.golang.org/grpc@v1.32.0/server.go:1517 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.2()
	google.golang.org/grpc@v1.32.0/server.go:859 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/grpc@v1.32.0/server.go:857 +0x28a

Error: The terraform-provider-checkpoint_v2.9.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.

Error: Terraform exited with code 1.
Error: Process completed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions