-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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_vpn_gateway_connection #9160
New resource: azurerm_vpn_gateway_connection #9160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @magodo, overall this looks good and i've left some comments inline to address. Is the reason we need to preserve the connections on the vpn gateway that these can be set via the new client & the existing vpn connection client?
azurerm/internal/services/network/tests/vpn_gateway_connection_resource_test.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/vpn_gateway_connection_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/vpn_gateway_connection_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/vpn_gateway_connection_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/vpn_gateway_connection_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/vpn_gateway_connection_resource.go
Outdated
Show resolved
Hide resolved
@katbyte Thank you for the review, I have resolved the comments, please take another look! Regarding the changes to vpn gateway, yes, it is for reserving the connections purpose. Whilst after resolving the conflicts after merging to master branch, it appears that currently the update of vpn gateway will only do "patch" on top of the GET on the existing resource, so it means the connection will not be cleaned. So the only guarantee we need to keep is that the read-then-write operation happens as atomic, so the lock is needed only in update. |
The CI failure is unrelated to this PR... |
@@ -123,7 +123,7 @@ func resourceArmVpnSite() *schema.Resource { | |||
"asn": { | |||
Type: schema.TypeInt, | |||
Required: true, | |||
ValidateFunc: validation.IntAtLeast(1), | |||
ValidateFunc: validation.IntBetween(1, 4294967295), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magodo - This upper boundary will break the 32-bit builds, I suspect that this change will need to be reverted. Is this field expecting asplain for the value, or can it take asdot+ also?
@magodo - the CI failure is related to this PR, you have a 32bit int overflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @magodo - LGTM 👍
This has been released in version 2.37.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.37.0"
}
# ... other configuration ... |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Background
This resource helps users to create s2s connection under virtual wan. Essentially, it connects between a VPN Site (represents an on-premise network) and a vpn gateway in the virtual hub.
See the official tutorial for more info.
Test Result
Design Concerns
One concern is that for
routing_configuration
property, if the user doesn't specify the route table, service will implicitly create one. This kind of behavior seems a leak of management from Terraform. So one alternative might be to set that property asRequired
and always force users to specify the route tables.