See article:
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
terraform version
docker ps
If you need to install docker:
This will start the docker daemon if it isn't running:
open -a Docker
Check it again:
docker ps
terraform init
If using Docker for Mac, run this first:
export TF_VAR_docker_endpoint=unix://$HOME/.docker/run/docker.sock
terraform plan
If you run into issues with Docker, check the current context:
docker context ls
If using Docker for Mac, run this first:
export TF_VAR_docker_endpoint=unix://$HOME/.docker/run/docker.sock
terraform apply
docker ps
If you have a lot of containers running already, you can filter with:
docker ps | grep random
curl http://localhost:1220/v1/people/1
curl http://localhost:1220/v1/words/1
curl http://localhost:1220/v1/values/1
curl http://localhost:1220/v1/coords/1
For more commands see:
terraform destroy
docker ps
- https://developer.hashicorp.com/terraform/cli/commands/plan
- https://spacelift.io/blog/terraform-plan
- https://developer.hashicorp.com/terraform/downloads
- https://hub.docker.com/r/mitchallen/random-server
- https://dev.to/pavanbelagatti/using-terraform-to-manage-infrastructure-resources-32da
- https://dockerlabs.collabnix.com/advanced/automation/terraform/terraform-mac-nginx.html
- https://developer.hashicorp.com/terraform/tutorials/docker-get-started/docker-build
- https://stackoverflow.com/questions/73451024/where-to-find-information-about-the-following-terraform-provider-attribute-depre
- https://raw.githubusercontent.com/github/gitignore/main/Terraform.gitignore