Terraform JFrog module which creates a Local Artifactory repository.
It also creates a user with randomly generated password, a permission target, and assigns everything to the repository.
module "repository" {
source = "git@github.com:uridium/terraform-jfrog-artifactory.git"
key = "go-repository"
package_type = "go"
description = "Golang repository"
email = "contact@email.com"
}
This module uses pre-commit hook to identify simple issues before pushing code to the remote repository, and relies on .pre-commit-config.yaml file.
To use it simply run:
pip install pre-commit
pre-commit install
Now pre-commit
will run automatically on every git commit
.
This module requires ARTIFACTORY_URL
and ARTIFACTORY_ACCESS_TOKEN
variables to be set up.
For example:
export ARTIFACTORY_URL="https://repo.domain.com/artifactory"
export ARTIFACTORY_ACCESS_TOKEN="<Token>"
Keep in mind that this module uses random_password resource to set up a password for artifactory_user
. That means you have to treat your state file as a secret and store it in a remote S3 backend, which encrypts data at rest and in transit.
You also need to create strict IAM policies to control access to your state file.
Name | Version |
---|---|
terraform | >= 1.2 |
artifactory | ~> 5.0.0 |
random | >= 3.3.0 |
Name | Type |
---|---|
artifactory_local_repository.this | resource |
artifactory_permission_target.this | resource |
artifactory_user.this | resource |
random_password.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
description | Repository description | string |
n/a | yes |
Repository email | string |
n/a | yes | |
key | Repository name | string |
n/a | yes |
package_type | Repository package type | string |
n/a | yes |
repo_layout | Repository layout type | map(any) |
{ |
no |
xray_index | Indexing in Xray | bool |
false |
no |
Name | Description |
---|---|
repository_description | Repository description |
repository_key | Repository name |
repository_layout | Repository layout type |
repository_login | Repository login |
repository_package_type | Repository package type |
repository_password | Repository password |