From cb49f8ddf171efdf7b31d79622f063397472f581 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 25 Dec 2023 18:46:34 +0300 Subject: [PATCH] add example to README --- jfrog-oauth/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/jfrog-oauth/README.md b/jfrog-oauth/README.md index 4e6d7e7..1a8b0cb 100644 --- a/jfrog-oauth/README.md +++ b/jfrog-oauth/README.md @@ -60,6 +60,25 @@ jf pip install requests pip install requests ``` +### Configure code-server to with JFrog extension + +The [JFrog extension](https://open-vsx.org/extension/JFrog/jfrog-vscode-extension) for VS Code allows you to interact with Artifactory from within the IDE. + +```hcl +module "jfrog" { + source = "https://registry.coder.com/modules/jfrog-oauth" + agent_id = coder_agent.example.id + jfrog_url = "https://jfrog.example.com" + auth_method = "oauth" + username_field = "username" # If you are using GitHub to login to both Coder and Artifactory, use username_field = "username" + configure_code_server = true + package_managers = { + "npm": "npm", + "go": "go", + "pypi": "pypi" + } +} +``` ### Using the access token in other terraform resources JFrog Access token is also available as a terraform output. You can use it in other terraform resources. For example, you can use it to configure an [Artifactory docker registry](https://jfrog.com/help/r/jfrog-artifactory-documentation/docker-registry) with the [docker terraform provider](https://registry.terraform.io/providers/kreuzwerker/docker/latest/docs).