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

When adding a cloud account, the region is labeled as the externalRegionId rather than the vSphere datacenter name #511

Closed ricardoconzatti closed 1 month ago

ricardoconzatti commented 9 months ago

Code of Conduct

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

vRA Version

8.13

Terraform Version

1.6.4

vRA Terraform Provider Version

0.8.3

Affected Resource(s)

vra_cloud_account_vsphere

Terraform Configuration Files

data "vra_region_enumeration_vsphere" "this" {
  hostname                            = "vcenter-02.caverna.local"
  username                            = "svc.vra@caverna.local"
  password                            = ""
  accept_self_signed_cert  = true
}

resource "vra_cloud_account_vsphere" "this" {
  name            = "Caverna vCenter 02"
  description  = ""
  hostname    = "vcenter-02.caverna.local"
  username    = "svc.vra@caverna.local"
  password    = ""

  regions                                = data.vra_region_enumeration_vsphere.this.regions
  accept_self_signed_cert  = true
}

Expected Behavior

Create a new cloud account and allow provisioning to all existing vSphere datacenters (regions). The region name should be the datacenter name (in my example, it should be "Caverna Cloud 02").

Actual Behavior

The new cloud account was created with no errors, but the vSphere regions were configured by ID (externalRegionId). When I edit the new cloud account and save that without any change, the region name changed from externalRegionId to Name (vSphere datacenter name).

Steps to Reproduce

Just run a terraform apply using the code above and check the column Account / Region in Compute (Assembler > Infrastructure > Resources > Compute).

Screenshots

Screenshot 2023-11-28 at 18 32 45

Screenshot 2023-11-28 at 18 33 14

Screenshot 2023-11-28 at 18 33 36

Debug Output

N/A

Panic Output

N/A

Important Factoids

N/A

References

N/A

Community Note

BerryR-RBA commented 6 months ago

Hi @ricardoconzatti, is this a duplicate of #472?

ricardoconzatti commented 6 months ago

Hi @ricardoconzatti, is this a duplicate of #472?

Heey @BerryR-RBA. I think it is similar. By the way, I tried right now in vra provider version 0.8.6 and I had the same issue.

BerryR-RBA commented 6 months ago

Yup, I'm having the same issue with v0.8.6.

Suggest that you (and anyone else impacted) upvote #472

tenthirtyam commented 1 month ago

Duplicate of #472