-
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
upgrade network to 2020-05-01 for vhub(conn) & vwan #7601
upgrade network to 2020-05-01 for vhub(conn) & vwan #7601
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.
left a few comments inline but this otherwise LGTM 👍
azurerm/internal/services/network/virtual_hub_connection_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/virtual_hub_connection_resource.go
Outdated
Show resolved
Hide resolved
|
||
* `vitual_network_to_hub_gateways_traffic_allowed` - (Optional) Is Remote Virtual Network traffic allowed to transit the Hub's Virtual Network Gateway's? Changing this forces a new resource to be created. | ||
* `vitual_network_to_hub_gateways_traffic_allowed` - (Optional / **Deprecated** ) Is Remote Virtual Network traffic allowed to transit the Hub's Virtual Network Gateway's? Changing this forces a new resource to be created. |
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.
arguably since this is non-functional we could remove this:
* `vitual_network_to_hub_gateways_traffic_allowed` - (Optional / **Deprecated** ) Is Remote Virtual Network traffic allowed to transit the Hub's Virtual Network Gateway's? Changing this forces a new resource to be created. |
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.
How about just keep this (as user is still allowed to assign it) but change the document so something like:
Due to a breaking behavioural change in the Azure API this property is no longer functional and will be removed in version 3.0 of the provider
@@ -58,9 +58,9 @@ The following arguments are supported: | |||
|
|||
--- | |||
|
|||
* `hub_to_vitual_network_traffic_allowed` - (Optional) Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created. | |||
* `hub_to_vitual_network_traffic_allowed` - (Optional / **Deprecated** ) Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created. |
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.
arguably since this is non-functional we could remove this:
* `hub_to_vitual_network_traffic_allowed` - (Optional / **Deprecated** ) Is the Virtual Hub traffic allowed to transit via the Remote Virtual Network? Changing this forces a new resource to be created. |
@@ -40,7 +40,7 @@ The following arguments are supported: | |||
|
|||
* `allow_branch_to_branch_traffic` - (Optional) Boolean flag to specify whether branch to branch traffic is allowed. Defaults to `true`. | |||
|
|||
* `allow_vnet_to_vnet_traffic` - (Optional) Boolean flag to specify whether VNet to VNet traffic is allowed. Defaults to `false`. | |||
* `allow_vnet_to_vnet_traffic` - (Optional / **Deprecated** ) Boolean flag to specify whether VNet to VNet traffic is allowed. Defaults to `false`. |
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.
arguably since this is non-functional we could remove this:
* `allow_vnet_to_vnet_traffic` - (Optional / **Deprecated** ) Boolean flag to specify whether VNet to VNet traffic is allowed. Defaults to `false`. |
azurerm/internal/services/network/tests/virtual_hub_connection_resource_test.go
Show resolved
Hide resolved
@tombuildsstuff Thank you for the review comments! I have updated accordingly. Please take a look! |
3b522f1
to
58c0ee0
Compare
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, thanks so much for this PR, LGTM! 🚀
@WodansSon I have submit another update to ensure the routing state reaches "Provisioned" so as to avoid race condition between vhub internal routing update and hub vnet connection caused routing update. I have tested it in West Europe: 💤 make testacc TEST=./azurerm/internal/services/network/tests TESTARGS='-run TestAccAzureRMVirtualHubConnection_update'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test ./azurerm/internal/services/network/tests -v -run TestAccAzureRMVirtualHubConnection_update -timeout 180m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
=== RUN TestAccAzureRMVirtualHubConnection_update
=== PAUSE TestAccAzureRMVirtualHubConnection_update
=== CONT TestAccAzureRMVirtualHubConnection_update
--- PASS: TestAccAzureRMVirtualHubConnection_update (3117.31s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network/tests 3117.349s |
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, thank you for pushing these changes, this LGTM 🚀
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.
hey @magodo
Thanks for pushing those changes - I've taken a look through and left some comments inline; if we can fix those up then this should otherwise be good to merge (we'll need to add an "upgrade note" to the changelog, but we'll do that at merge time)
Thanks!
azurerm/internal/services/network/virtual_hub_connection_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/virtual_hub_connection_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/virtual_hub_connection_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/network/virtual_hub_connection_resource.go
Outdated
Show resolved
Hide resolved
@tombuildsstuff I have resolved the remaining comments, please take another look! Thanks! |
…_security_enabled` The deprecated attributes are always `true` on return, as they are deprecated, we can simply suppress any diff on it. `internet_security_enabled` seems has changed in this new version that it is `false` even if it is omit in the request.
…_network_resources_to_2020-05-01
…etwork_resources_to_2020-05-01
@tombuildsstuff I have resolved the remaining comments, especially this one. Would you please take another look? |
…_network_resources_to_2020-05-01
…_network_resources_to_2020-05-01
@magodo, thanks for pushing these changes and fixing the conflict! 🚀 |
Hi, This is very urgent. Using the old API version will clear the routes on the vWAN causing major issues. We had a production incident caused by this. Also mentioned as recommended in the vWAN FAQ: |
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.
LGTM 👍
This has been released in version 2.29.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.29.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! |
Upgrade network to 2020-05-01 for virtual hub(conn) & virtual wan resources.
Changes include:
azurerm_virtualhub_connection
, as the original field inazurerm_virtualhub
used to create/delete vhub conn is removed from API.hub_to_vitual_network_traffic_allowed
andvitual_network_to_hub_gateways_traffic_allowed
fromazurerm_virtualhub_connection
, as they are deprecated by API.allow_vnet_to_vnet_traffic
fromazurerm_virtual_wan
as this is not deprecated by API.(follow-up PR for #7585 )
(fixes #7896 )