Documentation
¶
Index ¶
- Variables
- func ResourceArtifactoryRemoteBowerRepository() *schema.Resource
- func ResourceArtifactoryRemoteCargoRepository() *schema.Resource
- func ResourceArtifactoryRemoteCocoapodsRepository() *schema.Resource
- func ResourceArtifactoryRemoteComposerRepository() *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 DockerRemoteRepository
- type GoRemoteRepo
- type JavaRemoteRepo
- type NugetRemoteRepo
- type RepositoryBaseParams
- 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 3 - 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"`, }, "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, Computed: true, DiffSuppressFunc: func(_, old, new string, _ *schema.ResourceData) bool { return old == fmt.Sprintf("%s (local file cache)", new) }, }, "notes": { Type: schema.TypeString, Optional: true, }, "includes_pattern": { Type: schema.TypeString, Optional: true, Computed: true, 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, Computed: true, Description: "Repository layout key for the remote layout mapping", Deprecated: "This field has currently no effect, because there is no corresponding field in the API body, and it's not returned by the GET call.", }, "hard_fail": { Type: schema.TypeBool, Optional: true, Computed: true, 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, Computed: true, Description: "If set, Artifactory does not try to fetch remote artifacts. Only locally-cached artifacts are retrieved.", }, "blacked_out": { Type: schema.TypeBool, Optional: true, Computed: true, 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, Computed: 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, Computed: true, 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, Computed: true, Description: "The metadataRetrievalTimeoutSecs field not allowed to be bigger then retrievalCachePeriodSecs field.", DefaultFunc: func() (interface{}, error) { return 7200, nil }, ValidateFunc: validation.IntAtLeast(0), }, "failed_retrieval_cache_period_secs": { Type: schema.TypeInt, Computed: true, Deprecated: "This field is not returned in a get payload but is offered on the UI. " + "It's inserted here for inclusive and informational reasons. It does not function", }, "missed_cache_period_seconds": { Type: schema.TypeInt, Optional: true, Computed: true, ValidateFunc: validation.IntAtLeast(0), Description: "The number of seconds to cache artifact retrieval misses (artifact not found). A value of 0 indicates no caching.", }, "unused_artifacts_cleanup_period_enabled": { Type: schema.TypeBool, Optional: true, Computed: true, }, "unused_artifacts_cleanup_period_hours": { Type: schema.TypeInt, Optional: true, Computed: true, ValidateFunc: validation.IntAtLeast(0), Description: `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. Default to 300.", }, "share_configuration": { Type: schema.TypeBool, Optional: true, Computed: true, }, "synchronize_properties": { Type: schema.TypeBool, Optional: true, Computed: true, Description: "When set, remote artifacts are fetched along with their properties.", }, "block_mismatching_mime_types": { Type: schema.TypeBool, Optional: true, Computed: true, 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.", }, "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, Computed: true, Description: "Also known as 'Lenient Host Authentication', Allow credentials of this repository to be used on requests redirected to any other host.", }, "enable_cookie_management": { Type: schema.TypeBool, Optional: true, Computed: true, Description: "Enables cookie management if the remote repository uses cookies to manage client state.", }, "bypass_head_requests": { Type: schema.TypeBool, Optional: true, Computed: true, 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, Computed: true, Description: "Setting repositories with priority will cause metadata to be merged only from repositories set with this field", }, "client_tls_certificate": { Type: schema.TypeString, Optional: true, Computed: true, }, "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.", }, "list_remote_folder_items": { Type: schema.TypeBool, Optional: true, Default: false, 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 'false'.`, }, "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",
"conan",
"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 ResourceArtifactoryRemoteMavenRepository ¶ added in v6.12.0
func ResourceArtifactoryRemoteTerraformRepository ¶ added in v6.9.0
Types ¶
type BowerRemoteRepo ¶
type BowerRemoteRepo struct { RepositoryBaseParams RepositoryVcsParams BowerRegistryUrl string `json:"bowerRegistryUrl"` }
type CargoRemoteRepo ¶
type CargoRemoteRepo struct { RepositoryBaseParams RegistryUrl string `hcl:"git_registry_url" json:"gitRegistryUrl"` AnonymousAccess bool `hcl:"anonymous_access" json:"cargoAnonymousAccess"` }
type CocoapodsRemoteRepo ¶
type CocoapodsRemoteRepo struct { RepositoryBaseParams RepositoryVcsParams PodsSpecsRepoUrl string `json:"podsSpecsRepoUrl"` }
type ComposerRemoteRepo ¶
type ComposerRemoteRepo struct { RepositoryBaseParams RepositoryVcsParams ComposerRegistryUrl string `json:"composerRegistryUrl"` }
type DockerRemoteRepository ¶
type DockerRemoteRepository struct { RepositoryBaseParams 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 { RepositoryBaseParams VcsGitProvider string `json:"vcsGitProvider"` }
type JavaRemoteRepo ¶ added in v6.12.0
type JavaRemoteRepo struct { RepositoryBaseParams 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 { RepositoryBaseParams 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 RepositoryBaseParams ¶ added in v6.10.0
type RepositoryBaseParams struct { Key string `hcl:"key" json:"key,omitempty"` ProjectKey string `json:"projectKey"` ProjectEnvironments []string `json:"environments"` Rclass string `json:"rclass"` PackageType string `hcl:"package_type" json:"packageType,omitempty"` Url string `hcl:"url" json:"url"` Username string `hcl:"username" json:"username,omitempty"` Password string `json:"password"` Proxy string `hcl:"proxy" json:"proxy"` Description string `hcl:"description" json:"description,omitempty"` Notes string `hcl:"notes" json:"notes,omitempty"` IncludesPattern string `hcl:"includes_pattern" json:"includesPattern,omitempty"` ExcludesPattern string `json:"excludesPattern"` RepoLayoutRef string `hcl:"repo_layout_ref" json:"repoLayoutRef,omitempty"` RemoteRepoLayoutRef string `json:"remoteRepoLayoutRef"` HardFail *bool `hcl:"hard_fail" json:"hardFail,omitempty"` Offline *bool `hcl:"offline" json:"offline,omitempty"` BlackedOut *bool `hcl:"blacked_out" json:"blackedOut,omitempty"` XrayIndex bool `json:"xrayIndex"` PropagateQueryParams bool `hcl:"propagate_query_params" json:"propagateQueryParams"` PriorityResolution bool `hcl:"priority_resolution" json:"priorityResolution"` StoreArtifactsLocally *bool `hcl:"store_artifacts_locally" json:"storeArtifactsLocally,omitempty"` SocketTimeoutMillis int `hcl:"socket_timeout_millis" json:"socketTimeoutMillis,omitempty"` LocalAddress string `hcl:"local_address" json:"localAddress,omitempty"` RetrievalCachePeriodSecs int `hcl:"retrieval_cache_period_seconds" json:"retrievalCachePeriodSecs"` // doesn't appear in the body when calling get. Hence no HCL FailedRetrievalCachePeriodSecs int `json:"failedRetrievalCachePeriodSecs,omitempty"` MissedRetrievalCachePeriodSecs int `hcl:"missed_cache_period_seconds" json:"missedRetrievalCachePeriodSecs"` UnusedArtifactsCleanupEnabled *bool `hcl:"unused_artifacts_cleanup_period_enabled" json:"unusedArtifactsCleanupEnabled,omitempty"` UnusedArtifactsCleanupPeriodHours int `hcl:"unused_artifacts_cleanup_period_hours" json:"unusedArtifactsCleanupPeriodHours,omitempty"` AssumedOfflinePeriodSecs int `hcl:"assumed_offline_period_secs" json:"assumedOfflinePeriodSecs,omitempty"` SynchronizeProperties *bool `hcl:"synchronize_properties" json:"synchronizeProperties,omitempty"` BlockMismatchingMimeTypes *bool `hcl:"block_mismatching_mime_types" json:"blockMismatchingMimeTypes,omitempty"` 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) RepositoryBaseParams
func (RepositoryBaseParams) Id ¶ added in v6.10.0
func (bp RepositoryBaseParams) 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 { RepositoryBaseParams TerraformRegistryUrl string `hcl:"terraform_registry_url" json:"terraformRegistryUrl"` TerraformProvidersUrl string `hcl:"terraform_providers_url" json:"terraformProvidersUrl"` }
type VcsRemoteRepo ¶
type VcsRemoteRepo struct { RepositoryBaseParams 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_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.