vmware / terraform-provider-vra

Terraform Provider for VMware Aria Automation
https://registry.terraform.io/providers/vmware/vra/
Mozilla Public License 2.0
101 stars 89 forks source link

fabric_network_ids attribute of the vra_network_ip_range resource doesn’t link any NSX-T segment to the IP range #501

Closed vmeoc closed 11 months ago

vmeoc commented 1 year ago

vRA Version

            vRA 8.10.2

Terraform Version

            Terraform v1.3.3

vRA Terraform Provider Version

            vRA provider version 0.7.3 (but probably starts from 0.6.0 where the change on the resource attribute was implemented.

Affected Resource(s)


resource "vra_network_ip_range" "xxxxxxxx" {

  name              = “xxxxxxxx"

  description       = “xxxxxxxx"

  start_ip_address  = "00.00.00.00"

  end_ip_address    = "00.00.00.00"

  ip_version        = "IPv4"

  fabric_network_ids = [data.vra_fabric_network.yyyyyyyyyy.id]

}

Expected Behavior

            The provided list with only on segment should have linked it to the IP range created, just like in provider version 0.5.3 was doing with a string

Actual Behavior

            Terraform apply is successful with no error or warning, but the IP range is not connected to any NSX-T segment anymore

Steps to Reproduce

terraform apply with the configuration (on an already existing resource)

Screenshots

N/A

Debug Output

N/A

Panic Output

            N/A

Important Factoids

            N/A

References

            N/A

Community Note

Code of Conduct

This project has a Code of Conduct that all participants are expected to understand and follow:

vRA Version

Terraform Version

vRA Terraform Provider Version

Affected Resource(s)

Terraform Configuration Files

# Copy-paste your Terraform configurations here.
# For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file.

Expected Behavior

Actual Behavior

Steps to Reproduce

Screenshots

Debug Output

Panic Output

Important Factoids

References

Community Note

frodenas commented 11 months ago

Looking at the swagger API specs, we see that the POST request used to create a Network IP Range allows, as part of the request body, specifying a "fabricNetworkIds" parameter (this is the parameter used to specify the NSX-T segment), but at the GET request (used when the provider retrieves the details of the Network IP Range), the response body does NOT contain that property. This is why the terraform read operation is unable to fill that property after an apply.

I've opened an internal query (internal reference VRAE-54569) to see if there's any existing API that the terraform provider can use to retrieve the associated Fabric Network IDs for a particular Network IP Range.

frodenas commented 11 months ago

This has been solved as part of #504.

vmeoc commented 9 months ago

Hi, my customer tells me that the latest release did not fix the issue: when fabric_network_ids is being used instead of fabric_network_id, no fabric network are attached to the ip range.