Resolve Terraform Providers

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

To resolve a Terraform provider from an Artifactory repository, add the following information to your HCL file (.tf):

Provider Registry Protocol

terraform {
    required_providers {
        provider-name = {
            source = "[JFrogPlatformURL]/<REPOSITORY-KEY>-rt-ns-<NAMESPACE>/<PROVIDER>"
            version = "<VERSION>"
        }
    }
}

where:

  • [JFrogPlatformURL]: The URL of your JPD

  • <REPOSITORY-KEY>: The name of your repository

    Note

    Include rt-ns after the repository name to differentiate the repository name from the namespace.

  • <NAMESPACE>: The owner or organization for the provider

  • <PROVIDER>: The name of the provider

  • <VERSION>: Version number

For Example:

terraform {
    required_providers {
        docker = {
            source = "company.jfrog.io/terraform-local-rt-ns-kreuzwerker/docker"
            version = "1.0.0"
        }
    }
}

Network Mirror

terraform {
    required_providers {
        provider-name = {
            source = "<NAMESPACE>/<PROVIDER>"
        }
    }
}

where:

  • <NAMESPACE>: The owner or organization for the provider

  • <PROVIDER>: The name of the provider

For Example:

terraform {
    required_providers {
        docker = {
            source = "kreuzwerker/docker"
        }
    }
}