AWS CloudFormation is a text-based modeling tool that enables you to create templates that describe all the features of an VMware Cloud on AWS SDDC or any other AWS infrastructure.

To introduce this capability to VMware Cloud on AWS customers, VMware has made a CloudFormation SDDC template available on code.vmware.com. Use this template as a starting point for working with AWS CloudFormation tools to create a CloudFormation stack and an AWS Lambda function that you can run to deploy an SDDC based on the template. For a more detailed explanation of this procedure, see VMware Cloud on AWS Integrations with CloudFormation on the VMware {code} blog and https://github.com/vmwaresamples/vmware-cloud-on-aws-integration-examples/blob/master/CloudFormation/README.md.

Procedure

  1. Log in to the AWS console and go to the US West (Oregon) region.
    Log in with an AWS identity authorized to view and deploy CloudFormation templates.
  2. Retrieve the CloudFormation Create SDDC Template from the vmwaresamples repository on Github.
  3. Open the AWS CloudFormation service and click Create new stack.
  4. Upload the template you retrieved in Step 2.
    In the AWS CloudFormation > Stacks > Create stack window, click Upload a template to Amazon S3 and choose the vmc-aws-cloud-cf-template.txt template. Click Next.
  5. Specify a name for the new stack, then click Next and Create.
  6. Specify SDDC variables for use by the AWS Lambda function.
    In the AWS CloudFormation > Stacks > Stack Detail window. In the Resources section, you can see an IAM role and a Lambda Function. Click the Physical ID value of the Lambda function and enter the Environment variables that provide configuration details for the SDDC.
    Table 1. Environment Variables for Cloud Formation SDDC Stack
    Name Description
    connected_account_id The Amazon account ID used to connect the SDDC. Returned by the VMC API request
    GET /orgs/{org}/account-link/connected-accounts
    as the value of id.
    customer_subnet_ids This is the ID of the subnet (not the actual subnet address). Returned by the VMC API request
    GET /orgs/{org}/account-link/compatible-subnets
    as the subnet_id of the subnet_cidr_block that you want to use.
    Email currently unimplemented
    vpc_cidr Subnet CIDR block for management traffic. Default is 10.2.0.0/16
    name The name of the SDDC to be created
    numOfHosts The number of hosts initially added to the SDDC
    orgId Can be found in the VMware Cloud on AWS API or as part of the UI under an existing SDDC connection and the Support Info tab
    region Must be US_WEST_2
    user_refresh_token Can be found in the VMware Cloud on AWS UI by clicking on your name at the top right and then the Oauth Refresh Token button.
  7. Save and run the AWS Lambda function to create the SDDC from the template.
    Click Save, then click Test to open the Configure test event window. Give the test event a name and click Create.

Results

The AWS Lambda function runs and creates an SDDC based on the template and environment variables you supplied. You can monitor the SDDC creation process on the SDDCs tab of the VMware Cloud Console or use the AWS Tasks API.