krystal / terraform-provider-katapult

Terraform Provider for Katapult.
https://registry.terraform.io/providers/krystal/katapult/latest/docs
MIT License
5 stars 2 forks source link

fix(v6provider): add plan modifier rules to reduce excessive known after apply issues #131

Closed jimehk closed 3 months ago

jimehk commented 3 months ago

Fixes load balancer rules being marked as requiring re-creation when any attribute is modified on the associate load balancer. This was happening cause the id attribute on the load balancer got marked as "known after apply" whenever there were any changes to the load balancer. This in turn caused any load balancer rules which uses the load balancer ID to be marked as re-create, since any change to the load_balancer_id attribute requires the rule to be re-created.

We're essentially changing the planning phase so that is copies the value from the current state if not known in the plan. Additionally, the load balancer resource gets a custom plan modifier that correctly handles changes between virtual_machine_ids, virtual_machine_group_ids and tag_ids.