remote

package
v12.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BowerSchemas = remote.GetSchemas(bowerSchema)
View Source
var CargoSchemas = remote.GetSchemas(cargoSchema)
View Source
var CocoapodsSchemas = remote.GetSchemas(cocoapodsSchema)
View Source
var ComposerSchemas = remote.GetSchemas(composerSchema)
View Source
var ConanSchemas = remote.GetSchemas(conanSchema)
View Source
var DockerSchemas = remote.GetSchemas(dockerSchema)
View Source
var GoSchema = lo.Assign(
	remote.BaseSchema,
	remote.CurationRemoteRepoSchema,
	map[string]*schema.Schema{
		"vcs_git_provider": {
			Type:             schema.TypeString,
			Optional:         true,
			Default:          "ARTIFACTORY",
			ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice(remote.SupportedGoVCSGitProviders, false)),
			Description:      "Artifactory supports proxying the following Git providers out-of-the-box: GitHub (`GITHUB`), GitHub Enterprise (`GITHUBENTERPRISE`), BitBucket Cloud (`BITBUCKET`), BitBucket Server (`STASH`), GitLab (`GITLAB`), or a remote Artifactory instance (`ARTIFACTORY`). Default value is `ARTIFACTORY`.",
		},
	},
	resource_repository.RepoLayoutRefSDKv2Schema(remote.Rclass, resource_repository.GoPackageType),
)
View Source
var HelmOCISchema = lo.Assign(
	remote.BaseSchema,
	map[string]*schema.Schema{
		"external_dependencies_enabled": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "Also known as 'Foreign Layers Caching' on the UI, default is `false`.",
		},
		"enable_token_authentication": {
			Type:        schema.TypeBool,
			Optional:    true,
			Computed:    true,
			Description: "Enable token (Bearer) based authentication.",
		},

		"external_dependencies_patterns": {
			Type:     schema.TypeList,
			Optional: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
			RequiredWith: []string{"external_dependencies_enabled"},
			Description: "Optional include patterns to match external URLs. Ant-style path expressions are supported (*, **, ?). " +
				"For example, specifying `**/github.com/**` will only allow downloading foreign layers from github.com host." +
				"By default, this is set to '**' in the UI, which means that foreign layers may be downloaded from any external host." +
				"Due to Terraform SDKv2 limitations, we can't set the default value for the list." +
				"This value must be assigned to the attribute manually, if user don't specify any other non-default values." +
				"This attribute must be set together with `external_dependencies_enabled = true`",
		},
		"project_id": {
			Type:     schema.TypeString,
			Optional: true,
			Description: "Use this attribute to enter your GCR, GAR Project Id to limit the scope of this remote repo to a specific " +
				"project in your third-party registry. When leaving this field blank or unset, remote repositories that support project id " +
				"will default to their default project as you have set up in your account.",
		},
	},
	resource_repository.RepoLayoutRefSDKv2Schema(remote.Rclass, resource_repository.HelmOCIPackageType),
)
View Source
var HelmOCISchemas = remote.GetSchemas(HelmOCISchema)
View Source
var HelmSchema = lo.Assign(
	remote.BaseSchema,
	map[string]*schema.Schema{
		"helm_charts_base_url": {
			Type:     schema.TypeString,
			Optional: true,
			Default:  "",
			ValidateDiagFunc: validation.ToDiagFunc(
				validation.Any(
					validation.IsURLWithScheme([]string{"http", "https", "oci"}),
					validation.StringIsEmpty,
				),
			),
			Description: "Base URL for the translation of chart source URLs in the index.yaml of virtual repos. " +
				"Artifactory will only translate URLs matching the index.yamls hostname or URLs starting with this base url. " +
				"Support http/https/oci protocol scheme.",
		},
		"external_dependencies_enabled": {
			Type:        schema.TypeBool,
			Default:     false,
			Optional:    true,
			Description: "When set, external dependencies are rewritten. External Dependency Rewrite in the UI.",
		},

		"external_dependencies_patterns": {
			Type:     schema.TypeList,
			Optional: true,
			ForceNew: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
			RequiredWith: []string{"external_dependencies_enabled"},
			Description: "An allow list of Ant-style path patterns that determine which remote VCS roots Artifactory will " +
				"follow to download remote modules from, when presented with 'go-import' meta tags in the remote repository response." +
				"Default value in UI is empty. This attribute must be set together with `external_dependencies_enabled = true`",
		},
	},
	resource_repository.RepoLayoutRefSDKv2Schema(remote.Rclass, resource_repository.HelmPackageType),
)
View Source
var NugetSchema = lo.Assign(
	remote.BaseSchema,
	remote.CurationRemoteRepoSchema,
	map[string]*schema.Schema{
		"feed_context_path": {
			Type:        schema.TypeString,
			Optional:    true,
			Default:     "api/v2",
			Description: `When proxying a remote NuGet repository, customize feed resource location using this attribute. Default value is 'api/v2'.`,
		},
		"download_context_path": {
			Type:             schema.TypeString,
			Optional:         true,
			Default:          "api/v2/package",
			ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotEmpty),
			Description:      `The context path prefix through which NuGet downloads are served. Default value is 'api/v2/package'.`,
		},
		"v3_feed_url": {
			Type:             schema.TypeString,
			Optional:         true,
			Default:          "https://api.nuget.org/v3/index.json",
			ValidateDiagFunc: validation.ToDiagFunc(validation.Any(validation.IsURLWithHTTPorHTTPS, validation.StringIsEmpty)),
			Description:      `The URL to the NuGet v3 feed. Default value is 'https://api.nuget.org/v3/index.json'.`,
		},
		"force_nuget_authentication": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: `Force basic authentication credentials in order to use this repository. Default value is 'false'.`,
		},
		"symbol_server_url": {
			Type:             schema.TypeString,
			Optional:         true,
			Default:          "https://symbols.nuget.org/download/symbols",
			ValidateDiagFunc: validation.ToDiagFunc(validation.Any(validation.IsURLWithHTTPorHTTPS, validation.StringIsEmpty)),
			Description:      `NuGet symbol server URL.`,
		},
	}, resource_repository.RepoLayoutRefSDKv2Schema(remote.Rclass, resource_repository.NugetPackageType),
)
View Source
var OCISchema = lo.Assign(
	remote.BaseSchema,
	map[string]*schema.Schema{
		"external_dependencies_enabled": {
			Type:        schema.TypeBool,
			Optional:    true,
			Default:     false,
			Description: "Also known as 'Foreign Layers Caching' on the UI, default is `false`.",
		},
		"enable_token_authentication": {
			Type:        schema.TypeBool,
			Optional:    true,
			Computed:    true,
			Description: "Enable token (Bearer) based authentication.",
		},

		"external_dependencies_patterns": {
			Type:     schema.TypeList,
			Optional: true,
			Elem: &schema.Schema{
				Type: schema.TypeString,
			},
			RequiredWith: []string{"external_dependencies_enabled"},
			Description: "Optional include patterns to match external URLs. Ant-style path expressions are supported (*, **, ?). " +
				"For example, specifying `**/github.com/**` will only allow downloading foreign layers from github.com host." +
				"By default, this is set to '**' in the UI, which means that foreign layers may be downloaded from any external host." +
				"Due to Terraform SDKv2 limitations, we can't set the default value for the list." +
				"This value must be assigned to the attribute manually, if user don't specify any other non-default values." +
				"This attribute must be set together with `external_dependencies_enabled = true`",
		},
		"project_id": {
			Type:     schema.TypeString,
			Optional: true,
			Description: "Use this attribute to enter your GCR, GAR Project Id to limit the scope of this remote repo to a specific " +
				"project in your third-party registry. When leaving this field blank or unset, remote repositories that support project id " +
				"will default to their default project as you have set up in your account.",
		},
	},
	resource_repository.RepoLayoutRefSDKv2Schema(remote.Rclass, resource_repository.OCIPackageType),
)
View Source
var PyPiSchema = lo.Assign(
	remote.BaseSchema,
	remote.CurationRemoteRepoSchema,
	map[string]*schema.Schema{
		"pypi_registry_url": {
			Type:             schema.TypeString,
			Optional:         true,
			Default:          "https://pypi.org",
			ValidateDiagFunc: validation.ToDiagFunc(validation.IsURLWithHTTPorHTTPS),
			Description:      "To configure the remote repo to proxy public external PyPI repository, or a PyPI repository hosted on another Artifactory server. See JFrog Pypi documentation for the usage details. Default value is 'https://pypi.org'.",
		},
		"pypi_repository_suffix": {
			Type:             schema.TypeString,
			Optional:         true,
			Default:          "simple",
			ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotEmpty),
			Description:      "Usually should be left as a default for 'simple', unless the remote is a PyPI server that has custom registry suffix, like +simple in DevPI. Default value is 'simple'.",
		},
	},
	resource_repository.RepoLayoutRefSDKv2Schema(remote.Rclass, resource_repository.PyPiPackageType),
)
View Source
var TerraformSchema = lo.Assign(
	remote.BaseSchema,
	map[string]*schema.Schema{
		"terraform_registry_url": {
			Type:         schema.TypeString,
			Optional:     true,
			ValidateFunc: validation.IsURLWithHTTPorHTTPS,
			Default:      "https://registry.terraform.io",
			Description: "The base URL of the registry API. When using Smart Remote Repositories, set the URL to" +
				" <base_Artifactory_URL>/api/terraform/repokey. Default value in UI is https://registry.terraform.io",
		},
		"terraform_providers_url": {
			Type:         schema.TypeString,
			Optional:     true,
			ValidateFunc: validation.IsURLWithHTTPorHTTPS,
			Default:      "https://releases.hashicorp.com",
			Description: "The base URL of the Provider's storage API. When using Smart remote repositories, set " +
				"the URL to <base_Artifactory_URL>/api/terraform/repokey/providers. Default value in UI is https://releases.hashicorp.com",
		},
	},
	resource_repository.RepoLayoutRefSDKv2Schema(remote.Rclass, resource_repository.TerraformPackageType),
)
View Source
var TerraformSchemas = remote.GetSchemas(TerraformSchema)
View Source
var VCSSchema = lo.Assign(
	remote.BaseSchema,
	VcsRemoteRepoSchemaSDKv2,
	map[string]*schema.Schema{
		"max_unique_snapshots": {
			Type:     schema.TypeInt,
			Optional: true,
			Default:  0,
			Description: "The maximum number of unique snapshots of a single artifact to store. Once the number of " +
				"snapshots exceeds this setting, older versions are removed. A value of 0 (default) indicates there is " +
				"no limit, and unique snapshots are not cleaned up.",
		},
	},
	resource_repository.RepoLayoutRefSDKv2Schema(remote.Rclass, resource_repository.VCSPackageType),
)
View Source
var VcsRemoteRepoSchemaSDKv2 = map[string]*schema.Schema{
	"vcs_git_provider": {
		Type:             schema.TypeString,
		Optional:         true,
		Default:          "GITHUB",
		ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{"GITHUB", "BITBUCKET", "OLDSTASH", "STASH", "ARTIFACTORY", "CUSTOM"}, false)),
		Description:      `Artifactory supports proxying the following Git providers out-of-the-box: GitHub or a remote Artifactory instance. Default value is "GITHUB".`,
	},
	"vcs_git_download_url": {
		Type:             schema.TypeString,
		Optional:         true,
		ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotEmpty),
		Description:      `This attribute is used when vcs_git_provider is set to 'CUSTOM'. Provided URL will be used as proxy.`,
	},
}

Functions

func DataSourceArtifactoryRemoteAnsibleRepository

func DataSourceArtifactoryRemoteAnsibleRepository() *schema.Resource

func DataSourceArtifactoryRemoteBasicRepository

func DataSourceArtifactoryRemoteBasicRepository(packageType string) *schema.Resource

func DataSourceArtifactoryRemoteBowerRepository

func DataSourceArtifactoryRemoteBowerRepository() *schema.Resource

func DataSourceArtifactoryRemoteCargoRepository

func DataSourceArtifactoryRemoteCargoRepository() *schema.Resource

func DataSourceArtifactoryRemoteCoapodsRepository

func DataSourceArtifactoryRemoteCoapodsRepository() *schema.Resource

func DataSourceArtifactoryRemoteComposerRepository

func DataSourceArtifactoryRemoteComposerRepository() *schema.Resource

func DataSourceArtifactoryRemoteConanRepository

func DataSourceArtifactoryRemoteConanRepository() *schema.Resource

func DataSourceArtifactoryRemoteDockerRepository

func DataSourceArtifactoryRemoteDockerRepository() *schema.Resource

func DataSourceArtifactoryRemoteGenericRepository

func DataSourceArtifactoryRemoteGenericRepository() *schema.Resource

func DataSourceArtifactoryRemoteGoRepository

func DataSourceArtifactoryRemoteGoRepository() *schema.Resource

func DataSourceArtifactoryRemoteHelmOciRepository

func DataSourceArtifactoryRemoteHelmOciRepository() *schema.Resource

func DataSourceArtifactoryRemoteHelmRepository

func DataSourceArtifactoryRemoteHelmRepository() *schema.Resource

func DataSourceArtifactoryRemoteJavaRepository

func DataSourceArtifactoryRemoteJavaRepository(packageType string, suppressPom bool) *schema.Resource

func DataSourceArtifactoryRemoteMavenRepository

func DataSourceArtifactoryRemoteMavenRepository() *schema.Resource

func DataSourceArtifactoryRemoteNpmRepository

func DataSourceArtifactoryRemoteNpmRepository() *schema.Resource

func DataSourceArtifactoryRemoteNugetRepository

func DataSourceArtifactoryRemoteNugetRepository() *schema.Resource

func DataSourceArtifactoryRemoteOciRepository

func DataSourceArtifactoryRemoteOciRepository() *schema.Resource

func DataSourceArtifactoryRemotePypiRepository

func DataSourceArtifactoryRemotePypiRepository() *schema.Resource

func DataSourceArtifactoryRemoteTerraformRepository

func DataSourceArtifactoryRemoteTerraformRepository() *schema.Resource

func DataSourceArtifactoryRemoteVcsRepository

func DataSourceArtifactoryRemoteVcsRepository() *schema.Resource

Types

type BowerRemoteRepo added in v12.8.3

type BowerRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	remote.RepositoryVcsParams
	BowerRegistryUrl string `json:"bowerRegistryUrl"`
}

type CargoRemoteRepo added in v12.8.3

type CargoRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	RegistryUrl       string `hcl:"git_registry_url" json:"gitRegistryUrl"`
	AnonymousAccess   bool   `json:"cargoAnonymousAccess"`
	EnableSparseIndex bool   `json:"cargoInternalIndex"`
}

type CocoapodsRemoteRepo added in v12.8.3

type CocoapodsRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	remote.RepositoryVcsParams
	PodsSpecsRepoUrl string `json:"podsSpecsRepoUrl"`
}

type ComposerRemoteRepo added in v12.8.3

type ComposerRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	remote.RepositoryVcsParams
	ComposerRegistryUrl string `json:"composerRegistryUrl"`
}

type DockerRemoteRepo added in v12.8.3

type DockerRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	remote.RepositoryCurationParams
	ExternalDependenciesEnabled  bool     `json:"externalDependenciesEnabled"`
	ExternalDependenciesPatterns []string `json:"externalDependenciesPatterns,omitempty"`
	EnableTokenAuthentication    bool     `json:"enableTokenAuthentication"`
	BlockPushingSchema1          bool     `hcl:"block_pushing_schema1" json:"blockPushingSchema1"`
	ProjectId                    string   `json:"dockerProjectId"`
}

type GoRemoteRepo added in v12.8.3

type GoRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	remote.RepositoryCurationParams
	VcsGitProvider string `json:"vcsGitProvider"`
}

SDKv2

type HelmOciRemoteRepo added in v12.8.3

type HelmOciRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	ExternalDependenciesEnabled  bool     `json:"externalDependenciesEnabled"`
	ExternalDependenciesPatterns []string `json:"externalDependenciesPatterns,omitempty"`
	EnableTokenAuthentication    bool     `json:"enableTokenAuthentication"`
	ProjectId                    string   `json:"dockerProjectId"`
}

type HelmRemoteRepo added in v12.8.3

type HelmRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	HelmChartsBaseURL            string   `hcl:"helm_charts_base_url" json:"chartsBaseUrl"`
	ExternalDependenciesEnabled  bool     `json:"externalDependenciesEnabled"`
	ExternalDependenciesPatterns []string `json:"externalDependenciesPatterns"`
}

type MavenRemoteRepo added in v12.8.3

type MavenRemoteRepo struct {
	remote.JavaRemoteRepo
	remote.RepositoryCurationParams
}

type NpmRemoteRepo added in v12.8.3

type NugetRemoteRepo added in v12.8.3

type NugetRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	remote.RepositoryCurationParams
	FeedContextPath          string `json:"feedContextPath"`
	DownloadContextPath      string `json:"downloadContextPath"`
	V3FeedUrl                string `hcl:"v3_feed_url" json:"v3FeedUrl"` // Forced to specify hcl tag because predicate is not parsed by packer.Universal function.
	ForceNugetAuthentication bool   `json:"forceNugetAuthentication"`
	SymbolServerUrl          string `json:"symbolServerUrl"`
}

type OciRemoteRepo added in v12.8.3

type OciRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	ExternalDependenciesEnabled  bool     `json:"externalDependenciesEnabled"`
	ExternalDependenciesPatterns []string `json:"externalDependenciesPatterns,omitempty"`
	EnableTokenAuthentication    bool     `json:"enableTokenAuthentication"`
	ProjectId                    string   `json:"dockerProjectId"`
}

type PypiRemoteRepo added in v12.8.3

type PypiRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	remote.RepositoryCurationParams
	PypiRegistryUrl      string `json:"pyPIRegistryUrl"`
	PypiRepositorySuffix string `json:"pyPIRepositorySuffix"`
}

type TerraformRemoteRepo added in v12.8.3

type TerraformRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	TerraformRegistryUrl  string `json:"terraformRegistryUrl"`
	TerraformProvidersUrl string `json:"terraformProvidersUrl"`
}

type VcsRemoteRepo added in v12.8.3

type VcsRemoteRepo struct {
	remote.RepositoryRemoteBaseParams
	remote.RepositoryVcsParams
	MaxUniqueSnapshots int `json:"maxUniqueSnapshots"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL