Building an SDDC with the VMware Cloud APIs using Postman
In previous posts, I showed how to setup the authentication for the VMware Cloud REST API using Postman and validate the authentication request. We can now build a production SDDC from the API. This will be a multi-step process, including finding the account-linking url, running the AWS CloudFormation Template, finding the the compatible VPC and subnets, and deploying the Software Defined Data Center (SDDC). I have documented the required API calls to find the required information in several pages, and will refer to them as needed.
Desired End State
Deploy a VMC on AWS SDDC with the following parameters:
- AWS us-west-2 region
- Deployed in usw-az3
- The “Connected VPC” AWS Account is <REDACTED>
- Connected VPC is 172.17.0.0/16 and the VPC and subnets are already built
- Management CIDR Network should be set to 10.98.0.0/16
This post will assume that a Postman Environment and Collection is configured, and that the Login request is already configured. An access token is only valid for 30 minutes, so you may need to reauthenticate several times throughout the following process.
1. Login to Generate a new access token
a. Open the previously configured VMware Cloud Services Login request and click Send
2. Get the Organizations I am Assigned to
3. Get and run the Account Linking URL
Prerequisite: login to the AWS console of the AWS Account you wish to link to VMware Cloud on AWS. More info on the account-link API request can be found here.
Wait for the stack to complete before continuing. this will take ~2-5 minutes.
4. Get the Connected Account ID
The AWS Account ID is referenced in the VMC API but the variable we need to continue is different than the AWS Account ID. More information on the Get Connected Accounts API request can be found here.
5. Get the Compatible Subnets
Now that we have the AWS Account ID, we can query the AWS subnets required to configure the ENI. More information on the Get Compatible Subnets API request can be found here.
We now have all of the required information in order to provision an SDDC
6. Create an SDDC
Provisioning the SDDC takes about ~2 hours. A one-node SDDC does not require the VPC account linking process, but a production SDDC does require this to be configured.
"name": "NAME THE SDDC",
If successful, the JSON response will return the sddcConfig, which is useful to see all of the other components that may be configurable based on the VMware API reference to create an SDDC. The SDDC provisioning process takes about 90 minutes, after which we will be able to configure the networking components, change the SDDC parameters, and much much more. Additionally, I now have a documented, reproducible request we can use for future SDDC builds.