terraform-provider-checkpoint icon indicating copy to clipboard operation
terraform-provider-checkpoint copied to clipboard

[BUG] CME resource provider crash for Azure account

Open deutmeyerbrianpfg opened this issue 5 months ago • 3 comments

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/[email protected]/helper/schema/resource.go:320 +0x438
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc00053c180, 0xc0010f7990, 0x12af8bf?, 0xf?)
	github.com/hashicorp/[email protected]/helper/schema/provider.go:294 +0x70
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc00000ece0, {0xc0012b2c40?, 0x5172c6?}, 0xc0012b2c40)
	github.com/hashicorp/[email protected]/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/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3305 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00057a700, {0x15435a0, 0xc0001aca80}, 0xc000e5e300, 0xc000b7ce40, 0x1b9d0c0, 0x0)
	google.golang.org/[email protected]/server.go:1194 +0xc8f
google.golang.org/grpc.(*Server).handleStream(0xc00057a700, {0x15435a0, 0xc0001aca80}, 0xc000e5e300, 0x0)
	google.golang.org/[email protected]/server.go:1517 +0xa1b
google.golang.org/grpc.(*Server).serveStreams.func1.2()
	google.golang.org/[email protected]/server.go:859 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/[email protected]/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.

deutmeyerbrianpfg avatar Sep 05 '25 16:09 deutmeyerbrianpfg

Any update on this issue?

deutmeyerbrianpfg avatar Sep 22 '25 12:09 deutmeyerbrianpfg

Thank you for reporting this issue. We are currently investigating and researching the matter you've raised. We will provide updates as we make progress. CGNS Orchestration Team

chkp-yizhako avatar Sep 29 '25 11:09 chkp-yizhako

Thank you for reporting this issue. I've set up a lab environment using the configuration details you provided in the ticket (adapted with our lab values). However, I was unable to reproduce the issue—the CME configuration via Terraform completed successfully on my end.

I recommend opening a service request via Check Point Support for this issue. When submitting the request, please include all the necessary logs outlined below, as they will be essential for troubleshooting and resolving the problem.

Steps to collect the required logs:

1. Enable Terraform debug logging:

export TF_LOG=DEBUG
export TF_LOG_PATH=./terraform-debug.log

2. Enable debug mode on the Check Point Management server:

  • Enter expert mode on the management server
  • Run cme_menu
  • Navigate through the menu:
    • Select 6) Debug mode
    • Select 2) Enable Debug Mode
    • Confirm with Y
    • Select 3) All (this will restart the CME and CME API services)

3. Execute your Terraform workflow:

  • Run terraform plan
  • Run terraform apply

4. Collect the log files:

  • The Terraform log file from step 1 (terraform-debug.log)
  • CME log files from the management server:
    • Enter expert mode
    • Run cme_menu
    • Navigate to 6) Debug mode
    • Select the file destination option to collect logs

5. Disable debug mode after collecting logs:

  • Enter expert mode on the management server
  • Run cme_menu
  • Navigate through the menu:
    • Select 6) Debug mode
    • Select 3) Disable Debug Mode
    • Confirm with Y
    • Select 3) All (this will restart the CME and CME API services)

Please attach all collected logs to your support ticket to help expedite the investigation.

Thank you for your cooperation!

chkp-yizhako avatar Sep 30 '25 13:09 chkp-yizhako