Skip to content

Commit f4ce485

Browse files
committed
rename jfrog_host to jfrog_url
1 parent 2d218bb commit f4ce485

File tree

1 file changed

+7
-7
lines changed
  • examples/templates/jfrog-docker

1 file changed

+7
-7
lines changed

examples/templates/jfrog-docker/main.tf

+7-7
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ provider "docker" {
3838
data "coder_workspace" "me" {
3939
}
4040

41-
variable "jfrog_url" {
41+
variable "jfrog_host" {
4242
type = string
43-
description = "The URL of the JFrog instance."
43+
description = "JFrog instance hostname. For example, 'YYY.jfrog.io'."
4444
}
4545

4646
variable "artifactory_access_token" {
@@ -50,7 +50,7 @@ variable "artifactory_access_token" {
5050

5151
# Configure the Artifactory provider
5252
provider "artifactory" {
53-
url = "https://${var.jfrog_url}/artifactory"
53+
url = "https://${var.jfrog_host}/artifactory"
5454
access_token = var.artifactory_access_token
5555
}
5656

@@ -75,26 +75,26 @@ resource "coder_agent" "main" {
7575
7676
jf c rm 0 || true
7777
echo ${artifactory_scoped_token.me.access_token} | \
78-
jf c add --access-token-stdin --url https://${var.jfrog_url} 0
78+
jf c add --access-token-stdin --url https://${var.jfrog_host} 0
7979
8080
# Configure the `npm` CLI to use the Artifactory "npm" registry.
8181
cat << EOF > ~/.npmrc
8282
email = ${data.coder_workspace.me.owner_email}
83-
registry = https://${var.jfrog_url}/artifactory/api/npm/${local.artifactory_registry_keys["npm"]}
83+
registry = https://${var.jfrog_host}/artifactory/api/npm/${local.artifactory_registry_keys["npm"]}
8484
EOF
8585
jf rt curl /api/npm/auth >> .npmrc
8686
8787
# Configure the `pip` to use the Artifactory "pypi" registry.
8888
mkdir -p ~/.pip
8989
cat << EOF > ~/.pip/pip.conf
9090
[global]
91-
index-url = https://${local.artifactory_username}:${artifactory_scoped_token.me.access_token}@${var.jfrog_url}/artifactory/api/pypi/${local.artifactory_registry_keys["python"]}/simple
91+
index-url = https://${local.artifactory_username}:${artifactory_scoped_token.me.access_token}@${var.jfrog_host}/artifactory/api/pypi/${local.artifactory_registry_keys["python"]}/simple
9292
EOF
9393
9494
EOT
9595
# Set GOPROXY to use the Artifactory "go" registry.
9696
env = {
97-
GOPROXY : "https://${local.artifactory_username}:${artifactory_scoped_token.me.access_token}@${var.jfrog_url}/artifactory/api/go/${local.artifactory_registry_keys["go"]}"
97+
GOPROXY : "https://${local.artifactory_username}:${artifactory_scoped_token.me.access_token}@${var.jfrog_host}/artifactory/api/go/${local.artifactory_registry_keys["go"]}"
9898
}
9999
}
100100

0 commit comments

Comments
 (0)