You create vCenter Server and NSX-T Manager cloud accounts for the VI workload domains in the VMware Cloud Foundation instances. You apply the integration accounts credentials to the cloud accounts and link the cloud accounts to cloud zones.

Note:

For an environment with NSX Federation, you configure NSX-T Manager cloud accounts for the VI workload domain NSX Local Manager clusters.

UI Procedure

  1. Log in to the vRealize Automation cloud services console at https://<vra_cluster_fqdn>/csp/gateway/portal with a user assigned the Cloud Assembly administrator service role.
  2. On the main navigation bar, click Services​​.

  3. Under My Services​, click Cloud Assembly​​.

  4. Click the Infrastructure tab.

  5. In the left pane, select Connections > Cloud accounts.

  6. Add a cloud account for the VI workload domain vCenter Server.

    1. On the Cloud accounts page, click Add cloud account.

    2. On the Cloud account types page, click vCenter Server.

    3. On the New cloud account page, enter your values for the vCenter cloud account from the VMware Cloud Foundation Planning and Preparation Workbook and click Validate.

    4. If during the validation, the Untrusted certificate found dialog box appears, click Accept.

    5. After the successful validation, under Configuration, select the VI workload domain data center and select Create a cloud zone for the selected datacenter.

    6. Under Capabilities tags, add the capability tag according to your value in the VMware Cloud Foundation Planning and Preparation Workbook.

    7. Click Add.

  7. Add a cloud account for a VI workload domain NSX Manager cluster.

    1. On the Cloud accounts page, click Add cloud account.

    2. On the Cloud account types page, click NSX-T Manager.

    3. On the New cloud account page, enter your values for the NSX Manager cloud account from the VMware Cloud Foundation Planning and Preparation Workbook, configure the following settings, and click Validate.

      Setting

      Value

      Manager type

      Local

      NSX mode

      Policy

    4. If during the validation, the Untrusted certificate found dialog box appears, click Accept.

    5. Under Associations, click Add.

    6. In the Add associations dialog box, select the vCenter cloud account for the VI workload domain that you created in step 6 and click Add.

    7. Under Capabilities tags, add the capability tag according to your value in the VMware Cloud Foundation Planning and Preparation Workbook.

    8. Click Add.

  8. Repeat steps 6 and 7 for each VI workload domain in each VMware Cloud Foundation instance.

Terraform Procedure

  1. Navigate to the Terraform example that you cloned from the repository.

    cd terraform-examples/vra/vra-cloud-account
  2. Duplicate the terraform.tfvars.example file to terraform.tfvars in the directory.

    copy terraform.tfvars.example terraform.tfvars
  3. Obtain the ID of the vSphere data center object in the VI workload domain by running the following commands from PowerCLI.

    1. Start Windows PowerShell and define the environment variables by running the following commands.

      $vCenterFqdn = "sfo-w01-vc01.sfo.rainpole.io"
      $vCenterUser = "svc-vra-vsphere@sfo.rainpole.io"
      $vCenterPass = "VMw@re1!"
    2. Connect to the VI workload domain vCenter Server and obtain the ID of the vSphere data center object in the VI workload domain by running the following VMware PowerCLI cmdlets.

      Connect-VIServer $vCenterFqdn -User $vCenterUser -Password $vCenterPass 
      #Obtain the ID of the vSphere data center object
      (Get-View -viewtype Datacenter).MoRef
    3. Save the data center ID in your VMware Cloud Foundation Planning and Preparation Workbook.

    4. Disconnect from the VI workload domain vCenter Server.

      Disconnect-VIServer -Server $vCenterFqdn -Confirm:$false
  4. Open the terraform.tfvars file, update the variables according to your values in the VMware Cloud Foundation Planning and Preparation Workbook, and save the file.

    You can add multiple cloud accounts for VI workload domain endpoints by adding incrementing accountn objects to both the cloud_accounts_vsphere and cloud_accounts_nsx object maps.

    For the region variable, use the ID of the default vSphere data center object in the VI workload domain that you obtained in step 3.

  5. Initialize the current directory and the required Terraform providers.

    terraform init
  6. Create a Terraform plan and save the output to a file.

    terraform plan -out=tfplan
  7. Apply the Terraform plan.

    terraform apply tfplan

PowerShell Procedure

  1. Start Windows PowerShell.

  2. 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.

    $sddcManagerFqdn = "sfo-vcf01.sfo.rainpole.io"
    $sddcManagerUser = "administrator@vsphere.local"
    $sddcManagerPass = "VMw@re1!"
    
    $sddcDomainName = "sfo-w01"
    
    $vraUser = "configadmin"
    $vrPass = "VMw@re1!"
    $capabilityTag = "private"
  3. Perform the configuration by running the command in the PowerShell console.

    New-vRACloudAccount -server $sddcManagerFqdn -user $sddcManagerUser -pass $sddcManagerPass -domain $sddcDomainName -vraUser $vraUser -vraPass $vrPass -capabilityTab $capabilityTag