You can use this image with your drone.io CI/CD.
---
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"