Skip to content

About

This is a repository for a Docker image based on terraform.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

docker-terraform

This repository provides a minimal setup to run terraform from inside a Docker container.

Contents

  • Dockerfile: builds an image based on ubuntu:latest with terraforminstalled. The container copies main.tf and variables.tf and runs terraform init, terraform plan and terraform apply.
  • terraform init:
    • download the right tools.
  • terraform plan:
    • says what it changes
  • terraform apply:
    • apply the configuration

Usage

  1. Build the Docker image:
docker build -t docker-terraform .
  1. Run the container (you will be prompted for the SSH password):
docker run --rm -it \
  -v "$PWD/main.tf:/terraform/main.tf:ro" \
  -v "$PWD/variables.tf:/terrafrom/variables.tf:ro" \
  docker-ansible

About

This is a repository for a Docker image based on terraform.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors