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

Add logout post apply script #78

Closed Draxter closed 3 years ago

Draxter commented 3 years ago

As a user that uses this provider in an automated pipeline, at the end of each terraform run, I want to publish, and then log out my session easily. Currently, this provider only has an included script for publishing a session, but not logging out.

The current workaround that I use is using the checkpoint_management_logout resource which I apply together with my resources. To ensure that the session logs out after all resources have been deployed, I have to deploy it with depends_on. This is not ideal, as my depends_on list must contain a list of all other resources (which constantly changes), to ensure logging out happens last.

As mentioned in #75 it would be helpful to add a script for logging out after resources are applied and published.

chkp-royl commented 3 years ago

Hi @Draxter ,

Thanks you for sharing this issue. We will add logout post apply script in the next version of Check Point provider. Terraform is open source tool so I encourage you to look at the existing code for publish\install-policy scripts and do the same for logout so you will have a solution until we release that officially. (the changes in the scripts are minimal)

Regards, Roy

chkp-alonshev commented 3 years ago

Thank you for submitting this issue, We fixed this issue on our provider's new version, V1.5.0, This version is now available for use.