If you want to use the Terraform procedures that use the vRealize Automation Terraform provider, you must obtain an API refresh token from vRealize Automation by using PowerShell.
Procedure
Start Windows PowerShell.
Replace the values in the sample code with values from your VMware Cloud Foundation Planning and Preparation Workbook and run the commands in the PowerShell console.
$vraFqdn = "xint-vra01.rainpole.io" $vraUser = "configadmin" $vraPass = "VMw@re1!"
Perform the configuration by running the command in the PowerShell console.
Request-vRAToken -fqdn $vraFqdn -username $vraUser -password $vraPass -displayToken
The command output contains the refresh token.
---------Refresh Token--------- XveDgaeODzcsSHZ24m33nYQOh8hTBRKx -------------------------------
-
Save the refresh token in your VMware Cloud Foundation Planning and Preparation Workbook.
What to do next
You use the refresh token in the Terraform procedures that use the vRealize Automation Terraform provider.
vra_url = "https://xint-vra01.rainpole.io" vra_api_token = "XveDgaeODzcsSHZ24m33nYQOh8hTBRKx" vra_insecure = false