mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 07:43:07 +00:00
tofu pipeline with secrets
This commit is contained in:
@ -16,12 +16,31 @@ jobs:
|
||||
|
||||
- name: Cloning iac repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: infra/iac
|
||||
|
||||
- name: cloning iac secrets repository
|
||||
run: |
|
||||
git clone https://gitea.fenix-dev.com/fenix-gitea-admin/iac-teste-secrets.git infra/secrets
|
||||
|
||||
|
||||
- name: Init and Apply
|
||||
env:
|
||||
CONSUL_HTTP_TOKEN: ${{ secrets.CONSUL_HTTP_TOKEN }}
|
||||
|
||||
- name: Init OpenTofu
|
||||
working-directory: infra
|
||||
run: tofu init
|
||||
|
||||
- name: Plan
|
||||
run: tofu plan -out=tfplan
|
||||
|
||||
- name: Export tfplan
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: tofu-plan
|
||||
path: tfplan
|
||||
|
||||
|
||||
- name: Apply
|
||||
run: tofu apply -auto-approve tfplan
|
||||
Reference in New Issue
Block a user