This project is intended to automatically provision infrastructure for VMUG events such as Hackathons.
- 1+ vCenter instance (6.5, 6.7, & VMware Cloud on AWS account have all been tested successfully)
- 1+ vSphere ESXi node that is managed by the above vCenter instance
- 1 VirtuallyGhetto Nested ESXi 6.5 or 6.7 OVA file deployed as a VM on the above ESXi node
- This VM will be used as a VM template by Terraform for deploying the nested ESXi nodes.
- Windows PowerShell or PowerShell Core for running the
Enable-VmVappProperties.ps1
script in the root of the project, which will set all VM vApp properties on the template VM to user configurable, which is a requirement in Terraform v0.11.7 and earlier. - VMware PowerCLI 10.0+
- HashiCorp Terraform v0.11.x
- Gruntwork Terragrunt v0.14.x
- An AWS S3 bucket for Terraform remote backend state storage
- An AWS DynamoDB database for Terraform state lock management
- An IAM AWS Access Key for programmatic remote access to your AWS account
- These should be stored in a profile in your
~/.aws/credentials
file.
- These should be stored in a profile in your
- An EC2 Key Pair for credential encryption/decryption
- Run the following, where
$vCenter
is the prerequisite vCenter instance, and$name
is the name of the prerequisite VirtuallyGhetto Nested ESXi 6.5 or 6.7 VMConnect-VIServer -Server $vCenter ./Enable-VmVappProperties.ps1 -Name $name
- Copy all
terraform.tfvars.example
files in the project toterraform.tfvars
files- Note: Terraform
tfvars
files tend to contain sensitive information, and should not be checked into source control, which is why there is an entry for this in the.gitignore
file.
- Note: Terraform
- Update all values in each
tfvars
file per your environment.
terragrunt init
: This will initialize your environment, including: download all terraform modules necessary, create the S3 bucket for storing remote state, create the DynamoDB table for lock management.terragrunt plan
: This will analyze the state of your environment, and list what components need to be deployed, modified, and/or destroyed.terragrunt apply
: If approved, this will deploy the environment per your specifications.terragrunt destroy
: If approved, this will tear down the environment when your done.