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

New resource: azurerm_virtual_network_gateway_nat_rule #15720

Merged
merged 6 commits into from
May 18, 2022

Conversation

neil-yechenwei
Copy link
Contributor

@neil-yechenwei neil-yechenwei commented Mar 7, 2022

To resolve the issue #15348, it has to implement Virtual Network Gateway Nat Rule first. Once this PR is merged, I assume it has to submit another PR to implement egressNatRules and ingressNatRules of Virtual Network Gateway Connection (azurerm_virtual_network_gateway_connection).

--- PASS: TestAccVirtualNetworkGatewayNatRule_basic (2589.57s)
--- PASS: TestAccVirtualNetworkGatewayNatRule_updatePortRange (2697.90s)
--- PASS: TestAccVirtualNetworkGatewayNatRule_complete (2774.72s)
--- PASS: TestAccVirtualNetworkGatewayNatRule_requiresImport (2803.29s)
--- PASS: TestAccVirtualNetworkGatewayNatRule_update (3078.08s)

API reference:
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/network/resource-manager/Microsoft.Network/stable/2021-05-01/virtualNetworkGateway.json#L2389

@katbyte katbyte self-assigned this Mar 8, 2022
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

@neil-yechenwei based on #15348 it appears that we also need to split the Create and Update method for Virtual Network Gateway such that that update does a Delta update for this to work - would you be able to take a look?

Thanks!

@neil-yechenwei
Copy link
Contributor Author

neil-yechenwei commented Mar 23, 2022

@katbyte , seems the Potential Terraform Configuration in #15348 has some problem. Per my understanding and testing, I assume we should implement Virtual Network Gateway Nat Rule resource first and then implement the egressNatRules and ingressNatRules of Virtual Network Gateway Connection (azurerm_virtual_network_gateway_connection) for the association. In addition, azurerm_virtual_network_gateway_connection is using separate API client Network.VnetGatewayConnectionsClient and azurerm_virtual_network_gateway_nat_rule is also using separate API client Network.VnetGatewayNatRuleClient. So I assume we don't need to split the create and update method for the Virtual Network Gateway (azurerm_virtual_network_gateway). Does it make sense?

@katbyte
Copy link
Collaborator

katbyte commented Apr 7, 2022

Why would the fact the use a different client make a difference? they both alter the same resource and if someone wants to be able to go lifecycle ignore changes the create and update needs to be seperate. So can we please split the create and update?

@neil-yechenwei
Copy link
Contributor Author

neil-yechenwei commented Apr 11, 2022

@katbyte , I referred the existing resources nsg and nsr. So I used the separate api client here.

I splitted the create and update.

@steve-down

This comment was marked as off-topic.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @neil-yechenwei - LGTM 🦋

@github-actions
Copy link

This functionality has been released in v3.7.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants