Open achavanpan opened 7 months ago
Thanks for raising this issue. Could you try to add "depends_on" to below terraform resources you're using to run them in sequence and then see if the issue still exists? Thanks.
azurerm_virtual_network azurerm_subnet azurerm_public_ip azurerm_network_security_group azurerm_network_interface azurerm_virtual_network_peering azurerm_route_table azurerm_subnet_route_table_association azurerm_subnet_network_security_group_association azurerm_local_network_gateway azurerm_virtual_network_gateway azurerm_virtual_network_gateway_connection
Hi @rcskosir , I am hitting in new issue now.
│ Error: Creating/Updating Virtual Network Gateway: (Name "onpremVNG" / Resource Group "adhi-jqpih4-0"): network.VirtualNetworkGatewaysClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="PublicIpWithBasicSkuNotAllowedOnVPNGateways" Message="Basic IP configuration for VPN Virtual Network Gateways is not supported. Follow the link for more details : https://go.microsoft.com/fwlink/p/?linkid=2241350 /subscriptions/5b06bdb3-3a0c-4c26-a14d-7a5322b21f07/resourceGroups/adhi-jqpih4-0/providers/Microsoft.Network/virtualNetworkGateways/onpremVNG" Details=[] │
If I add SKU as Standard in TF it errors out with │ Error: Static IP allocation must be used when creating Standard SKU public IP addresses. │ │ with module.deployment[0].azurerm_public_ip.Site-PublicIP, │ on deployment/network.tf line 91, in resource "azurerm_public_ip" "Site-PublicIP": │ 91: resource "azurerm_public_ip" "Site-PublicIP" {
And I cannot have Static IP for Virtual Network Gateway. This was working fine couple of weeks back.
Also, @neil-yechenwei . Your above suggestion with depends on didnt work. Still hitting with this issue.
I see this issue on NCUS, FranceCentral. It passes on WestUS most of the times. @neil-yechenwei. I have added depends on to my resources followed by the sequence you suggested
Any update? WAs there any announcement from Microsoft related to the changes that are now causing previously working IaC to fail?
"Basic IP configuration for VPN Virtual Network Gateways is not supported.
Referring to the above error.
Was there any solution for this?
For anyone who reads this in future. The Basic SKU public IP is being phased out and its not supported anymore for new VPNs: https://learn.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-vpn-faq#how-does-public-ip-address-basic-sku-retirement-affect-my-vpn-gateways
Can confirm that what's required to get this working is to move azurerm_public_ip
into a different allocation method:
allocation_method = "Static"
sku = "Standard"
zones = [1, 2, 3]
Attachment to azurerm_virtual_network_gateway
works when public IP was generated this way.
Is there an existing issue for this?
Community Note
Terraform Version
1.3.7
AzureRM Provider Version
3.69
Affected Resource(s)/Data Source(s)
azurerm_subnet, azurerm_subnet_network_security_group_association
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The Terraform should be applied successfully and create all required resources.
Actual Behaviour
Intermittently the TF fails with 2 reasons:
│ Error: creating Subnet (Subscription: "xx" │ Resource Group Name: "xx" │ Virtual Network Name: "hubVnet1-xx" │ Subnet Name: "subnet1-hubVnet1-xx"): network.SubnetsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded │ │ with module.deployment[0].azurerm_subnet.subnet1, │ on deployment/network.tf line 59, in resource "azurerm_subnet" "subnet1": │ 59: resource "azurerm_subnet" "subnet1" { │
│ Error: updating Network Security Group Association for Subnet (Subscription: "xx" │ Resource Group Name: "xx" │ Virtual Network Name: "hubVnet1-xx" │ Subnet Name: "subnet2-hubVnet1-xx"): network.SubnetsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: context deadline exceeded │ │ with module.deployment[0].azurerm_subnet_network_security_group_association.hub_trust, │ on deployment/network.tf line 328, in resource "azurerm_subnet_network_security_group_association" "hub_trust": │ 328: resource "azurerm_subnet_network_security_group_association" "hub_trust" {
And before these errors I see
module.deployment[0].azurerm_subnet_network_security_group_association.hub_trust: Still creating... [28m50s elapsed] module.deployment[0].azurerm_subnet_network_security_group_association.hub_trust: Still creating... [29m0s elapsed] module.deployment[0].azurerm_subnet_network_security_group_association.hub_trust: Still creating... [29m10s elapsed] module.deployment[0].azurerm_subnet_network_security_group_association.hub_trust: Still creating... [29m20s elapsed] module.deployment[0].azurerm_subnet_network_security_group_association.hub_trust: Still creating... [29m30s elapsed] module.deployment[0].azurerm_subnet_network_security_group_association.hub_trust: Still creating... [29m40s elapsed] module.deployment[0].azurerm_subnet_network_security_group_association.hub_trust: Still creating... [29m50s elapsed]
And fails after 30 mins.
This issue is seen very often.
Steps to Reproduce
Terraform apply with above TF file
Important Factoids
No
References
Not Aware