- A Nutanix Cluster running AHV and Prism Central
- A subnet named "Primary"
- Uploads a CentOS7 image
- Builds a VM
- Runs cloudinit script to setup the following:
- git
- terraform
- download the terraform scripts
- Login to the CentoOS VM that was created on the Nutanix Cluster
- ssh nutanix@xxx.xxx.xxx.xxx
- Password is "nutanix/4u"
- cd /home/nutanix/Getting_Started_With_Terraform_and_Nutanix
- Edit the main.tf and change the "prefix_for_created_entities = " entry to your initials
- At the command prompt run 'terraform init'.
- Run 'terrform plan'
- Run 'terraform apply -auto-approve'
NOTE: There may be a time gap between the time all items are built in Prism Central and the time Terraform thinks it is done. Give it a while, it will eventually figure it out. This can take as long as 30 minutes.
- To clean up, run 'terraform destroy -auto-approve' and everthing created by Terraform will be removed.
Nice work! The examples in the my other github repos are a great next step now that you have the basics figured out.
This was created by Tony Hughes (aka TH in the comments) to provide a quick introduction to using Terraform with Nutanix in about 100 lines of code.