Skip to content

dntsk/terraform-in-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Maintained GitHub tag MIT license

Container image with Terraform

You can use this image with your drone.io CI/CD.

Usage with Drone.io

---
kind: pipeline
name: terraform
type: docker

global-variables:
  image: &terraform_image dntskdev/terraform:0.12.25
  environment: &default_environment
    AWS_DEFAULT_REGION: us-east-1
    AWS_REGION: us-east-1
    AWS_SECRET_ACCESS_KEY:
      from_secret: AWS_SECRET_ACCESS_KEY
    AWS_ACCESS_KEY_ID:
      from_secret: AWS_ACCESS_KEY_ID

steps:
  - name: validate
    image: *terraform_image
    environment: *default_environment
    commands:
      - terraform init
      - terraform validate

  - name: plan
    image: *terraform_image
    environment: *default_environment
    commands:
      - terraform plan -out=current.tfplan

  - name: apply
    image: *terraform_image
    environment: *default_environment
    commands:
      - terraform apply "current.tfplan"