forked from khuedoan/homelab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexternal.yaml
36 lines (36 loc) · 822 Bytes
/
external.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: terraform-external
spec:
workspaces:
- name: source
stepTemplate:
image: hashicorp/terraform:1.3.3
workingDir: /workspace/source/external
volumeMounts:
- name: terraform-secrets
mountPath: /root/.terraform.d/credentials.tfrc.json
subPath: credentials.tfrc.json
- name: terraform-secrets
mountPath: /workspace/source/external/terraform.tfvars
subPath: terraform.tfvars
command:
- terraform
volumes:
- name: terraform-secrets
secret:
secretName: terraform-secrets
steps:
- name: init
args:
- init
- name: plan
args:
- plan
- -out=tfplan
- name: apply
args:
- apply
- -auto-approve
- tfplan