Sample Exchange

 View Only

Terraform template for deploying nested ESXi VMs 

Jan 08, 2021 05:57 PM

This project is intended to automatically provision infrastructure for events such as Hackathons.

Getting Started

Prerequisites

Software

Prepare the Template nested ESXi VM

  • 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 VM
    Connect-VIServer -Server $vCenter
    ./Enable-VmVappProperties.ps1 -Name $name

Configure Terraform

  • Copy all terraform.tfvars.example files in the project to terraform.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.
  • Update all values in each tfvars file per your environment.

Init, Plan, Apply, & Destroy

  • 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 you're done.

#vSphere
#Nested
#MIT
#VMwareCloudonAWS
#ESXi
#OtherLanguage
#terraform
#vSphere

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
zip file
vmug-labs-master.zip   22 KB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Related Entries and Links

No Related Resource entered.