terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

Unsupported Argument while creating azure vpn gateway

Open Prasanth-Sundarrajan opened this issue 3 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.2.1

AzureRM Provider Version

2.99

Affected Resource(s)/Data Source(s)

azurerm_virtual_network_gateway

Terraform Configuration Files

resource "azurerm_virtual_network_gateway" "vpn-gw" {
  name = "vng-${var.env}-we"
  location = azurerm_resource_group.rg[0].location
  resource_group_name = azurerm_resource_group.rg[0].name
  type = "Vpn"
  vpn_type = "RouteBased"
  active_active = true
  enable_bgp = false
  sku = "VpnGw1AZ"
  ip_configuration {
    name = "vnetGatewayConfig"
    public_ip_address_id = azurerm_public_ip.vpn-gateway-ip.id    
    private_ip_address_allocation = "Dynamic"
    subnet_id = azurerm_subnet.gw_snet[0].id
  }
  ip_configuration {
    name = "vnetGatewayConfig1"
    public_ip_address_id = azurerm_public_ip.vpn-gateway-ip-secondary.id
    private_ip_address_allocation = "Dynamic"
    subnet_id = azurerm_subnet.gw_snet[0].id
  }
  ip_configuration {
    name = "vnetGatewayConfig2"
    public_ip_address_id = azurerm_public_ip.vpn-gateway-ip-vpn.id
    private_ip_address_allocation = "Dynamic"
    subnet_id = azurerm_subnet.gw_snet[0].id
  }
  vpn_client_configuration {
    address_space = ["xx.xxx.xx/24"]
    vpn_authentication_types = ["AAD"]
    tenant_uri = "https://login.microsoftonline.com/xxxxxxxxxxxxxxxxxxxxxxxxx"
    audience_id = "41b23e61-6c1e-4545-b367-cd054e0ed4b4"
    aad_issuer_uri = "https://sts.windows.net/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

Debug Output/Panic Output

Error: Unsupported argument
│ 
│   on main.tf line 834, in resource "azurerm_virtual_network_gateway" "vpn-gw":
│  834:     vpn_authentication_types = ["AAD"]
│ 
│ An argument named "vpn_authentication_types" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on main.tf line 835, in resource "azurerm_virtual_network_gateway" "vpn-gw":
│  835:     tenant_uri = "https://login.microsoftonline.com/************************************"
│ 
│ An argument named "tenant_uri" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on main.tf line 836, in resource "azurerm_virtual_network_gateway" "vpn-gw":
│  836:     audience_id = "41b23e61-6c1e-4545-b367-cd054e0ed4b4"
│ 
│ An argument named "audience_id" is not expected here.

Expected Behaviour

It should succeed and creates vpn gateway

Actual Behaviour

Error
Error: Unsupported argument
│ 
│   on main.tf line 834, in resource "azurerm_virtual_network_gateway" "vpn-gw":
│  834:     vpn_authentication_types = ["AAD"]
│ 
│ An argument named "vpn_authentication_types" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on main.tf line 835, in resource "azurerm_virtual_network_gateway" "vpn-gw":
│  835:     tenant_uri = "https://login.microsoftonline.com/************************************"
│ 
│ An argument named "tenant_uri" is not expected here.
╵
╷
│ Error: Unsupported argument
│ 
│   on main.tf line 836, in resource "azurerm_virtual_network_gateway" "vpn-gw":
│  836:     audience_id = "41b23e61-6c1e-4545-b367-cd054e0ed4b4"
│ 
│ An argument named "audience_id" is not expected here.

Steps to Reproduce

terraform apply

Important Factoids

No response

References

No response

Prasanth-Sundarrajan avatar Aug 12 '22 11:08 Prasanth-Sundarrajan