@@ -25,12 +25,11 @@ coder templates <create/update> <template-name>
25
25
26
26
## Parameters
27
27
28
- Templates often contain * parameters * . In Coder, there are two types of parameters:
28
+ Templates often contain _ parameters _ . In Coder, there are two types of parameters:
29
29
30
30
- ** Admin parameters** are set when a template is created/updated. These values
31
31
are often cloud secrets, such as a ` ServiceAccount ` token, and are annotated
32
- with ` sensitive = true ` in the template code.
33
-
32
+ with ` sensitive = true ` in the template code.
34
33
- ** User parameters** are set when a user creates a workspace. They are unique
35
34
to each workspace, often personalization settings such as "preferred region"
36
35
or "workspace image".
@@ -41,14 +40,20 @@ Templates often contain *parameters*. In Coder, there are two types of parameter
41
40
42
41
We recommend source controlling your templates.
43
42
44
- ### Authenticating with Cloud Providers
43
+ ### Authentication & Secrets
44
+
45
+ <blockquote class =" danger " >
46
+ <p >
47
+ Do not store secrets in templates. Assume every user has cleartext access
48
+ to every template.
49
+ </p >
50
+ </blockquote >
45
51
46
52
Coder's provisioner process needs to authenticate with cloud provider APIs to provision
47
- workspaces. We strongly advise against including credentials directly in your templates. You
48
- can either pass credentials to the provisioner as parameters, or execute Coder
53
+ workspaces. You can either pass credentials to the provisioner as parameters or execute Coder
49
54
in an environment that is authenticated with the cloud provider.
50
55
51
- We encourage the latter where supported. This approach simplifies the template, keeps cloud
56
+ We encourage the latter where supported. This approach simplifies the template, keeps cloud
52
57
provider credentials out of Coder's database (making it a less valuable target for attackers),
53
58
and is compatible with agent-based authentication schemes (that handle credential rotation
54
59
and/or ensure the credentials are not written to disk).
@@ -66,7 +71,7 @@ details.
66
71
67
72
The way these generally work is via the credentials being available to Coder either in some
68
73
well-known location on disk (e.g. ` ~/.aws/credentials ` for AWS on posix systems), or via
69
- environment variables. It is usually sufficient to authenticate using the CLI or SDK for the
74
+ environment variables. It is usually sufficient to authenticate using the CLI or SDK for the
70
75
cloud provider before running Coder for this to work, but check the Terraform provider
71
76
documentation for details.
72
77
0 commit comments