Modify the variable if you want to change
variable | value |
---|---|
terraform_version | terraform version |
docker build
$ podman build -t terraform:latest .
docker-compose.yml
Edit [Your terraform project path]
version: '3'
services:
web_container:
image: alpine-terraform
restart: always
container_name: terraform_container
volumes:
- /home/user/docker-terraform :/terraform
tty: true
docker-compose
$ docker-compose up -d
Access the container
× docker exec -it terraform_container /bin/sh
podman run --rm localhost/terraform:latest version
podman run -it --rm -v $(pwd):/data:z localhost/terraform:latest init
podman run -it --rm -v $(pwd):/data:z localhost/terraform:latest plan
podman run -it --rm -v $(pwd):/data:z localhost/terraform:latest apply
Get started with terraform