hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.61k stars 4.65k forks source link

new Data source - Network Virtual Appliances #20053

Open mtarnoci opened 1 year ago

mtarnoci commented 1 year ago

Is there an existing issue for this?

Community Note

Description

Create new data source for Azure:

Fetch information about Network Virtual Appliances.

info: https://learn.microsoft.com/en-us/rest/api/virtualnetwork/network-virtual-appliances

New or Affected Resource(s)/Data Source(s)

data.azurerm_network_virtual_appliance

Potential Terraform Configuration

data "azurerm_network_virtual_appliance" "example" {
  name                = "nvaexample"
  resource_group_name = "rg-nva-example"
}

output "network_virtual_appliance" {
  value = data.network_virtual_appliance.example
}

References

No response

rb-cloud-guru commented 7 months ago

any updates on this guys! thanks or workaround!

mtarnoci commented 7 months ago

Hi As workaround, I'm using azapi provider for this, for example:

data "azapi_resource" "example" { name = parent_id = type = "Microsoft.Network/networkVirtualAppliances@2020-11-01"

response_export_values = ["*", "properties.virtualApplianceNics"] }

output "example_gi2" { value = jsondecode(data.azapi_resource. example.output).properties.virtualApplianceNics[0].privateIpAddress }

ndss8989 commented 1 month ago

Given the provider doesn't support resources for NVAs, ideally they would be supported too (I currently have to clickops create them)