Terraform the manual way

This commit is contained in:
Kasper Juul Hermansen 2022-02-17 22:00:52 +01:00
parent ae683f788b
commit 2091f14f90
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23

View File

@ -1,16 +1,20 @@
pipeline: pipeline:
terraform: terraform:
image: jmccann/drone-terraform image: alpine
plan: true
root_dir: infrastructure/create-resources
environment: environment:
HCLOUD_TOKEN: HCLOUD_TOKEN:
from_secret: serverctl_hcloud_token from_secret: serverctl_hcloud_token
remote: ACCESS_KEY:
config: from_secret: serverctl_access_key
access_key: SECRET_KEY:
from_secret: serverctl_access_key from_secret: serverctl_secret_key
secret_key: commands:
from_secret: serverctl_secret_key - apk --update add curl
secrets: - curl --silent --output terraform.zip "https://releases.hashicorp.com/terraform/1.1.6/terraform_1.1.6_linux_amd64.zip"
hcloud_token: HCLOUD_TOKEN - unzip terraform.zip ; rm -f terraform.zip; chmod +x terraform
- mkdir -p ${HOME}/bin ; export PATH=${PATH}:${HOME}/bin; mv terraform ${HOME}/bin/
- terraform -v
- cd infrastructure/create-resources
- terraform init
- terraform validate
- terraform plan