Skip to content

Commit b0d23ca

Browse files
authored
fix: remove duplicated envbuilder vars (#18144)
1 parent 535a59e commit b0d23ca

File tree

1 file changed

+4
-6
lines changed
  • examples/templates/kubernetes-devcontainer

1 file changed

+4
-6
lines changed

examples/templates/kubernetes-devcontainer/main.tf

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,19 +155,17 @@ locals {
155155
repo_url = data.coder_parameter.repo.value
156156
# The envbuilder provider requires a key-value map of environment variables.
157157
envbuilder_env = {
158-
# ENVBUILDER_GIT_URL and ENVBUILDER_CACHE_REPO will be overridden by the provider
159-
# if the cache repo is enabled.
160-
"ENVBUILDER_GIT_URL" : local.repo_url,
161-
"ENVBUILDER_CACHE_REPO" : var.cache_repo,
162158
"CODER_AGENT_TOKEN" : coder_agent.main.token,
163159
# Use the docker gateway if the access URL is 127.0.0.1
164160
"CODER_AGENT_URL" : replace(data.coder_workspace.me.access_url, "/localhost|127\\.0\\.0\\.1/", "host.docker.internal"),
161+
# ENVBUILDER_GIT_URL and ENVBUILDER_CACHE_REPO will be overridden by the provider
162+
# if the cache repo is enabled.
163+
"ENVBUILDER_GIT_URL" : var.cache_repo == "" ? local.repo_url : "",
165164
# Use the docker gateway if the access URL is 127.0.0.1
166165
"ENVBUILDER_INIT_SCRIPT" : replace(coder_agent.main.init_script, "/localhost|127\\.0\\.0\\.1/", "host.docker.internal"),
167166
"ENVBUILDER_FALLBACK_IMAGE" : data.coder_parameter.fallback_image.value,
168167
"ENVBUILDER_DOCKER_CONFIG_BASE64" : base64encode(try(data.kubernetes_secret.cache_repo_dockerconfig_secret[0].data[".dockerconfigjson"], "")),
169-
"ENVBUILDER_PUSH_IMAGE" : var.cache_repo == "" ? "" : "true",
170-
"ENVBUILDER_INSECURE" : "${var.insecure_cache_repo}",
168+
"ENVBUILDER_PUSH_IMAGE" : var.cache_repo == "" ? "" : "true"
171169
# You may need to adjust this if you get an error regarding deleting files when building the workspace.
172170
# For example, when testing in KinD, it was necessary to set `/product_name` and `/product_uuid` in
173171
# addition to `/var/run`.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy