Documentation ¶
Index ¶
- Constants
- Variables
- func GetGenericRepoSchema(packageType string) map[string]*schema.Schema
- func GetJavaRepoSchema(packageType string, suppressPom bool) map[string]*schema.Schema
- func GetPackageType(packageType string) string
- func GetTerraformLocalSchema(registryType string) map[string]*schema.Schema
- func ResourceArtifactoryLocalAlpineRepository() *schema.Resource
- func ResourceArtifactoryLocalAnsibleRepository() *schema.Resource
- func ResourceArtifactoryLocalCargoRepository() *schema.Resource
- func ResourceArtifactoryLocalConanRepository() *schema.Resource
- func ResourceArtifactoryLocalDebianRepository() *schema.Resource
- func ResourceArtifactoryLocalDockerV1Repository() *schema.Resource
- func ResourceArtifactoryLocalDockerV2Repository() *schema.Resource
- func ResourceArtifactoryLocalGenericRepository(packageType string) *schema.Resource
- func ResourceArtifactoryLocalHelmOciRepository() *schema.Resource
- func ResourceArtifactoryLocalJavaRepository(packageType string, suppressPom bool) *schema.Resource
- func ResourceArtifactoryLocalNugetRepository() *schema.Resource
- func ResourceArtifactoryLocalOciRepository() *schema.Resource
- func ResourceArtifactoryLocalRpmRepository() *schema.Resource
- func ResourceArtifactoryLocalTerraformRepository(registryType string) *schema.Resource
- func UnpackConnanRepository(data *schema.ResourceData) (interface{}, string, error)
- type AlpineLocalRepoParams
- type AnsibleLocalRepoParams
- type CargoLocalRepoParams
- type ConanRepoParams
- type DebianLocalRepositoryParams
- type DockerLocalRepositoryParams
- type HelmOciLocalRepositoryParams
- type JavaLocalRepositoryParams
- type NugetLocalRepositoryParams
- type OciLocalRepositoryParams
- type RepositoryBaseParams
- type RpmLocalRepositoryParams
Constants ¶
View Source
const DockerPackageType = "docker"
View Source
const HelmOciPackageType = "helmoci"
View Source
const OciPackageType = "oci"
Variables ¶
View Source
var AlpineLocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, repository.RepoLayoutRefSchema(rclass, alpinePackageType), repository.AlpinePrimaryKeyPairRef, repository.CompressionFormats, )
View Source
var AnsibleLocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, repository.RepoLayoutRefSchema(rclass, ansiblePackageType), repository.AlpinePrimaryKeyPairRef, )
View Source
var BaseLocalRepoSchema = utilsdk.MergeMaps( repository.BaseRepoSchema, map[string]*schema.Schema{ "blacked_out": { Type: schema.TypeBool, Optional: true, Default: false, Description: "When set, the repository does not participate in artifact resolution and new artifacts cannot be deployed.", }, "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.", }, "priority_resolution": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Setting repositories with priority will cause metadata to be merged only from repositories set with this field", }, "property_sets": { Type: schema.TypeSet, Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, Optional: true, Description: "List of property set name", }, "archive_browsing_enabled": { Type: schema.TypeBool, Optional: true, Description: "When set, you may view content such as HTML or Javadoc files directly from Artifactory.\nThis may not be safe and therefore requires strict content moderation to prevent malicious users from uploading content that may compromise security (e.g., cross-site scripting attacks).", }, "download_direct": { Type: schema.TypeBool, Optional: true, 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.", }, "cdn_redirect": { 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 AWS CloudFront. Available in Enterprise+ and Edge licenses only. Default value is 'false'", }, }, )
View Source
var CargoLocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, map[string]*schema.Schema{ "anonymous_access": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Cargo client does not send credentials when performing download and search for crates. Enable this to allow anonymous access to these resources (only), note that this will override the security anonymous access option. Default value is 'false'.", }, "enable_sparse_index": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Enable internal index support based on Cargo sparse index specifications, instead of the default git index. Default value is 'false'.", }, }, repository.RepoLayoutRefSchema(rclass, cargoPackageType), repository.CompressionFormats, )
View Source
var ConanSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, repository.ConanBaseSchema, repository.RepoLayoutRefSchema(rclass, repository.ConanPackageType), )
View Source
var DebianLocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, repository.PrimaryKeyPairRef, repository.SecondaryKeyPairRef, map[string]*schema.Schema{ "trivial_layout": { Type: schema.TypeBool, Optional: true, Default: false, Description: "When set, the repository will use the deprecated trivial layout.", Deprecated: "You shouldn't be using this", }, }, repository.RepoLayoutRefSchema(rclass, debianPackageType), repository.CompressionFormats, )
View Source
var DockerV1LocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, map[string]*schema.Schema{ "max_unique_tags": { Type: schema.TypeInt, Optional: true, Computed: true, }, "tag_retention": { Type: schema.TypeInt, Computed: true, }, "block_pushing_schema1": { Type: schema.TypeBool, Computed: true, }, "api_version": { Type: schema.TypeString, Computed: true, }, }, repository.RepoLayoutRefSchema(rclass, DockerPackageType), )
View Source
var DockerV2LocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, map[string]*schema.Schema{ "max_unique_tags": { Type: schema.TypeInt, Optional: true, Default: 0, Description: "The maximum number of unique tags of a single Docker image to store in this repository.\n" + "Once the number tags for an image exceeds this setting, older tags are removed. A value of 0 (default) indicates there is no limit.\n" + "This only applies to manifest v2", ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)), }, "tag_retention": { Type: schema.TypeInt, Optional: true, Computed: false, Description: "If greater than 1, overwritten tags will be saved by their digest, up to the set up number. This only applies to manifest V2", ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(1)), }, "block_pushing_schema1": { Type: schema.TypeBool, Optional: true, Computed: true, Description: "When set, Artifactory will block the pushing of Docker images with manifest v2 schema 1 to this repository.", }, "api_version": { Type: schema.TypeString, Computed: true, Description: "The Docker API version to use. This cannot be set", }, }, repository.RepoLayoutRefSchema(rclass, DockerPackageType), )
View Source
var HelmOciLocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, map[string]*schema.Schema{ "max_unique_tags": { Type: schema.TypeInt, Optional: true, Default: 0, Description: "The maximum number of unique tags of a single Docker image to store in this repository.\n" + "Once the number tags for an image exceeds this setting, older tags are removed. A value of 0 (default) indicates there is no limit.\n" + "This only applies to manifest v2", ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)), }, "tag_retention": { Type: schema.TypeInt, Optional: true, Computed: false, Description: "If greater than 1, overwritten tags will be saved by their digest, up to the set up number. This only applies to manifest V2", ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(1)), }, }, repository.RepoLayoutRefSchema(rclass, HelmOciPackageType), )
View Source
var NugetLocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, 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.\nOnce the number of " + "snapshots exceeds this setting, older versions are removed.\nA value of 0 (default) indicates there is no limit, and unique snapshots are not cleaned up.", }, "force_nuget_authentication": { Type: schema.TypeBool, Optional: true, Default: false, Description: "Force basic authentication credentials in order to use this repository.", }, }, repository.RepoLayoutRefSchema(rclass, nugetPackageType), )
View Source
var OciLocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, map[string]*schema.Schema{ "max_unique_tags": { Type: schema.TypeInt, Optional: true, Default: 0, Description: "The maximum number of unique tags of a single OCI image to store in this repository.\n" + "Once the number tags for an image exceeds this setting, older tags are removed. A value of 0 (default) indicates there is no limit.", ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)), }, "tag_retention": { Type: schema.TypeInt, Optional: true, Computed: false, Description: "If greater than 1, overwritten tags will be saved by their digest, up to the set up number.", ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(1)), }, }, repository.RepoLayoutRefSchema(rclass, OciPackageType), )
View Source
var PackageTypesLikeGeneric = []string{
"bower",
"chef",
"cocoapods",
"composer",
"conda",
"cran",
"gems",
"generic",
"gitlfs",
"go",
"helm",
"huggingfaceml",
"npm",
"opkg",
"pub",
"puppet",
"pypi",
"swift",
"terraformbackend",
"vagrant",
}
View Source
var RpmLocalSchema = utilsdk.MergeMaps( BaseLocalRepoSchema, repository.PrimaryKeyPairRef, repository.SecondaryKeyPairRef, map[string]*schema.Schema{ "yum_root_depth": { Type: schema.TypeInt, Optional: true, Default: 0, ValidateDiagFunc: validation.ToDiagFunc(validation.IntAtLeast(0)), Description: "The depth, relative to the repository's root folder, where RPM metadata is created. " + "This is useful when your repository contains multiple RPM repositories under parallel hierarchies. " + "For example, if your RPMs are stored under 'fedora/linux/$releasever/$basearch', specify a depth of 4.", }, "calculate_yum_metadata": { Type: schema.TypeBool, Optional: true, Default: false, }, "enable_file_lists_indexing": { Type: schema.TypeBool, Optional: true, Default: false, }, "yum_group_file_names": { Type: schema.TypeString, Optional: true, Default: "", ValidateDiagFunc: validator.CommaSeperatedList, Description: "A comma separated list of XML file names containing RPM group component definitions. Artifactory includes " + "the group definitions as part of the calculated RPM metadata, as well as automatically generating a " + "gzipped version of the group files, if required.", }, }, repository.RepoLayoutRefSchema(rclass, rpmPackageType), )
View Source
var UnpackLocalJavaRepository = func(data *schema.ResourceData, rclass string, packageType string) JavaLocalRepositoryParams { d := &utilsdk.ResourceData{ResourceData: data} return JavaLocalRepositoryParams{ RepositoryBaseParams: UnpackBaseRepo(rclass, data, packageType), ChecksumPolicyType: d.GetString("checksum_policy_type", false), SnapshotVersionBehavior: d.GetString("snapshot_version_behavior", false), MaxUniqueSnapshots: d.GetInt("max_unique_snapshots", false), HandleReleases: d.GetBool("handle_releases", false), HandleSnapshots: d.GetBool("handle_snapshots", false), SuppressPomConsistencyChecks: d.GetBool("suppress_pom_consistency_checks", false), } }
Functions ¶
func GetJavaRepoSchema ¶
func GetPackageType ¶
GetPackageType `packageType` in the API call payload for Terraform repositories must be "terraform", but we use `terraform_module` and `terraform_provider` as a package types in the Provider. GetPackageType function corrects this discrepancy.
func GetTerraformLocalSchema ¶
func ResourceArtifactoryLocalAnsibleRepository ¶ added in v11.3.0
func UnpackConnanRepository ¶
func UnpackConnanRepository(data *schema.ResourceData) (interface{}, string, error)
Types ¶
type AlpineLocalRepoParams ¶
type AlpineLocalRepoParams struct { RepositoryBaseParams repository.PrimaryKeyPairRefParam }
func UnpackLocalAlpineRepository ¶
func UnpackLocalAlpineRepository(data *schema.ResourceData, rclass string) AlpineLocalRepoParams
type AnsibleLocalRepoParams ¶ added in v11.3.0
type AnsibleLocalRepoParams struct { RepositoryBaseParams repository.PrimaryKeyPairRefParam }
func UnpackLocalAnsibleRepository ¶ added in v11.3.0
func UnpackLocalAnsibleRepository(data *schema.ResourceData, rclass string) AnsibleLocalRepoParams
type CargoLocalRepoParams ¶
type CargoLocalRepoParams struct { RepositoryBaseParams AnonymousAccess bool `json:"cargoAnonymousAccess"` EnableSparseIndex bool `json:"cargoInternalIndex"` }
func UnpackLocalCargoRepository ¶
func UnpackLocalCargoRepository(data *schema.ResourceData, rclass string) CargoLocalRepoParams
type ConanRepoParams ¶
type ConanRepoParams struct { RepositoryBaseParams repository.ConanBaseParams }
type DebianLocalRepositoryParams ¶
type DebianLocalRepositoryParams struct { RepositoryBaseParams repository.PrimaryKeyPairRefParam repository.SecondaryKeyPairRefParam TrivialLayout bool `hcl:"trivial_layout" json:"debianTrivialLayout"` IndexCompressionFormats []string `hcl:"index_compression_formats" json:"optionalIndexCompressionFormats,omitempty"` }
func UnpackLocalDebianRepository ¶
func UnpackLocalDebianRepository(data *schema.ResourceData, rclass string) DebianLocalRepositoryParams
type DockerLocalRepositoryParams ¶
type DockerLocalRepositoryParams struct { RepositoryBaseParams MaxUniqueTags int `hcl:"max_unique_tags" json:"maxUniqueTags"` DockerApiVersion string `hcl:"api_version" json:"dockerApiVersion"` TagRetention int `hcl:"tag_retention" json:"dockerTagRetention"` BlockPushingSchema1 bool `hcl:"block_pushing_schema1" json:"blockPushingSchema1"` }
func UnpackLocalDockerV1Repository ¶
func UnpackLocalDockerV1Repository(data *schema.ResourceData, rclass string) DockerLocalRepositoryParams
func UnpackLocalDockerV2Repository ¶
func UnpackLocalDockerV2Repository(data *schema.ResourceData, rclass string) DockerLocalRepositoryParams
type HelmOciLocalRepositoryParams ¶
type HelmOciLocalRepositoryParams struct { RepositoryBaseParams MaxUniqueTags int `json:"maxUniqueTags"` TagRetention int `json:"dockerTagRetention"` }
func UnpackLocalHelmOciRepository ¶
func UnpackLocalHelmOciRepository(data *schema.ResourceData, rclass string) HelmOciLocalRepositoryParams
type JavaLocalRepositoryParams ¶
type JavaLocalRepositoryParams struct { RepositoryBaseParams ChecksumPolicyType string `hcl:"checksum_policy_type" json:"checksumPolicyType"` SnapshotVersionBehavior string `hcl:"snapshot_version_behavior" json:"snapshotVersionBehavior"` MaxUniqueSnapshots int `hcl:"max_unique_snapshots" json:"maxUniqueSnapshots"` HandleReleases bool `hcl:"handle_releases" json:"handleReleases"` HandleSnapshots bool `hcl:"handle_snapshots" json:"handleSnapshots"` SuppressPomConsistencyChecks bool `hcl:"suppress_pom_consistency_checks" json:"suppressPomConsistencyChecks"` }
type NugetLocalRepositoryParams ¶
type NugetLocalRepositoryParams struct { RepositoryBaseParams MaxUniqueSnapshots int `hcl:"max_unique_snapshots" json:"maxUniqueSnapshots"` ForceNugetAuthentication bool `hcl:"force_nuget_authentication" json:"forceNugetAuthentication"` }
func UnpackLocalNugetRepository ¶
func UnpackLocalNugetRepository(data *schema.ResourceData, rclass string) NugetLocalRepositoryParams
type OciLocalRepositoryParams ¶
type OciLocalRepositoryParams struct { RepositoryBaseParams MaxUniqueTags int `json:"maxUniqueTags"` DockerApiVersion string `json:"dockerApiVersion"` TagRetention int `json:"dockerTagRetention"` }
func UnpackLocalOciRepository ¶
func UnpackLocalOciRepository(data *schema.ResourceData, rclass string) OciLocalRepositoryParams
type RepositoryBaseParams ¶
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"` Description string `json:"description"` Notes string `json:"notes"` IncludesPattern string `hcl:"includes_pattern" json:"includesPattern,omitempty"` ExcludesPattern string `hcl:"excludes_pattern" json:"excludesPattern,omitempty"` RepoLayoutRef string `hcl:"repo_layout_ref" json:"repoLayoutRef,omitempty"` BlackedOut *bool `hcl:"blacked_out" json:"blackedOut,omitempty"` XrayIndex bool `json:"xrayIndex"` PropertySets []string `hcl:"property_sets" json:"propertySets,omitempty"` ArchiveBrowsingEnabled *bool `hcl:"archive_browsing_enabled" json:"archiveBrowsingEnabled,omitempty"` DownloadRedirect *bool `hcl:"download_direct" json:"downloadRedirect,omitempty"` CdnRedirect *bool `json:"cdnRedirect"` PriorityResolution bool `hcl:"priority_resolution" json:"priorityResolution"` TerraformType string `json:"terraformType"` }
func UnpackBaseRepo ¶
func UnpackBaseRepo(rclassType string, s *schema.ResourceData, packageType string) RepositoryBaseParams
func UnpackLocalTerraformRepository ¶
func UnpackLocalTerraformRepository(data *schema.ResourceData, rclass string, registryType string) RepositoryBaseParams
func (RepositoryBaseParams) Id ¶
func (bp RepositoryBaseParams) Id() string
type RpmLocalRepositoryParams ¶
type RpmLocalRepositoryParams struct { RepositoryBaseParams repository.PrimaryKeyPairRefParam repository.SecondaryKeyPairRefParam RootDepth int `hcl:"yum_root_depth" json:"yumRootDepth"` CalculateYumMetadata bool `hcl:"calculate_yum_metadata" json:"calculateYumMetadata"` EnableFileListsIndexing bool `hcl:"enable_file_lists_indexing" json:"enableFileListsIndexing"` GroupFileNames string `hcl:"yum_group_file_names" json:"yumGroupFileNames"` }
func UnpackLocalRpmRepository ¶
func UnpackLocalRpmRepository(data *schema.ResourceData, rclass string) RpmLocalRepositoryParams
Source Files ¶
- local.go
- resource_artifactory_local_alpine_repository.go
- resource_artifactory_local_ansible_repository.go
- resource_artifactory_local_cargo_repository.go
- resource_artifactory_local_conan_repository.go
- resource_artifactory_local_debian_repository.go
- resource_artifactory_local_docker_repository.go
- resource_artifactory_local_generic_repository.go
- resource_artifactory_local_helmoci_repository.go
- resource_artifactory_local_java_repository.go
- resource_artifactory_local_nuget_repository.go
- resource_artifactory_local_oci_repository.go
- resource_artifactory_local_rpm_repository.go
- resource_artifactory_local_terraform_repository.go
Click to show internal directories.
Click to hide internal directories.