Step 1: Create Terraform Repositories

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

Before you can use JFrog CLI to publish your Terraform modules to Artifactory, you first need to set the deployment repository for the project.

To set the repository:

  1. CD to the root of the Terraform project.

  2. Run the jf terraform-config command.

Argument/ Flag

Description

Command-name

terraform-config

Abbreviation

tfc

--global

[Default false]

Set to true, if you'd like the configuration to be global (for all projects on the machine). Specific projects can override the global configuration.

--server-id-deploy

[Optional]

Artifactory server ID for deployment. The server should be configured using the ' jf c add' command.

--repo-deploy

[Optional]

Repository for artifacts deployment.

For example, to set repositories for this Terraform project, run the following command:

jf tfc

To set repositories for all Terraform projects on this machine, run the following command:

jf tfc --global