feat: add JFrog access token output to module output (#101)

pull/81/head^2
Muhammad Atif Ali 1 year ago committed by GitHub
parent 8e3f48ce5c
commit 98bb94c5f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,3 +59,19 @@ jf pip install requests
```shell
pip install requests
```
### 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).
```hcl
provider "docker" {
...
registry_auth {
address = "https://YYYY.jfrog.io/artifactory/api/docker/REPO-KEY"
username = module.jfrog.username
password = module.jfrog.access_token
}
}
```

@ -15,3 +15,5 @@ describe("jfrog-oauth", async () => {
package_managers: "{}",
});
});
//TODO add more tests

@ -75,3 +75,14 @@ resource "coder_script" "jfrog" {
})
run_on_start = true
}
output "access_token" {
description = "value of the JFrog access token"
value = data.coder_external_auth.jfrog.access_token
sensitive = true
}
output "username" {
description = "value of the JFrog username"
value = local.username
}

@ -68,3 +68,19 @@ npm install prettier
go get github.com/golang/example/hello
pip install requests
```
### 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).
```hcl
provider "docker" {
...
registry_auth {
address = "https://YYYY.jfrog.io/artifactory/api/docker/REPO-KEY"
username = module.jfrog.username
password = module.jfrog.access_token
}
}
```

@ -108,3 +108,14 @@ resource "coder_script" "jfrog" {
})
run_on_start = true
}
output "access_token" {
description = "value of the JFrog access token"
value = artifactory_scoped_token.me.access_token
sensitive = true
}
output "username" {
description = "value of the JFrog username"
value = local.username
}

Loading…
Cancel
Save