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

simple-cluster does not import or refresh state correctly #84

Closed harhan closed 3 years ago

harhan commented 3 years ago

https://community.checkpoint.com/t5/API-CLI-Discussion/Terraform-simple-cluster-member-state-import/m-p/132160#M6348

This is a bug breaking the basic intention of how terraform should work.

chkp-alonshev commented 3 years ago

Hi @harhan We will work on a solution for this bug and release it on the next provider's version. If you would like, I can let you know when we solve this bug and send you a solution so you will be able to fix it on your local machine instead of waiting for the next provider's version.

Thank you

chkp-alonshev commented 3 years ago

@harhan Solution:

change lines 1434-1439 on resource_checkpoint_management_simple_cluster.go change this: https://github.com/CheckPointSW/terraform-provider-checkpoint/blob/bf198424493bfe96a50b06648069ecd31467ff1d/checkpoint/resource_checkpoint_management_simple_cluster.go#L1434-L1439 to : if v, _ := memberJson["sic-message"]; v != nil && v != "Uninitialized" { memberState["sicmessage"] = v } if v, := memberJson["sic-state"]; v != nil && v != "uninitialized" { memberState["sic_state"] = v }

We will publish this update on the next provider's version. meanwhile you may fix it on your local machine to continue your work.

Thank you, Alon Shevach

b-diggity commented 3 years ago

Has there ever been consideration for doing fix releases (example: 1.5.1)? I think it would be better to fix bugs sooner and do fix releases versus waiting for a full next version release to fix bugs. Thoughts?

chkp-alonshev commented 3 years ago

Hi @harhan, Thank you for posting this bug, we fixed it and it is available in the new terraform version.

chkp-alonshev commented 3 years ago

hi @b-diggity, We considered publishing bug fixes as sub-releases, we might do it in the future. At this instance the current version was planned to be soon, so we chose to publish all fixes in the same version.

Thank you, Alon.