Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for Data Center Object #149

Open
ModernDude opened this issue Jun 16, 2023 · 1 comment
Open

Wait for Data Center Object #149

ModernDude opened this issue Jun 16, 2023 · 1 comment

Comments

@ModernDude
Copy link

I'm using Terraform to create groups across an estate of 20+ NSX-T instances. Within the same Terraform execution, I subsequently add the groups into Checkpoint using the checkpoint_management_vmware_data_center_server resource.

I observe varied latency between the time a group is added into NSX-T and the time that group is recognized by CheckPoint. It can range from 2 seconds to 5 minutes.

When I attempt to add the group into CheckPoint via the checkpoint_management_vmware_data_center_server resource, I frequently receive errors indicating the group is not available in the target system. To work around this, I've added a five minute sleep within Terraform between the call to NSX-T and the call to CheckPoint.

This mostly works, however, my program is now executing a five minute sleep in many cases in which only a sleep of a few seconds is needed. Naturally, this slows down my system.

To optimize this, I want to ask if a better approach is to have the Terraform provider poll the CheckPoint show-data-center-content API immediately upon invocation of adding a new data center object. In other words, the Terraform provider would poll CheckPoint until a configurable timeout and only continue the call to add-data-center-object once the that object has been confirmed to be available.

It could work very similar to the waitForTask function within terraform-provider-checkpoint.

If you find merit in this idea, I'm willing to submit a Pull Request.

@ModernDude ModernDude changed the title Enhancement: Wait for Data Center Object Wait for Data Center Object Jun 16, 2023
@chkp-adambar
Copy link
Contributor

@lamf-lamf From our side it will be great if you would like to contribute to the Check Point Provider.
You can submit a pull request and we will review it.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants