Skip to content

A base image for working with Terraform in CI scenarios. Provides Terraform, tflint, AWS CLI, etc.

License

Notifications You must be signed in to change notification settings

palantirza/docker-terraform-ci

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-terraform-ci CircleCI

The shederman/palantirza/terraform-ci Dockerfile provides a useful baseline image for run Terraform related CI tasks.

You can use this image to run CI pipelines which build infrastructure.

The image is based on Debian Stretch (specifically the official debian:stretch image).

It contains:

  • All baseline Debian stretch tools
  • make
  • wget
  • git
  • ssh
  • tar
  • gzip
  • unzip
  • ca-certificates
  • terraform
  • tflint

Coding

The code is structued like this:

Dockerfile     # the important thing, the actual dockerfile
makefile       # commands to build, test deploy etc
test.sh        # a simple test script
package.json   # used for versioning only

The Makefile

The makefile contains commands to build, test and deploy. Parameters can be passed as environment variables or through the commandline.

Command Notes
make build Builds the image shederman/palantirza/terraform-ci:latest and shederman/palantirza/terraform-ci:<version>. The version is loaded from package.json.
make test Runs the test scripts.
make deploy Deploys the images to the docker hub. If you are not logged in, you're gonna have a bad time.

The Tests

The tests are simple bash scripts which check for basic capabilties which relate to the image. Essentially, this means they'll test the tools are installed.

About

A base image for working with Terraform in CI scenarios. Provides Terraform, tflint, AWS CLI, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 46.7%
  • Makefile 45.8%
  • Ruby 7.5%