Closed Draxter closed 3 years ago
Hi @Draxter ,
In order to see the changes done in Terraform in Smart Console you need to publish current session. Please read post apply actions from Check Point provider docs.: https://registry.terraform.io/providers/CheckPointSW/checkpoint/latest/docs#post-applydestroy-commands If you wish to logout from current session you should use logout resource: https://registry.terraform.io/providers/CheckPointSW/checkpoint/latest/docs/resources/checkpoint_management_logout
Regards, Roy
Thanks @chkp-royl I missed that somehow, I can also see that publishing the session can also be accomplished using the checkpoint_management_publish resource. Would you recommend this method?
Hi @Draxter ,
You can use publish resource but you need to make sure it run last after all changes is done (terraform works in parallel). Post apply commands allows you to do it more easily but it's up to you.
Regards, Roy
Software Versions:
Terraform v1.0.2 Checkpoint Provider: 1.4.0 Checkpoint Manager: R80.40 API: v1.6
Issue Description:
My aim is to create a network resource in Checkpoint using Terraform as follows:
Terraform runs fine, plans and applies the change:
Upon inspection in Checkpoint SmartConsole, the network does not show up. When terraform is re-ran, it thinks that the resource changed outside of Terraform and tries to recreate it. I run the following command to try to see if the network can be retrieved, which it can't, this appears to be the reason why Terraform tries to recreate the network on subsequent runs:
Upon further inspection in Management CLI the network exists:
However, the session that Terraform creates is not closed. Which I believe is the root cause. (Normally when creating a network using CLI/UI it only becomes visible after the session has been closed). Here's more debug info which shows the Terraform's session still being open:
Am I right in thinking that Terraform cannot retrieve the resource because the session does not close?