Open an2ane opened 1 year ago
Newer versions of the vRA API require setting the region id
and name
when creating a vSphere cloud account (older versions only required the id
). The region name
specified can be any name, it does not need to match the real name of the region, it's just an internal reference for the cloud account. When using the vRA UI you will see that the region name shown in the cloud account is not the one used at the cloud account creation API, it is the real region name, but when you use the API to retrieve the cloud account, you will get the name specified at creation time (and not the real region name).
This is a limitation we discovered when we upgraded the SDK version (#421 ). At that time we decided that making an extra call inside the Terraform provider to get the real region name was too expensive and that the limitation should be addressed inside vRA and not the terraform provider. Additionally, as this is something internal (we only show the id
as part of the terraform resource schema), it should not affect end users (if this is not accurate, I'd like to understand your use case).
We currently have a story (internal reference #VRAE-12847) to address this limitation in vRA, but unfortunately, I cannot provide you any estimate on when this will be addressed.
Hello Ferran.
When using the old 0.4.1 vra provider (as it was using the old sdk), we were fetching the vra_region not by its id but by its name, which is currently the same as the datacenter we have on vSphere. Since the new sdk, as you mentionned, the vra_region name is also required but set with the same value as the datacenter id, Datacenter:datacenter-3.
Even though it does create the region on vRA successfully, this is less friendly-user as it was created before the sdk update. Knowing the dc name is easier than knowing the dc id, when getting the vra_region. Is there another way to get the region_id without using?
data "vra_region" "this" {
filter = "name eq '${var.vra_region_name}'"
}
Maybe a foreach on vra_region_enumration_vsphere?
Glad to hear the issue is tracked by the vRA team :)
Hello @frodenas.
Do you have any update about VRAE-12847?
@an2ane Unfortunately, I don't have any updates yet.
As deploying a new production stack, this bug is very confusing. I'd like this to be fixed.
This is the interface for Cloud Accounts:
And this is the interface for Cloud Zones:
How do I know which region is which, without checking URLs in the vCenter?
Hi @frodenas,
I understand that vRA limitations have made this difficult. But we now have a situation where deployed configurations are using externalRegionId
as the name.
When the provider is fixed, how will we migrate to actual names without rebuilding our infrastructure?
Thanks Rob B.
Code of Conduct
This project has a Code of Conduct that all participants are expected to understand and follow:
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
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
Steps to Reproduce
terraform apply
Screenshots
Community Note