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.57k stars 4.62k forks source link

resource Network Interface has different attributes than datsource #17855

Open jdelforno opened 2 years ago

jdelforno commented 2 years ago

Is there an existing issue for this?

Community Note

Description

The resource for network interfaces doesn't contain the majority of configurable attributes; https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface#attributes-reference

And yet, the datasource for this resource, contains everything you'd expect; https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/network_interface

Can this documentation be brought into parity?

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

azurerm_network_interface

Potential Terraform Configuration

azurerm_network_interface.example[*].ip_configuration

resource "azurerm_network_interface" "example" {
  name                = "example-nic"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  ip_configuration {
    name                          = "internal"
    subnet_id                     = azurerm_subnet.example.id
    private_ip_address_allocation = "Dynamic"
  }
}

azurerm_network_interface.ethernet0_1["example"].ip_configuration - definitely works, however it's listed on the NWI documentation.

References

No response

tombuildsstuff commented 2 years ago

@jdelforno the ip_configuration block is listed in the documentation: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface#ip_configuration (with properties here: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_interface#gateway_load_balancer_frontend_ip_configuration_id) - can you clarify which properties you're seeing that aren't documented?

jdelforno commented 1 year ago

@tombuildsstuff, I'm rather certain this comes back to my own inexperience. However, the documentation for the resource has the following attributes listed as exported;

Where as the data object also lists;

I would assume that the attributes "supported" on the resource are all exported, however, with the documentation the way it's currently written - to me - it doesn't read as so.