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
docs(provider/env): clarify merge_strategy does not include host environment (#538)
* docs(provider/env): clarify merge_strategy does not include host environment
* Nick's code review
---------
Co-authored-by: Nick Vigilante <[email protected]>
-`merge_strategy` (String) Controls how this environment variable is merged when multiple coder_env resources define the same name. `replace` (default): last value wins. `append`: appends to existing value with a colon `:` separator. `prepend`: prepends to existing value with a colon `:` separator. `error`: fail the build if another coder_env defines the same name. When multiple resources append or prepend to the same name, they are applied in alphabetical order by Terraform resource address.
64
+
-`merge_strategy` (String) Controls how this environment variable is merged when multiple coder_env resources define the same name.
65
+
When multiple resources append or prepend to the same name, they are applied in alphabetical order by Terraform resource address.
66
+
This only merges values across `coder_env` resources; it does not consider any value already present in the workspace's environment, such as a base image's `PATH`.
67
+
To extend such a value, reference it directly (e.g., `value = "$PATH:/usr/local/bin"`), so the agent expands it against the real environment at startup. Valid values are as follows:
68
+
-`replace` (default): last value wins.
69
+
-`append`: appends to existing value with a colon `:` separator.
70
+
-`prepend`: prepends to existing value with a colon `:` separator.
71
+
-`error`: fail the build if another coder_env defines the same name.
48
72
-`value` (String) The value of the environment variable.
Description: "Controls how this environment variable is merged when multiple coder_env resources define the same name. `replace` (default): last value wins.`append`: appends to existing value with a colon `:` separator.`prepend`: prepends to existing value with a colon `:` separator.`error`: fail the build if another coder_env defines the same name. When multiple resources append or prepend to the same name, they are applied in alphabetical order by Terraform resource address.",
50
+
Description: "Controls how this environment variable is merged when multiple coder_env resources define the same name.\nWhen multiple resources append or prepend to the same name, they are applied in alphabetical order by Terraform resource address.\nThis only merges values across `coder_env` resources; it does not consider any value already present in the workspace's environment, such as a base image's `PATH`.\nTo extend such a value, reference it directly (e.g., `value = \"$PATH:/usr/local/bin\"`), so the agent expands it against the real environment at startup. Valid values are as follows:\n - `replace` (default): last value wins.\n - `append`: appends to existing value with a colon `:` separator.\n - `prepend`: prepends to existing value with a colon `:` separator.\n - `error`: fail the build if another coder_env defines the same name.",
0 commit comments