Please vote on this issue by adding a š reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
This is a valuable provider for managing artifactory with terraform. The main complaint I have is that setting it up for all users is a hassle, given the manual installation of the provider plugin. It would be fantastic if this provider was published to the official terraform registry so it could be easily installed from there.
New or Affected Resource(s)
N/A
Potential Terraform Configuration
If this was published to the registry, using this provider would be as simple as putting the below code in your versions.tf file and running terraform init:
As it stands now, I wrote a simple shell script which everyone who wants to use this provider needs to run:
#!/usr/bin/env bash
PLUGIN_VERSION=2.1.0
OS_ARCH=$(uname -sm | tr ' ' '_' | tr '[:upper:]' '[:lower:]')
ARTIFACT_URL="https://github.com/atlassian/terraform-provider-artifactory/releases/download/v${PLUGIN_VERSION}/terraform-provider-artifactory_${PLUGIN_VERSION}_${OS_ARCH}.tar.gz"
PLUGIN_DIR="${HOME}/.terraform.d/plugins/localhost/local/artifactory/${PLUGIN_VERSION}/${OS_ARCH/x86_64/amd64}" # Terraform expects 'amd64' instead of 'x86_64' in the plugin directory name
# Make backup of ~/.terraformrc if one exists
if [ -f "${HOME}/.terraformrc" ]; then
echo "Making backup of ~/.terraformrc before overwriting it"
mv ~/.terraformrc ~/.terraformrc.bak.$(date '+%Y-%m-%dT%H:%M:%S%z')
fi
cat > ~/.terraformrc <<EOF
provider_installation {
filesystem_mirror {
path = "$HOME/.terraform.d/plugins"
include = ["localhost/*/*"]
}
direct {
exclude = ["localhost/*/*"]
include = ["*/*"]
}
}
EOF
mkdir -p "${PLUGIN_DIR}"
wget --quiet "$ARTIFACT_URL" -O "${PLUGIN_DIR}/terraform-provider-artifactory.tar.gz"
tar zxf "${PLUGIN_DIR}/terraform-provider-artifactory.tar.gz" -C "${PLUGIN_DIR}"
chmod +x "${PLUGIN_DIR}/terraform-provider-artifactory"
echo "Provider installed; now run 'terraform init' to get set up"
Community Note
Description
This is a valuable provider for managing artifactory with terraform. The main complaint I have is that setting it up for all users is a hassle, given the manual installation of the provider plugin. It would be fantastic if this provider was published to the official terraform registry so it could be easily installed from there.
New or Affected Resource(s)
N/A
Potential Terraform Configuration
If this was published to the registry, using this provider would be as simple as putting the below code in your
versions.tf
file and runningterraform init
:As it stands now, I wrote a simple shell script which everyone who wants to use this provider needs to run:
References