You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pass git configuration variables via terraform (#3034)
* Pass workspace owner email address to provisioner
* Remove owner_email and owner_username fields from agent metadata
* Add Git environment variables to example templates
* Remove "owner_name" field from provisioner metadata, use username instead
* Remove Git configuration from most templates, add documentation
* Proofreading/typo fixes from @mafredri
* Update example templates to latest version of terraform-provider-coder
The `coder_agent` resource can be configured as described in the
94
+
[documentation for the `coder` Terraform provider.](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/agent)
95
+
For example, you can use the `env` property to set environment variables that will be
96
+
inherited by all child processes of the agent, including SSH sessions.
97
+
93
98
### Parameters
94
99
95
100
Templates often contain _parameters_. These are defined by `variable` blocks in
@@ -202,6 +207,31 @@ By default, all templates allow developers to connect over SSH and a web
202
207
terminal. See [Configuring Web IDEs](./ides/configuring-web-ides.md) to
203
208
learn how to give users access to additional web applications.
204
209
210
+
### Data source
211
+
212
+
When a workspace is being started or stopped, the `coder_workspace` data source provides
213
+
some useful parameters. See the [documentation for the `coder` Terraform provider](https://registry.terraform.io/providers/coder/coder/latest/docs/data-sources/workspace)
214
+
for more information.
215
+
216
+
For example, the [Docker quick-start template](https://github.com/coder/coder/tree/main/examples/templates/docker)
217
+
sets a few environment variables based on the username and email address of the workspace's owner, so
218
+
that you can make Git commits immediately without any manual configuration:
0 commit comments