Configure Terraform Provider Registry with Artifactory Using Terraform Client

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

To configure your Terraform client to work against Artifactory:

  1. Authenticate your client using the following command:

    Note

    Make sure to replace the placeholder with your JFrog Platform domain.

    terraform login <YOUR_JFROG_DOMAIN>
  2. To resolve the providers, add the following snippet to your Terraform configuration file, which can be found at ~/.terraformrc (Linux and Unix) or %APPDATA%/terraform.rc (Windows):

    Note

    Make sure to replace the placeholders with your JFrog Platform domain and the Terraform repository you would like to use.

    provider_installation {
        direct {
            exclude = ["registry.terraform.io/*/*"]
        }
        network_mirror {
            url = "<YOUR_JFROG_DOMAIN>/artifactory/api/terraform/<REPOSITORY_KEY>/providers/"
        }
    }