-
Notifications
You must be signed in to change notification settings - Fork 56
/
workspace-random-generator.yaml
34 lines (33 loc) · 1.12 KB
/
workspace-random-generator.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
apiVersion: tf.upbound.io/v1beta1
kind: Workspace
metadata:
name: example-random-generator
annotations:
meta.upbound.io/example-id: tf/v1beta1/workspace
# The terraform workspace will be named 'random'. If you omit this
# annotation it would be derived from metadata.name - e.g. 'example-random-generator.
crossplane.io/external-name: random
spec:
forProvider:
source: Inline
module: |
resource "random_id" "example_id" {
byte_length = 4
}
resource "random_password" "password" {
length = 16
special = true
}
// Non-sensitive Outputs are written to status.atProvider.outputs and to the connection secret.
output "random_id_hex" {
value = random_id.example_id.hex
}
// Sensitive Outputs are only written to the connection secret
output "random_password" {
value = random_password.password
sensitive = true
}
// Terraform has several other random resources, see the random provider for details
writeConnectionSecretToRef:
namespace: default
name: terraform-workspace-example-random-generator