artifactory_access_token = var.artifactory_access_token # An admin access token
package_managers = {
"npm": "npm",
"go": "go",
"pypi": "pypi"
}
}
```
Get a JFrog access token from your Artifactory instance. The token must have admin permissions, i.e. with scopes = ["applied-permissions/admin"]. It is recommended to store the token in a secret terraform variable.
```hcl
variable "artifactory_access_token" {
type = string
sensitive = true
}
```

### Using OAuth
You can use OAuth to authenticate with Artifactory. This is the recommended approach. To use OAuth, you must have the Coder [`external-auth`](https://coder.com/docs/v2/latest/admin/external-auth) configured with Artifactory.
Install the JF CLI and authenticate package managers with Artifactory using OAuth configured via Coder [`external-auth`](https://docs.coder.com/docs/admin/external-auth/) feature.

@ -68,3 +28,7 @@ module "jfrog" {
}
}
```
## Prerequisites
- Coder [`external-auth`](https://docs.coder.com/docs/admin/external-auth/) configured with Artifactory. This requires a custom integration in Artifactory with **Callback URL** set to `https://<your-coder-url>/external-auth/jfrog/callback`.