Skip to content

derekstraka/terraform-aws

Repository files navigation

Terraform and AWS CLI Docker image

Lint Build Publish

License Docker Pulls

Overview

The goal is to create a lightweight container image to deploy infrastructure as code (IaC) to the AWS cloud. The container can be used for interactive development, CI/CD deployments, or as a base image to extend as needed. It is based on the HashiCorp Terraform container with the addition of python3 and the AWS CLI.

What's inside?

Supported versions

Actively supported versions can be found in the supported_versions.yaml. By default, the latest 3x versions of Terraform and AWS CLI will be periodically packaged and released

The following image tag strategy is leveraged for the container builds:

  • derekstraka/terraform-aws:latest - build from main
  • derekstraka/terraform-aws:vR.S.T_terraform-UU.VV.WW_awscli-XX.YY.ZZ - build from releases
    • vR.S.T is the release tag
    • terraform-UU.VV.WWW is the included Terraform CLI version
    • awscli-XX.YY.ZZ is the included AWS CLI version

Usage

Launch the CLI

Simply launch the container and use the CLI as you would on any other platform, for instance using the latest image:

docker run -i -v $PWD:/data -w /data -t derekstraka/terraform-aws:latest /bin/bash

Building an image

You can build the image locally directly from the Dockerfile using the TERRAFORM_VERSION and AWS_CLI_VERSION build arguments to specificy the desired version of Terrafrom and AWS command line

docker build --build-arg TERRAFORM_VERSION=1.5.1 --build-arg AWS_CLI_VERSION=1.27.161 .

License

This project is under the Apache License 2.0

About

Docker image including the Terraform + AWS CLI

Resources

License

Stars

Watchers

Forks

Packages

No packages published