-
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
azurerm_virtual_network_gateway
: making peering_address
Computed+ForceNew
#1040
Conversation
Adding a test covering spinning up an active-active VPN Fixes #916 Before: ``` $ acctests azurerm TestAccAzureRMVirtualNetworkGateway_activeActive === RUN TestAccAzureRMVirtualNetworkGateway_activeActive --- FAIL: TestAccAzureRMVirtualNetworkGateway_activeActive (1956.69s) testing.go:513: Step 0 error: After applying this step, the plan was not empty: DIFF: UPDATE: azurerm_virtual_network_gateway.test bgp_settings.0.peering_address: "10.0.1.4,10.0.1.5" => "" STATE: azurerm_public_ip.first: ID = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/publicIPAddresses/acctestpip1-7126263343628930289 provider = provider.azurerm location = eastus name = acctestpip1-7126263343628930289 public_ip_address_allocation = dynamic resource_group_name = acctestRG-7126263343628930289 sku = Basic tags.% = 0 zones.# = 0 Dependencies: azurerm_resource_group.test azurerm_public_ip.second: ID = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/publicIPAddresses/acctestpip2-7126263343628930289 provider = provider.azurerm location = eastus name = acctestpip2-7126263343628930289 public_ip_address_allocation = dynamic resource_group_name = acctestRG-7126263343628930289 sku = Basic tags.% = 0 zones.# = 0 Dependencies: azurerm_resource_group.test azurerm_resource_group.test: ID = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289 provider = provider.azurerm location = eastus name = acctestRG-7126263343628930289 tags.% = 0 azurerm_subnet.test: ID = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/virtualNetworks/acctestvn-7126263343628930289/subnets/GatewaySubnet provider = provider.azurerm address_prefix = 10.0.1.0/24 ip_configurations.# = 0 name = GatewaySubnet resource_group_name = acctestRG-7126263343628930289 service_endpoints.# = 0 virtual_network_name = acctestvn-7126263343628930289 Dependencies: azurerm_resource_group.test azurerm_virtual_network.test azurerm_virtual_network.test: ID = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/virtualNetworks/acctestvn-7126263343628930289 provider = provider.azurerm address_space.# = 1 address_space.0 = 10.0.0.0/16 dns_servers.# = 0 location = eastus name = acctestvn-7126263343628930289 resource_group_name = acctestRG-7126263343628930289 subnet.# = 0 tags.% = 0 Dependencies: azurerm_resource_group.test azurerm_virtual_network_gateway.test: ID = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/virtualNetworkGateways/acctestvng-7126263343628930289 provider = provider.azurerm active_active = true bgp_settings.# = 1 bgp_settings.0.asn = 65010 bgp_settings.0.peer_weight = 0 bgp_settings.0.peering_address = 10.0.1.4,10.0.1.5 enable_bgp = true ip_configuration.# = 2 ip_configuration.0.name = gw-ip1 ip_configuration.0.private_ip_address_allocation = Dynamic ip_configuration.0.public_ip_address_id = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/publicIPAddresses/acctestpip1-7126263343628930289 ip_configuration.0.subnet_id = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/virtualNetworks/acctestvn-7126263343628930289/subnets/GatewaySubnet ip_configuration.1.name = gw-ip2 ip_configuration.1.private_ip_address_allocation = Dynamic ip_configuration.1.public_ip_address_id = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/publicIPAddresses/acctestpip2-7126263343628930289 ip_configuration.1.subnet_id = /subscriptions/c0a607b2-6372-4ef3-abdb-dbe52a7b56ba/resourceGroups/acctestRG-7126263343628930289/providers/Microsoft.Network/virtualNetworks/acctestvn-7126263343628930289/subnets/GatewaySubnet location = eastus name = acctestvng-7126263343628930289 resource_group_name = acctestRG-7126263343628930289 sku = VpnGw1 tags.% = 0 type = Vpn vpn_type = RouteBased Dependencies: azurerm_public_ip.first azurerm_public_ip.second azurerm_resource_group.test azurerm_subnet.test FAIL exit status 1 FAIL github.com/terraform-providers/terraform-provider-azurerm/azurerm 1956.721s ``` Now: ``` $ acctests azurerm TestAccAzureRMVirtualNetworkGateway_activeActive === RUN TestAccAzureRMVirtualNetworkGateway_activeActive --- PASS: TestAccAzureRMVirtualNetworkGateway_activeActive (1968.01s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 1968.050s ```
azurerm_virtual_network_gateway
: making peering_address
ForceNewazurerm_virtual_network_gateway
: making peering_address
Computed+ForceNew
@@ -188,6 +188,7 @@ The `bgp_settings` block supports: | |||
|
|||
* `peer_weight` - (Optional) The weight added to routes which have been learned | |||
through BGP peering. Valid values can be between `0` and `100`. | |||
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.
I think this should be for peering_address
instead of peer_weight
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.
good spot - fixed.
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
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! |
Adding a test covering spinning up an active-active VPN
Fixes #916
Before:
Now: