vCloud Director: Automate with Terraform Provider

Lets start with Terraform Provider to automate the vCloud director service provider easy.

First you need to install Terraform

After that create a folder with vCloud name or your choice.

Need to create three files

  • a). variables-vcloud.tf (here need to define variables)
  • b). terraform.tfvars (here we have to define values/ parameters)
  • c). terraform-vcloud.tf (this is actual code where we will going to use terraform.tfvars values)

Use terraform init so that it can initialize your environment like vCloud or vSphere etc. and if it required then it will install necessary package.

I am using https://www.terraform.io/docs/providers/vcd/index.html from HashiCorp.

Lets start with coding.

Here is Git Repository

https://github.com/sandepkaushik/Terraform-vCloud-Director-Service-Provider.git

First define variable so that we can initialize vCloud director.

After that need to define values/parameter so that we can use in actual code.

Below we have to define username and password for vCloud with administrator permission so that it can provision.

Once it’s initialize we can start our code to create

  1. Organisation (Org)
  2. Org VDC
  3. External network
  4. Or we can use Existing External Network
  5. Org VDC admin user
  6. Edge Gateway – with Static IP
  7. Edge Gateway – with Auto IP
  8. Creating Network
    1. Routed Network
    2. Isolated Network
    3. Direct Network
  9. Create a Catalog
  10. Adding ISO into Catalog
  11. vApp for Org VDC
  12. VMs in vAPP

Below snapshot is for Variable.

Here is the Organization which we created via Terraform.

Here is the external network.

Here is the EDGE gateway

Here is the Org VDC

Here is Tenant VDC view

Here is vAPP view

Here is VM view.

Here is Network view.

Here is Catalog view.

Here is media and other file view.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.