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

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

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

jimehk
Copy link
Contributor

@jimehk jimehk commented Jun 19, 2024

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.

@jimehk jimehk requested a review from ikadix June 19, 2024 10:15
@jimehk jimehk marked this pull request as ready for review June 19, 2024 10:31
…ter apply issues

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`.
Copy link
Collaborator

@ikadix ikadix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jimehk jimehk merged commit 0fcb3a0 into main Jun 19, 2024
12 checks passed
@jimehk jimehk deleted the fix-plan-building-issues branch June 19, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants