@@ -38,9 +38,9 @@ provider "docker" {
38
38
data "coder_workspace" "me" {
39
39
}
40
40
41
- variable "jfrog_url " {
41
+ variable "jfrog_host " {
42
42
type = string
43
- description = " The URL of the JFrog instance ."
43
+ description = " JFrog instance hostname. For example, 'YYY.jfrog.io' ."
44
44
}
45
45
46
46
variable "artifactory_access_token" {
@@ -50,7 +50,7 @@ variable "artifactory_access_token" {
50
50
51
51
# Configure the Artifactory provider
52
52
provider "artifactory" {
53
- url = " https://${ var . jfrog_url } /artifactory"
53
+ url = " https://${ var . jfrog_host } /artifactory"
54
54
access_token = var. artifactory_access_token
55
55
}
56
56
@@ -75,26 +75,26 @@ resource "coder_agent" "main" {
75
75
76
76
jf c rm 0 || true
77
77
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
79
79
80
80
# Configure the `npm` CLI to use the Artifactory "npm" registry.
81
81
cat << EOF > ~/.npmrc
82
82
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" ]}
84
84
EOF
85
85
jf rt curl /api/npm/auth >> .npmrc
86
86
87
87
# Configure the `pip` to use the Artifactory "pypi" registry.
88
88
mkdir -p ~/.pip
89
89
cat << EOF > ~/.pip/pip.conf
90
90
[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
92
92
EOF
93
93
94
94
EOT
95
95
# Set GOPROXY to use the Artifactory "go" registry.
96
96
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" ]} "
98
98
}
99
99
}
100
100
0 commit comments