-
Notifications
You must be signed in to change notification settings - Fork 54
/
workspace-remote.yaml
42 lines (42 loc) · 1.51 KB
/
workspace-remote.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
37
38
39
40
41
42
apiVersion: tf.upbound.io/v1beta1
kind: Workspace
metadata:
name: example-remote
annotations:
meta.upbound.io/example-id: tf/v1beta1/workspace
# The terraform workspace will be named 'myworkspace'. If you omit this
# annotation it would be derived from metadata.name - e.g. 'example-remote'.
crossplane.io/external-name: myworkspace
spec:
forProvider:
# Git based remote module is supported.
# See https://www.terraform.io/language/modules/sources#generic-git-repository
# and https://www.terraform.io/language/modules/sources#modules-in-package-sub-directories
# for URL structure.
# You can also specify a simple main.tf inline; see
# workspace-inline.yaml.
source: Remote
module: git::https://github.com/crossplane/tf?ref=main
# Variables can be specified inline.
vars:
- key: region
value: us-west-1
# Variable files can be loaded from a ConfigMap or a Secret.
varFiles:
- source: ConfigMapKey
configMapKeyRef:
namespace: default
name: terraform
key: example.tfvars
- source: SecretKey
secretKeyRef:
namespace: default
name: terraform
key: example.tfvar.json
# Variables are expected to be in HCL '.tfvars' format by default. Use
# the JSON format if your variables are in the JSON '.tfvars.json' format.
format: JSON
# All Terraform outputs are written to the connection secret.
writeConnectionSecretToRef:
namespace: default
name: terraform-workspace-example-remote