Build, change, and destroy Docker infrastructure using Terraform. Step-by-step, command-line tutorials will walk you through the Terraform basics for the first time.
Install Terraform on Mac, Linux, or Windows by downloading the binary or using a package manager (Homebrew or Chocolatey). Then create a Docker container locally by following a quick-start tutorial to check that Terraform installed correctly.
Modify Docker container configuration to use a different external port. Plan and apply the changes to re-provision a new container that reflects the new configuration. Learn how Terraform handles infrastructure change management.
Declare your Docker container name as a variable. Reference the variable in Terraform configuration. Define variables using command line flags, environment variables, .tfvars files or default values.
Declare output values to display a Docker containers name and ID. Display all outputs and query specific outputs. Define what data stored in Terraform state is relevant to the operator or end user.