A Smart Remote repository in Artifactory is a Remote repository that proxies a Local, Remote, and Federated repository from another Artifactory Instance. Please find this documentation for more information on Smart Remote Repositories.
By using Terraform as IAC to create a smart remote repository in JFrog Artifactory.
Please find the official Terraform registry for JFrog Artifactory here and for Remote Repositories here.
However, we need to make sure that we added the below mentioned properties in the resource block along with other mandatory arguments for all package types.
content_synchronisation { enabled = true properties_enabled = true source_origin_absence_detection = true statistics_enabled = true }
Please find the sample .tf file for a Docker Smart Remote repository:
terraform { required_providers { artifactory = { source = "jfrog/artifactory" version = "8.7.0" } } } resource "artifactory_remote_docker_repository" "my-remote-docker-1" { key = "my-remote-docker-1" url = "https:/<sourceARTurl>/artifactory/api/docker/<sourceremoterepokey>/" username = "<username>" password = "<password>" content_synchronisation { enabled = true properties_enabled = true source_origin_absence_detection = true statistics_enabled = true } }
Note: This is applicable for creating Smart Remote on Edge Nodes too.