CheckPointSW / terraform-provider-checkpoint

Terraform provider for Check Point
https://www.terraform.io/docs/providers/checkpoint/
Mozilla Public License 2.0
28 stars 40 forks source link

Problem with star VPN community #123

Closed zjaniga closed 1 year ago

zjaniga commented 2 years ago

Hi CheckPoint,

We still have issues with the star VPN community, this is on new deployment:

│Error: Plugin did not respond
│
│  with module.vpn_community_star.checkpoint_management_vpn_community_star.new_vpn_community_star[0],
│  on ../modules/vpn/vpn_community_star/vpn_community_star.tf line 17, in resource "checkpoint_management_vpn_community_star" "new_vpn_community_star":
│  17: resource "checkpoint_management_vpn_community_star" "new_vpn_community_star" {
│
│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.0.0 plugin:
panic: interface conversion: interface {} is string, not int
goroutine 31 [running]:
github.com/CheckPointSW/terraform-provider-checkpoint/checkpoint.createManagementVpnCommunityStar(0xc00064c540, 0x1304ea0, 0xc0005e00f0, 0x2, 0x1b8b940)
    github.com/CheckPointSW/terraform-provider-checkpoint/checkpoint/resource_checkpoint_management_vpn_community_star.go:352 +0x3b39
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc00020a140, 0xc000644b90, 0xc000095620, 0x1304ea0, 0xc0005e00f0, 0x11fe501, 0xc0006b2018, 0xc000655350)
    github.com/hashicorp/terraform-plugin-sdk@v1.17.0/helper/schema/resource.go:320 +0x375
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc000760000, 0xc0008a3a38, 0xc000644b90, 0xc000095620, 0xc0006535e8, 0xc00063f0a0, 0x1200620)
    github.com/hashicorp/terraform-plugin-sdk@v1.17.0/helper/schema/provider.go:294 +0x99
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc0000be000, 0x154a870, 0xc00064a690, 0xc0002adf80, 0xc0000be000, 0xc00064a690, 0xc000104ba0)
    github.com/hashicorp/terraform-plugin-sdk@v1.17.0/internal/helper/plugin/grpc_provider.go:895 +0x8a5
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x12e9c60, 0xc0000be000, 0x154a870, 0xc00064a690, 0xc00076b380, 0x0, 0x154a870, 0xc00064a690, 0xc000150a00, 0x6ed)
    github.com/hashicorp/terraform-plugin-sdk@v1.17.0/internal/tfplugin5/tfplugin5.pb.go:3305 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00038ae00, 0x1553878, 0xc000702c00, 0xc0000de700, 0xc00048f4d0, 0x1b4a820, 0x0, 0x0, 0x0)
    google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc00038ae00, 0x1553878, 0xc000702c00, 0xc0000de700, 0x0)
    google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000730200, 0xc00038ae00, 0x1553878, 0xc000702c00, 0xc0000de700)
    google.golang.org/grpc@v1.32.0/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
    google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd
Error: The terraform-provider-checkpoint_v2.0.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.
exec process exited with error status code 1
Error: Process completed with exit code 1.

This is when I tried to modified an already imported object:

│Error: failed to execute API call
│Status: 400 Bad Request
│Code: generic_err_missing_required_parameters
│Message: Missing parameter: [external-gateway]
│
│  with module.vpn_community_star.checkpoint_management_vpn_community_star.imported_vpn_community_star[0],
│  on ../modules/vpn/vpn_community_star/vpn_community_star.tf line 69, in resource "checkpoint_management_vpn_community_star" "imported_vpn_community_star":
│  69: resource "checkpoint_management_vpn_community_star" "imported_vpn_community_star" {
│
╵
exec process exited with error status code 1
Error: Process completed with exit code 1.

Kind Regards, Zsolt

chkp-edenbr commented 2 years ago

Thanks for notifying us, it will be checked.

chkp-royl commented 1 year ago

Hi @zjaniga , We fixed all VPN (star, meshed) resources and data sources in provider version 2.3.0. Please use this version and let us know if you still face any issue.

Regards, Roy