This is an example on how to create a project and assign a zone to it.
There are variables which need to be added to terraform.tfvars. The first are for connecting to the vRealize Automation (vRA) endpoint. There are names of cloud_account, region, zone, already setup in vRA.
url
- The URL for the vRealize Automation (vRA) endpointrefresh_token
- The refresh token for the vRA accountinsecure
-false
for vRA Cloud andtrue
for vRA on-premzone_name
- The compute placement zone within a region where machines can be placedproject_name
- Project name
To facilitate adding these variables, a sample tfvars file can be copied first:
cp terraform.tfvars.sample terraform.tfvars
A project can be created just with a project name. But this example shows how to create a project and assign zones to it. In order to achieve that, a cloud account must be setup in vRA and a zone must be created within a region.
Follow these examples for setting up specific cloud accounts:
- Setup cloud_account_aws
- Setup cloud_account_azure
- Setup cloud_account_gcp
- Setup cloud_account_vsphere
While the cloud account examples included setting up zones, here is an example to setup a zone:
- Setup zone
Once the information is added to terraform.tfvars
, the project can be created via:
terraform init
terraform apply