@@ -230,6 +230,58 @@ server, as demonstrated in the example below:
230
230
With these steps, you'll have the Coder documentation hosted on your server and
231
231
accessible for your team to use.
232
232
233
+ ## Coder Modules
234
+
235
+ ### Artifactory
236
+
237
+ Air gapped users can clone the [ coder/modules] ( htpps://github.com/coder/modules )
238
+ repo and publish a
239
+ [ local terraform module repository] ( https://jfrog.com/help/r/jfrog-artifactory-documentation/set-up-a-terraform-module/provider-registry )
240
+ to resolve modules via [ Artifactory] ( https://jfrog.com/artifactory/ ) .
241
+
242
+ 1 . Create a local-terraform-repository with name ` coder-modules-local `
243
+ 2 . Create a virtual repository with name ` tf `
244
+ 3 . Follow the below instructions to publish coder modules to Artifactory
245
+
246
+ ``` shell
247
+ git clone https://github.com/coder/modules
248
+ cd modules
249
+ jf tfc
250
+ jf tf p --namespace=" coder" --provider=" coder" --tag=" 1.0.0"
251
+ ```
252
+
253
+ 4 . Generate a token with access to the ` tf ` repo and set an ` ENV ` variable
254
+ ` TF_TOKEN_example.jfrog.io="XXXXXXXXXXXXXXX" ` on the Coder provisioner.
255
+ 5 . Create a file ` .terraformrc ` with following content and mount at
256
+ ` /home/coder/.terraformrc ` within the Coder provisioner.
257
+
258
+ ``` hcl
259
+ provider_installation {
260
+ direct {
261
+ exclude = ["registry.terraform.io/*/*"]
262
+ }
263
+ network_mirror {
264
+ url = "https://example.jfrog.io/artifactory/api/terraform/tf/providers/"
265
+ }
266
+ }
267
+ ```
268
+
269
+ 6 . Update module source as,
270
+
271
+ ``` hcl
272
+ module "module-name" {
273
+ source = "https://example.jfrog.io/tf__coder/module-name/coder"
274
+ version = "1.0.0"
275
+ agent_id = coder_agent.example.id
276
+ ...
277
+ }
278
+ ```
279
+
280
+ > Do not forget to replace example.jgrog.io with uour Artifactory URL
281
+
282
+ Based on the instructions
283
+ [ here] ( https://jfrog.com/blog/tour-terraform-registries-in-artifactory/ ) .
284
+
233
285
## Firewall exceptions
234
286
235
287
In restricted internet networks, Coder may require connection to internet.
0 commit comments