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

dynamic_objects not properly managed in checkpoint_management_lsm_gateway resources #201

Open
verduynb opened this issue Dec 11, 2024 · 2 comments
Labels

Comments

@verduynb
Copy link

Hello
I use MDS R81.20 JHF 89. terraform provider 2.8.1
I notice 2 problems with dynamic objects:

  1. If I create a LSM gateway without dynamics objects with terraform. When I manually add a dynamic object in the GUI and i perform terraform apply/publish again. It doesn't delete the dynamic object.

It seems to detect the change however ( it shoud remove epeHorloges :


  # checkpoint_management_lsm_gateway.test-bp38169ybeecf01 will be updated in-place
  ~ resource "checkpoint_management_lsm_gateway" "test-bp38169ybeecf01" {
        id                    = "0a4af741-c93b-4327-8126-645c2e2f06de"
        name                  = "test-bp38169ybeecf01"
      ~ provisioning_settings = {
          - "provisioning_profile" = "No Provisioning Profile" -> null
        }
        tags                  = []
      - version               = "R81.10" -> null
        # (10 unchanged attributes hidden)

      - dynamic_objects {
          - name     = "epeHorloges" -> null
          - uid      = "4a71265c-b67c-4f99-bdcf-038a9a826d26" -> null
            # (1 unchanged attribute hidden)

          - resolved_ip_addresses {
              - ipv4_address = "192.5.3.1" -> null
            }
        }

        # (1 unchanged block hidden)
    }

  1. If I create a LSM gateway with one dynamic object with terraform. If I want to add an other dynamic object, it complains about the first one already existing.

    │ Error: failed to execute API call
    │ Status: 400 Bad Request
    │ Code: generic_err_invalid_parameter
    │ Message: Invalid parameter for [Dynamic object {} is already used.]. epeHorloges

    │ with checkpoint_management_lsm_gateway.test-bp38169ybeecf01,
    │ on CREA-38169-bp38169ybeecf01.tf line 1, in resource "checkpoint_management_lsm_gateway" "test-bp38169yb eecf01":
    │ 1: resource "checkpoint_management_lsm_gateway" "test-bp38169ybeecf01" {

I can provide terraform files if needed

@chkp-royl chkp-royl added the bug label Dec 12, 2024
@chkp-royl
Copy link
Contributor

Thanks for reporting this issue @verduynb.

  1. To remove dynamic content you firstly need to update your terraform files to be align with the GUI changes and then to remove the block of dynamic content. In addition, We will check if anything else should be done from our side.
  2. It seems like bug in LSM gateway API and not issue in the provider. I will report this issue to the relevant owner.

@verduynb
Copy link
Author

Hello @chkp-royl
Thanks for your quick answer

  1. I hope we will be able to do sth. I want to trust my terraform code to be exactly what is configured in production. We have a quite large environnement and it would really help to be able to manage it as code. We may even use it as proofs for audits.
  2. thanks a lot for your help ! if it's an SR. may be you can inform Xavier Bensemhoun. we have a diamond support contract. May be he can help.

Regards
Benoit

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

No branches or pull requests

2 participants