-
Notifications
You must be signed in to change notification settings - Fork 112
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
new distributed firewall rule with above_rule_id gets the id of the first already existing firewall rule #1202
Comments
@Didainius any possible update here? |
I am not yet 100% confident I can squeeze it in for this release, but I will try to. |
@Didainius thank you for your work, is there any known workaround? this is currently a blocker for us ;( |
Hi Didainius, Thanks! I have compiled the bug-1202 branch (with go 1.22.3) and installed the 3.13.0 version of vcd provider. From the various tests done the bug seems resolved. The order of the rules is correct now. After applying the terraform config that creates the new rule, the second terraform plan shows no changes. I have tested:
Thanks again! +1 |
The fix is now in |
Hello,
Description
When using resource.vcd_nsxt_distributed_firewall_rule to insert a rule in the distributed firewall rules list, with the above_rule_id argument set to the ID of the last existing rule in the list (default drop rule), it results in terraform creating the rule as required however in the state a wrong rule is saved.
When creating a new rule with above_rule_id set to the ID of the first existing rule, then it works OK.
Terraform Version
Terraform v1.7.1
on linux_amd64
Also with Terraform 1.5.5 and vcd 3.10.0
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Actual Behavior
From above, 5259729e is the ID of the first rule that already existed in the rules list. Checking state with:
state contains the first rule that already existed in the list, instead of the actually created rule.
This then results in terraform trying to update the wrong rule in the firewall on next apply, to replace it's name, source_ids etc.
Expected Behavior
The vcd_nsxt_distributed_firewall_rule should have a new ID and is correctly saved in the state file and next terraform apply operation should have no other changes/updates.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Not using above_rule_id for the new rule results in the expected behavior, the new rule has a different new ID and is correctly saved in state and terraform apply has no other changes further.
The text was updated successfully, but these errors were encountered: