Open
Description
Code of Conduct
This project has a Code of Conduct that all participants are expected to understand and follow:
- I have read and agree to the project's Code of Conduct
vRA Version
vRA Cloud 8.10.0
Terraform Version
0.12+
vRA Terraform Provider Version
0.6.0
Affected Resource(s)
vra_region
vra_zone
vra_cloud_account_vsphere
When creating a vra_cloud_account_vsphere resource, the related regions name share the same value as externalRegionId.
Terraform Configuration Files
data "vra_region_enumeration_vsphere" "this" {
accept_self_signed_cert = false
dc_id = var.dc_id
hostname = var.vcenter_hostname
username = var.vcenter_username
password = var.vcenter_password
}
resource "vra_cloud_account_vsphere" "this" {
name = "tf-vsphere-account"
description = "foobar"
hostname = var.vcenter_hostname
username = var.vcenter_username
password = var.vcenter_password
dc_id = var.dc_id
regions = data.vra_region_enumeration_vsphere.this.regions
associated_cloud_account_ids = []
accept_self_signed_cert = true
}
data "vra_region" "this" {
filter = name eq "my_dc_name"
}
Expected Behavior
The way it was working with the vra provider 0.4.x was great. We had the name and the id from the vCenter, not the id set twice in name and externalRegionId variables
Actual Behavior
{
"content": [
{
"externalRegionId": "Datacenter:datacenter-3",
"name": "Datacenter:datacenter-3",
"cloudAccountId": "cloudaccount_id",
"id": "region_id",
"updatedAt": "2022-10-24",
"organizationId": "org_id",
"orgId": "org_id",
"_links": {
"self": {
"href": "/iaas/api/regions/region_id"
},
"cloud-account": {
"href": "/iaas/api/cloud-accounts/cloudaccount_id"
}
}
}
],
"totalElements": 1,
"numberOfElements": 1
}
Steps to Reproduce
terraform {
required_version = ">= 0.12"
required_providers {
vra = {
source = "vmware/vra"
version = "0.6.0"
}
}
}
terraform apply
- Make a GET API call to https://de.api.mgmt.cloud.vmware.com/iaas/api/regions
- See the name and externalRegionId being the same
Screenshots
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, 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