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

readManagementAccessRule not setting value for position #64

Closed Sreerag74031 closed 3 years ago

Sreerag74031 commented 3 years ago

While trying to import access rule 'position' is not getting imported to terraform state, this is resulting in terraform plan output object changes.

chkp-royl commented 3 years ago

Hi @Sreerag74031,

'position' is not getting imported to terraform state since it's value not returned in 'show-access-rule' API command. You need to define this field manually in resource configuration file. Please let me know if it's solve your problem.

Thanks, Roy

Sreerag74031 commented 3 years ago

Hi @chkp-royl

We faced similar challenge when we tried to import configurations into terraform config files , and we used 'show-access-rulebase' API in our python code and we are getting access section to define the position. Could we use this api 'show-access-rulebase' so we get the position updated in terrafrom state file?

chkp-royl commented 3 years ago

Hi @Sreerag74031, Thanks for sharing this input. We will add new data-source of 'show-access-rulebase' API command on the next version of Check Point provider.

Regards, Roy

Sreerag74031 commented 3 years ago

Could this api 'show-access-rulebase' be used instead of 'show-access-rule' for importing access rule so position field for access rule in terraform state file get updated. show-access-rulebase could be used with filter to read only one access rule e.g. "filter" : "uid:be146170-a996-47c8-acfd-2b7dfb9e6d0f"

chkp-alonshev commented 3 years ago

Hi @Sreerag74031 The new provider's version is now available and it includes your requested feature, you may use it now.

Thank you, Alon