Skip to content

build(deps): bump hashicorp/vault from 4.4.0 to 4.5.0 in /terraform (… #78

build(deps): bump hashicorp/vault from 4.4.0 to 4.5.0 in /terraform (…

build(deps): bump hashicorp/vault from 4.4.0 to 4.5.0 in /terraform (… #78

name: Terraform Apply
on:
push:
branches:
- main
paths:
- 'terraform/**'
workflow_dispatch:
jobs:
apply:
runs-on: gha-runner-scale-set-kub1k
permissions:
contents: read
pull-requests: write
name: Apply approved plan
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
VAULT_ADDR: ${{ secrets.VAULT_ADDR }}
VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: terraform apply
uses: dflook/terraform-apply@v1.44
with:
path: terraform
workspace: kub1k
auto_approve: true
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
TERRAFORM_PRE_RUN: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
apt-get update
apt-get install openssh-client -y
eval $(ssh-agent)
ssh-add ~/.ssh/id_rsa
curl -sSL https://s3.m1k.cloud/tools/k3sup > k3sup
chmod +x k3sup
mv k3sup /usr/bin/k3sup
mkdir -p ~/.kube/config-files