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

Update nsxt_nat_rule with firewall_match #950

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

ksamoray
Copy link
Collaborator

@ksamoray ksamoray commented Aug 24, 2023

firewall_match attribute replace nat_pass in nsxt_nat_rule resource.

Fixes: #945

@ksamoray ksamoray force-pushed the nsxt_nat_rule_nat_pass branch from 7fcfaf9 to c8dc410 Compare August 24, 2023 11:09
@ksamoray ksamoray requested a review from annakhm August 24, 2023 11:09
@@ -245,41 +239,43 @@ func resourceNsxtNatRuleUpdate(d *schema.ResourceData, m interface{}) error {
//match_service := d.Get("match_service").(*NsServiceElement)
matchSourceNetwork := d.Get("match_source_network").(string)
natPass := d.Get("nat_pass").(bool)
firewallMatch := model.NatRule_FIREWALL_MATCH_MATCH_INTERNAL_ADDRESS
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we know what version this was added in?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nat_pass was removed at 4.0.0
firewall_match exists in 2.4 - it seemed old enough so I didn't check earlier versions...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe I should keep the code which uses the old API for pre-4.0.0 environments?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think current code should be good, I would run the test against 3.0.0 to be sure

Copy link
Collaborator

@annakhm annakhm left a comment

Choose a reason for hiding this comment

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

LGTM

firewall_match attribute replace nat_pass in nsxt_nat_rule resource.

Signed-off-by: Kobi Samoray <[email protected]>
@ksamoray ksamoray force-pushed the nsxt_nat_rule_nat_pass branch from c8dc410 to f7dff16 Compare August 26, 2023 07:59
@annakhm
Copy link
Collaborator

annakhm commented Aug 29, 2023

/test-all

@ksamoray ksamoray merged commit 56f6b53 into vmware:master Aug 30, 2023
@ksamoray ksamoray deleted the nsxt_nat_rule_nat_pass branch August 30, 2023 10:19
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.

nsxt_nat_rule broken from NSX-T 4.0.1 onward
2 participants