mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 19:26:51 +02:00
47 lines
993 B
YAML
47 lines
993 B
YAML
---
|
|
kind: pipeline
|
|
name: run plan
|
|
type: docker
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm64
|
|
|
|
clone:
|
|
disable: true
|
|
|
|
steps:
|
|
- name: clone terraform
|
|
image: alpine/git
|
|
environment:
|
|
SSH_KEY:
|
|
from_secret: private_ssh_key
|
|
commands:
|
|
- mkdir $HOME/.ssh
|
|
- echo "$SSH_KEY" > $HOME/.ssh/id_ed25519
|
|
- chmod 600 $HOME/.ssh/id_ed25519
|
|
- touch $HOME/.ssh/known_hosts
|
|
- chmod 600 $HOME/.ssh/known_hosts
|
|
- ssh-keyscan -H git.2martens.de > $HOME/.ssh/known_hosts 2>/dev/null
|
|
- git clone ssh://giteajim@git.2martens.de:22/2martens/terraform.git .
|
|
- git checkout main
|
|
- name: terraform apply plan
|
|
image: 2martens/terraform-drone-plugin
|
|
settings:
|
|
api_token:
|
|
from_secret: tfc_api_token
|
|
path: terraform
|
|
auto_approve: false
|
|
speculative: false
|
|
- name: show output
|
|
image: alpine
|
|
commands:
|
|
- cat terraform_output
|
|
|
|
trigger:
|
|
event:
|
|
include:
|
|
- push
|
|
- custom
|
|
branch:
|
|
- main |