Skip to content

About

Terraform Information and Examples

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

terraform-notes

Terraform is a tool to manage infrasrtucture as code from Hashicorp.

Installation and Version Management

tfenv

tfenv is a terraform version manager inspired by rbenv. It makes it easy to operate on different terraform projects and modules of different version compatibility.

terragrunt

terragrunt is a thin wrapper for terraform that provides extra tools for working with multiple Terraform modules. terragrunt comes from by Yevgeniy Brikman and team at gruntwork. He wrote Terraform up and Running. Gruntwork also created terratest. With terratest you can write automated tests against your infrastructure code.

tgenv

tgenv terragrunt version manager inspried by and using code from tfenv.

CI Tools

Atlantis

Atlantis provides Terraform Pull Request Automation. They maintain an official container on dockerhub.

Custom CI Workflow Example

An example of an automated CI workflow for contributing code to a terraform inventory.

  1. Open a Pull Request
  2. Automatically run:
    1. terraform plan
    2. tflint
    3. terratest
  3. Comment the results of checks back to the pull request.
  4. Team member reviews and approves.
  5. A terraform apply occurs and the output is commented on the pull request.
  6. Merge Pull Request (assuming successful apply)

If you were creating a workflow for developing a terraform module in a non production environment, you could modify this workflow to both create and then destory the resources.

Terraform testing creates real resources on a cloud provider. It is common for terraform non-production environments to be on-demand and destoryed after the test is completed to save money.

Terraform commands are limiated to the speed of the provider's API. Resources of different types are created at different speeds. For example an AWS Cloudfront distribution takes ~30-35 minutes to create. An AWS S3 bucket only seconds.

About

Terraform Information and Examples

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors