Sign inSign up

opsgang/aws_terraform

By opsgang

•Updated almost 8 years ago

... alpine container with common tools to use Hashicorp's Terraform on or for aws

Artifact
Image
2

2.6K

opsgang/aws_terraform repository overview

⁠aws_terraform

built with shippable

Run Status

... alpine container with common tools to use Hashicorp's terraform on or for aws

Can run any arbitrary version of terraform.

⁠featuring ...

  • [hashicorp's terraform] 1⁠

  • [aws cli] 2⁠

  • [credstash] 3⁠ (for managing secrets in aws)

  • bash, curl, git, make, jq, openssh client [and friends] 4⁠

⁠docker tags

tags on master are built at shippable.com and available from dockerhub

  • terraform-terraform_version e.g. terraform-0.9.4

    • for your own sake, this is the preferred form to use
  • github tag

  • build timestamp

Newer versions will also include more recent versions of alpine and tools.

⁠github

https://github.com/opsgang/docker_aws_terraform⁠

⁠building

git clone https://github.com/opsgang/docker_aws_terraform.git
cd docker_aws_terraform
git clone https://github.com/opsgang/alpine_build_scripts
./build.sh # adds custom labels to image

⁠installing

For specific terraform version, pull the tag of form _terraform-_x.y.z

(Naturally, you should check the Tags link above, to see if it has been built!)

docker pull opsgang/aws_terraform:stable # or use the tag you prefer

⁠running

⁠example: use version of terraform not in opsgang container by default
docker run --rm -e TERRAFORM_VERSION=0.9.8 -i opsgang/aws_terraform:stable <some cmds to run>
⁠example: run /path/to/script.sh which calls terraform, aws cli, curl etc
docker run --rm -i -v /path/to/script.sh:/script.sh:ro opsgang/aws_terraform:stable /script.sh

⁠example: use my aws creds to run /some/python/script.py
export AWS_ACCESS_KEY_ID="i'll-never-tell" # replace glibness with your access key
export AWS_SECRET_ACCESS_KEY="that's-for-me-to-know" # amend as necessary

docker run --rm -i                      \ # ... run interactive to see stdout / stderr
    -v /some/python/script.py:/my.py:ro \ # ... assume the file is executable
    --env AWS_ACCESS_KEY_ID             \ # ... will read it from your env
    --env AWS_SECRET_ACCESS_KEY         \ # ... will read it from your env
    --env AWS_DEFAULT_REGION=eu-west-2  \ # ... adjust geography to taste
    opsgang/aws_terraform:stable /my.py      # script can access these env vars

⁠example: let me treat the container like a shell to try things
# Oh look! vim is preinstalled. How cool! And gratuitous.
docker run -it opsgang/aws_terraform:stable /bin/bash

Tag summary

Content type

Image

Digest

Size

87.7 MB

Last updated

almost 8 years ago

docker pull opsgang/aws_terraform:stable