Documentation
¶
Index ¶
- Variables
- func ResourceArtifactoryRemoteBowerRepository() *schema.Resource
- func ResourceArtifactoryRemoteCargoRepository() *schema.Resource
- func ResourceArtifactoryRemoteCocoapodsRepository() *schema.Resource
- func ResourceArtifactoryRemoteComposerRepository() *schema.Resource
- func ResourceArtifactoryRemoteConanRepository() *schema.Resource
- func ResourceArtifactoryRemoteDockerRepository() *schema.Resource
- func ResourceArtifactoryRemoteGenericRepository(pkt string) *schema.Resource
- func ResourceArtifactoryRemoteGoRepository() *schema.Resource
- func ResourceArtifactoryRemoteHelmRepository() *schema.Resource
- func ResourceArtifactoryRemoteJavaRepository(repoType string, suppressPom bool) *schema.Resource
- func ResourceArtifactoryRemoteMavenRepository() *schema.Resource
- func ResourceArtifactoryRemoteNugetRepository() *schema.Resource
- func ResourceArtifactoryRemotePypiRepository() *schema.Resource
- func ResourceArtifactoryRemoteTerraformRepository() *schema.Resource
- func ResourceArtifactoryRemoteVcsRepository() *schema.Resource
- type BowerRemoteRepo
- type CargoRemoteRepo
- type CocoapodsRemoteRepo
- type ComposerRemoteRepo
- type ConanRemoteRepo
- type DockerRemoteRepository
- type GoRemoteRepo
- type JavaRemoteRepo
- type NugetRemoteRepo
- type RepositoryRemoteBaseParams
- type RepositoryVcsParams
- type TerraformRemoteRepo
- type VcsRemoteRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseRemoteRepoSchema = map[string]*schema.Schema{ "key": { Type: schema.TypeString, Required: true, ForceNew: true, ValidateFunc: repository.RepoKeyValidator, Description: "A mandatory identifier for the repository that must be unique. It cannot begin with a number or contain spaces or special characters.", }, "project_key": { Type: schema.TypeString, Optional: true, ValidateDiagFunc: validator.ProjectKey, Description: "Project key for assigning this repository to. Must be 2 - 10 lowercase alphanumeric and hyphen characters. When assigning repository to a project, repository key must be prefixed with project key, separated by a dash.", }, "project_environments": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, MaxItems: 2, Set: schema.HashString, Optional: true, Computed: true, Description: "Project environment for assigning this repository to. Allow values: \"DEV\" or \"PROD\". " + "The attribute should only be used if the repository is already assigned to the existing project. If not, " + "the attribute will be ignored by Artifactory, but will remain in the Terraform state, which will create " + "state drift during the update.", }, "package_type": { Type: schema.TypeString, Required: false, Computed: true, ForceNew: true, }, "url": { Type: schema.TypeString, Required: true, ValidateFunc: validation.IsURLWithHTTPorHTTPS, Description: "The remote repo URL.", }, "username": { Type: schema.TypeString, Optional: true, }, "password": { Type: schema.TypeString, Optional: true, Sensitive: true, }, "proxy": { Type: schema.TypeString, Optional: true, Description: "Proxy key from Artifactory Proxies settings", }, "description": { Type: schema.TypeString, Optional: true, DiffSuppressFunc: func(_, old, new string, _ *schema.ResourceData) bool { return old == fmt.Sprintf("%s (local file cache)", new) }, Description: "Public description.", }, "notes": { Type: schema.TypeString, Optional: true, Description: "Internal description.", }, "includes_pattern": { Type: schema.TypeString, Optional: true, Default: "**/*", Description: "List of comma-separated artifact patterns to include when evaluating artifact requests in the form of x/y/**/z/*. " + "When used, only artifacts matching one of the include patterns are served. By default, all artifacts are included (**/*).", }, "excludes_pattern": { Type: schema.TypeString, Optional: true, Description: "List of comma-separated artifact patterns to exclude when evaluating artifact requests, in the form of x/y/**/z/*. " + "By default no artifacts are excluded.", }, "repo_layout_ref": { Type: schema.TypeString, Optional: true, ValidateDiagFunc: repository.ValidateRepoLayoutRefSchemaOverride, Description: "Sets the layout that the repository should use for storing and identifying modules. " + "A recommended layout that corresponds to the package type defined is suggested, and index packages uploaded and calculate metadata accordingly.", }, "remote_repo_layout_ref": { Type: schema.TypeString, Optional: true, Description: "Repository layout key for the remote layout mapping.", }, "hard_fail": { Type: schema.TypeBool, Optional: true, Default: false, Description: "When set, Artifactory will return an error to the client that causes the build to fail if there " + "is a failure to communicate with this repository.", }, "offline": { Type: schema.TypeBool, Optional: true, Default: false, Description: "If set, Artifactory does not try to fetch remote artifacts. Only locally-cached artifacts are retrieved.", }, "blacked_out": { Type: schema.TypeBool, Optional: true, Default: false, Description: "(A.K.A 'Ignore Repository' on the UI) When set, the repository or its local cache do not participate in artifact resolution.", }, "xray_index": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Enable Indexing In Xray. Repository will be indexed with the default retention period. " + "You will be able to change it via Xray settings.", }, "store_artifacts_locally": { Type: schema.TypeBool, Optional: true, Default: true, Description: "When set, the repository should store cached artifacts locally. When not set, artifacts are not " + "stored locally, and direct repository-to-client streaming is used. This can be useful for multi-server " + "setups over a high-speed LAN, with one Artifactory caching certain data on central storage, and streaming " + "it directly to satellite pass-though Artifactory servers.", }, "socket_timeout_millis": { Type: schema.TypeInt, Optional: true, Default: 15000, ValidateFunc: validation.IntAtLeast(0), Description: "Network timeout (in ms) to use when establishing a connection and for unanswered requests. " + "Timing out on a network operation is considered a retrieval failure.", }, "local_address": { Type: schema.TypeString, Optional: true, Description: "The local address to be used when creating connections. " + "Useful for specifying the interface to use on systems with multiple network interfaces.", }, "retrieval_cache_period_seconds": { Type: schema.TypeInt, Optional: true, Default: 7200, ValidateFunc: validation.IntAtLeast(0), Description: "Metadata Retrieval Cache Period (Sec) in the UI. This value refers to the number of seconds to cache " + "metadata files before checking for newer versions on remote server. A value of 0 indicates no caching.", }, "metadata_retrieval_timeout_secs": { Type: schema.TypeInt, Optional: true, Default: 60, ValidateFunc: validation.IntAtLeast(0), Description: "Metadata Retrieval Cache Timeout (Sec) in the UI.This value refers to the number of seconds to wait " + "for retrieval from the remote before serving locally cached artifact or fail the request.", }, "missed_cache_period_seconds": { Type: schema.TypeInt, Optional: true, Default: 1800, ValidateFunc: validation.IntAtLeast(0), Description: "Missed Retrieval Cache Period (Sec) in the UI. The number of seconds to cache artifact retrieval " + "misses (artifact not found). A value of 0 indicates no caching.", }, "unused_artifacts_cleanup_period_hours": { Type: schema.TypeInt, Optional: true, Default: 0, ValidateFunc: validation.IntAtLeast(0), Description: "Unused Artifacts Cleanup Period (Hr) in the UI. The number of hours to wait before an artifact is " + "deemed 'unused' and eligible for cleanup from the repository. A value of 0 means automatic cleanup of cached artifacts is disabled.", }, "assumed_offline_period_secs": { Type: schema.TypeInt, Optional: true, Default: 300, ValidateFunc: validation.IntAtLeast(0), Description: "The number of seconds the repository stays in assumed offline state after a connection error. " + "At the end of this time, an online check is attempted in order to reset the offline status. " + "A value of 0 means the repository is never assumed offline.", }, "share_configuration": { Type: schema.TypeBool, Optional: true, Computed: true, }, "synchronize_properties": { Type: schema.TypeBool, Optional: true, Default: false, Description: "When set, remote artifacts are fetched along with their properties.", }, "block_mismatching_mime_types": { Type: schema.TypeBool, Optional: true, Default: true, Description: "If set, artifacts will fail to download if a mismatch is detected between requested and received " + "mimetype, according to the list specified in the system properties file under blockedMismatchingMimeTypes. " + "You can override by adding mimetypes to the override list 'mismatching_mime_types_override_list'.", }, "property_sets": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, Optional: true, Description: "List of property set names", }, "allow_any_host_auth": { Type: schema.TypeBool, Optional: true, Default: false, Description: "'Lenient Host Authentication' in the UI. Allow credentials of this repository to be used on requests redirected to any other host.", }, "enable_cookie_management": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Enables cookie management if the remote repository uses cookies to manage client state.", }, "bypass_head_requests": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Before caching an artifact, Artifactory first sends a HEAD request to the remote resource. " + "In some remote resources, HEAD requests are disallowed and therefore rejected, even though downloading the " + "artifact is allowed. When checked, Artifactory will bypass the HEAD request and cache the artifact directly using a GET request.", }, "priority_resolution": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Setting Priority Resolution takes precedence over the resolution order when resolving virtual " + "repositories. Setting repositories with priority will cause metadata to be merged only from repositories " + "set with a priority. If a package is not found in those repositories, Artifactory will merge from repositories marked as non-priority.", }, "client_tls_certificate": { Type: schema.TypeString, Optional: true, Computed: true, Description: "Client TLS certificate name.", }, "content_synchronisation": { Type: schema.TypeList, Optional: true, Computed: true, MaxItems: 1, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "enabled": { Type: schema.TypeBool, Optional: true, Default: false, Description: "If set, Remote repository proxies a local or remote repository from another instance of Artifactory. Default value is 'false'.", }, "statistics_enabled": { Type: schema.TypeBool, Optional: true, Default: false, Description: "If set, Artifactory will notify the remote instance whenever an artifact in the Smart Remote Repository is downloaded locally so that it can update its download counter. Note that if this option is not set, there may be a discrepancy between the number of artifacts reported to have been downloaded in the different Artifactory instances of the proxy chain. Default value is 'false'.", }, "properties_enabled": { Type: schema.TypeBool, Optional: true, Default: false, Description: "If set, properties for artifacts that have been cached in this repository will be updated if they are modified in the artifact hosted at the remote Artifactory instance. The trigger to synchronize the properties is download of the artifact from the remote repository cache of the local Artifactory instance. Default value is 'false'.", }, "source_origin_absence_detection": { Type: schema.TypeBool, Optional: true, Default: false, Description: "If set, Artifactory displays an indication on cached items if they have been deleted from the corresponding repository in the remote Artifactory instance. Default value is 'false'", }, }, }, }, "propagate_query_params": { Type: schema.TypeBool, Optional: true, Default: false, Description: "When set, if query params are included in the request to Artifactory, they will be passed on to the remote repository.", }, "query_params": { Type: schema.TypeString, Optional: true, Description: "Custom HTTP query parameters that will be automatically included in all remote resource requests. " + "For example: `param1=val1¶m2=val2¶m3=val3`", }, "list_remote_folder_items": { Type: schema.TypeBool, Optional: true, Default: true, Description: "Lists the items of remote folders in simple and list browsing. The remote content is cached " + "according to the value of the 'Retrieval Cache Period'. Default value is 'true'.", }, "mismatching_mime_types_override_list": { Type: schema.TypeString, Optional: true, ValidateDiagFunc: validator.CommaSeperatedList, StateFunc: util.FormatCommaSeparatedString, Description: "The set of mime types that should override the block_mismatching_mime_types setting. " + "Eg: 'application/json,application/xml'. Default value is empty.", }, "download_direct": { Type: schema.TypeBool, Optional: true, Default: false, Description: "When set, download requests to this repository will redirect the client to download the artifact " + "directly from the cloud storage provider. Available in Enterprise+ and Edge licenses only. Default value is 'false'.", }, }
View Source
var RepoTypesLikeGeneric = []string{
"alpine",
"chef",
"conda",
"cran",
"debian",
"gems",
"generic",
"gitlfs",
"npm",
"opkg",
"p2",
"pub",
"puppet",
"rpm",
"swift",
}
View Source
var VcsRemoteRepoSchema = 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.All(validation.StringIsNotEmpty, validation.IsURLWithHTTPorHTTPS)), Description: `This attribute is used when vcs_git_provider is set to 'CUSTOM'. Provided URL will be used as proxy.`, }, }
Functions ¶
func ResourceArtifactoryRemoteConanRepository ¶ added in v6.21.0
func ResourceArtifactoryRemoteMavenRepository ¶ added in v6.12.0
func ResourceArtifactoryRemoteTerraformRepository ¶ added in v6.9.0
Types ¶
type BowerRemoteRepo ¶
type BowerRemoteRepo struct { RepositoryRemoteBaseParams RepositoryVcsParams BowerRegistryUrl string `json:"bowerRegistryUrl"` }
type CargoRemoteRepo ¶
type CargoRemoteRepo struct { RepositoryRemoteBaseParams RegistryUrl string `hcl:"git_registry_url" json:"gitRegistryUrl"` AnonymousAccess bool `hcl:"anonymous_access" json:"cargoAnonymousAccess"` }
type CocoapodsRemoteRepo ¶
type CocoapodsRemoteRepo struct { RepositoryRemoteBaseParams RepositoryVcsParams PodsSpecsRepoUrl string `json:"podsSpecsRepoUrl"` }
type ComposerRemoteRepo ¶
type ComposerRemoteRepo struct { RepositoryRemoteBaseParams RepositoryVcsParams ComposerRegistryUrl string `json:"composerRegistryUrl"` }
type ConanRemoteRepo ¶ added in v6.21.0
type ConanRemoteRepo struct { RepositoryRemoteBaseParams ForceConanAuthentication bool `json:"forceConanAuthentication"` }
type DockerRemoteRepository ¶
type DockerRemoteRepository struct { RepositoryRemoteBaseParams ExternalDependenciesEnabled bool `hcl:"external_dependencies_enabled" json:"externalDependenciesEnabled"` ExternalDependenciesPatterns []string `hcl:"external_dependencies_patterns" json:"externalDependenciesPatterns"` EnableTokenAuthentication bool `hcl:"enable_token_authentication" json:"enableTokenAuthentication"` BlockPushingSchema1 bool `hcl:"block_pushing_schema1" json:"blockPushingSchema1"` }
type GoRemoteRepo ¶
type GoRemoteRepo struct { RepositoryRemoteBaseParams VcsGitProvider string `json:"vcsGitProvider"` }
type JavaRemoteRepo ¶ added in v6.12.0
type JavaRemoteRepo struct { RepositoryRemoteBaseParams FetchJarsEagerly bool `json:"fetchJarsEagerly"` FetchSourcesEagerly bool `json:"fetchSourcesEagerly"` RemoteRepoChecksumPolicyType string `json:"remoteRepoChecksumPolicyType"` HandleReleases bool `json:"handleReleases"` HandleSnapshots bool `json:"handleSnapshots"` SuppressPomConsistencyChecks bool `json:"suppressPomConsistencyChecks"` RejectInvalidJars bool `json:"rejectInvalidJars"` }
func UnpackJavaRemoteRepo ¶ added in v6.12.0
func UnpackJavaRemoteRepo(s *schema.ResourceData, repoType string) JavaRemoteRepo
type NugetRemoteRepo ¶
type NugetRemoteRepo struct { RepositoryRemoteBaseParams 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 RepositoryRemoteBaseParams ¶ added in v6.21.1
type RepositoryRemoteBaseParams struct { Key string `json:"key,omitempty"` ProjectKey string `json:"projectKey"` ProjectEnvironments []string `json:"environments"` Rclass string `json:"rclass"` PackageType string `json:"packageType,omitempty"` Url string `json:"url"` Username string `json:"username"` Password string `json:"password"` Proxy string `json:"proxy"` Description string `json:"description"` Notes string `json:"notes"` IncludesPattern string `json:"includesPattern"` ExcludesPattern string `json:"excludesPattern"` RepoLayoutRef string `json:"repoLayoutRef"` RemoteRepoLayoutRef string `json:"remoteRepoLayoutRef"` HardFail *bool `json:"hardFail,omitempty"` Offline *bool `json:"offline,omitempty"` BlackedOut *bool `json:"blackedOut,omitempty"` XrayIndex bool `json:"xrayIndex"` PropagateQueryParams bool `json:"propagateQueryParams"` QueryParams string `json:"queryParams,omitempty"` PriorityResolution bool `json:"priorityResolution"` StoreArtifactsLocally *bool `json:"storeArtifactsLocally,omitempty"` SocketTimeoutMillis int `json:"socketTimeoutMillis"` LocalAddress string `json:"localAddress"` RetrievalCachePeriodSecs int `hcl:"retrieval_cache_period_seconds" json:"retrievalCachePeriodSecs"` MissedRetrievalCachePeriodSecs int `hcl:"missed_cache_period_seconds" json:"missedRetrievalCachePeriodSecs"` UnusedArtifactsCleanupPeriodHours int `json:"unusedArtifactsCleanupPeriodHours"` AssumedOfflinePeriodSecs int `hcl:"assumed_offline_period_secs" json:"assumedOfflinePeriodSecs"` SynchronizeProperties *bool `hcl:"synchronize_properties" json:"synchronizeProperties"` BlockMismatchingMimeTypes *bool `hcl:"block_mismatching_mime_types" json:"blockMismatchingMimeTypes"` PropertySets []string `hcl:"property_sets" json:"propertySets,omitempty"` AllowAnyHostAuth *bool `hcl:"allow_any_host_auth" json:"allowAnyHostAuth,omitempty"` EnableCookieManagement *bool `hcl:"enable_cookie_management" json:"enableCookieManagement,omitempty"` BypassHeadRequests *bool `hcl:"bypass_head_requests" json:"bypassHeadRequests,omitempty"` ClientTlsCertificate string `hcl:"client_tls_certificate" json:"clientTlsCertificate,omitempty"` ContentSynchronisation *repository.ContentSynchronisation `hcl:"content_synchronisation" json:"contentSynchronisation,omitempty"` MismatchingMimeTypeOverrideList string `hcl:"mismatching_mime_types_override_list" json:"mismatchingMimeTypesOverrideList"` ListRemoteFolderItems bool `json:"listRemoteFolderItems"` DownloadRedirect bool `hcl:"download_direct" json:"downloadRedirect,omitempty"` }
func UnpackBaseRemoteRepo ¶
func UnpackBaseRemoteRepo(s *schema.ResourceData, packageType string) RepositoryRemoteBaseParams
func (RepositoryRemoteBaseParams) Id ¶ added in v6.21.1
func (bp RepositoryRemoteBaseParams) Id() string
type RepositoryVcsParams ¶ added in v6.10.0
type RepositoryVcsParams struct { VcsGitProvider string `json:"vcsGitProvider"` VcsGitDownloadUrl string `json:"vcsGitDownloadUrl"` }
func UnpackVcsRemoteRepo ¶
func UnpackVcsRemoteRepo(s *schema.ResourceData) RepositoryVcsParams
type TerraformRemoteRepo ¶ added in v6.9.0
type TerraformRemoteRepo struct { RepositoryRemoteBaseParams TerraformRegistryUrl string `hcl:"terraform_registry_url" json:"terraformRegistryUrl"` TerraformProvidersUrl string `hcl:"terraform_providers_url" json:"terraformProvidersUrl"` }
type VcsRemoteRepo ¶
type VcsRemoteRepo struct { RepositoryRemoteBaseParams RepositoryVcsParams MaxUniqueSnapshots int `json:"maxUniqueSnapshots"` }
Source Files
¶
- remote.go
- resource_artifactory_remote_bower_repository.go
- resource_artifactory_remote_cargo_repository.go
- resource_artifactory_remote_cocoapods_repository.go
- resource_artifactory_remote_composer_repository.go
- resource_artifactory_remote_conan_repository.go
- resource_artifactory_remote_docker_repository.go
- resource_artifactory_remote_generic_repository.go
- resource_artifactory_remote_go_repository.go
- resource_artifactory_remote_helm_repository.go
- resource_artifactory_remote_java_repository.go
- resource_artifactory_remote_maven_repository.go
- resource_artifactory_remote_nuget_repository.go
- resource_artifactory_remote_pypi_repository.go
- resource_artifactory_remote_terraform_repository.go
- resource_artifactory_remote_vcs_repository.go
Click to show internal directories.
Click to hide internal directories.