Open jdelforno opened 2 years ago
The property for the Private IP is ReadOnly specified in the REST API specs. This blocks the possibility to set it in the resource.
@jdelforno Is it a solution for you to have the Static
option removed instead for clarity? As far as I know it is also not possible to set this in other provisioning options like ARM and az cli
.
@aristosvo
If there's no way to set a static private ip address, then the only option for the allocation method is Dynamic and Static should be removed as an 'option' from documentation.
private_ip_address_allocation - (Optional) Defines how the private IP address of the gateways virtual interface is assigned. Valid options are Static or Dynamic. Defaults to Dynamic.
It would also help when having it as "Dynamic" to expose that private IP address
(azurerm_virtual_network_gateway.
Community Note
Terraform (and AzureRM Provider) Version
terraform -v Terraform v1.1.2 on windows_amd64
Affected Resource(s)
azurerm_virtual_network_gateway
Terraform Configuration Files
Not entirely sure what to paste here.
Debug Output
Private IP address is required when privateIPAllocationMethod is Static in IP configuration
Expected Behaviour
Documentation fails to list a method to supply a static IP Address, which is now required.
Actual Behaviour
Static isn't possible however it's stated as an option.
Steps to Reproduce
`resource "azurerm_virtual_network_gateway" "example" { name = "test" location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name
type = "Vpn" vpn_type = "RouteBased"
active_active = false enable_bgp = false sku = "Basic"
ip_configuration { name = "vnetGatewayConfig" public_ip_address_id = azurerm_public_ip.example.id private_ip_address_allocation = "Static" subnet_id = azurerm_subnet.example.id } }`
Important Factoids
References
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network_gateway
`The ip_configuration block supports:
`
0000