- So install Terraform CLI from Terraform CLI
- Create dedicated Module and Provider registries.
- Create a Terraform Backend Repository in Artifactory.
- Generate an Access Token between Artifactory and the Terraform CLI
Navigate to JFrog_Platform_UI | Admin | User Management | Generate Token |
5. Create a “credentials.tfrc.json” under “~/.terraform.d/” path. The file path should be as below:
~/.terraform.d/credentials.tfrc.json
6. Update your Access Token generated in the previous step in the “credentials.tfrc.json” file and initialize via the command “terrafram init”
Example format below:
#cat ~/.terraform.d/credentials.tfrc.json { "credentials": { "servername.jfrog.io": {"token": "ACCESS TOKEN" } } }
Note: If you are using Access Token in “credentials.tfrc.json” you don’t have to login again (terraform login servername.jfrog.io [not required] )