federated

package
v12.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Rclass = "federated"
View Source
const RepositoriesEndpoint = "artifactory/api/repositories/{key}"

Variables

View Source
var SchemaGeneratorV3 = func(isRequired bool) map[string]*schema.Schema {
	return lo.Assign(
		repository.ProxySchema,
		map[string]*schema.Schema{
			"cleanup_on_delete": {
				Type:        schema.TypeBool,
				Optional:    true,
				Default:     false,
				Description: "Delete all federated members on `terraform destroy` if set to `true`. Caution: it will delete all the repositories in the federation on other Artifactory instances.",
			},
			"member": {
				Type:     schema.TypeSet,
				Required: isRequired,
				Optional: !isRequired,
				Description: "The list of Federated members. If a Federated member receives a request that does not include the repository URL, it will " +
					"automatically be added with the combination of the configured base URL and `key` field value. " +
					"Note that each of the federated members will need to have a base URL set. Please follow the [instruction](https://www.jfrog.com/confluence/display/JFROG/Working+with+Federated+Repositories#WorkingwithFederatedRepositories-SettingUpaFederatedRepository)" +
					" to set up Federated repositories correctly.",
				Elem: &schema.Resource{
					Schema: map[string]*schema.Schema{
						"url": {
							Type:             schema.TypeString,
							Required:         true,
							Description:      "Full URL to ending with the repositoryName",
							ValidateDiagFunc: validation.ToDiagFunc(validation.IsURLWithHTTPorHTTPS),
						},
						"enabled": {
							Type:     schema.TypeBool,
							Required: true,
							Description: "Represents the active state of the federated member. It is supported to " +
								"change the enabled status of my own member. The config will be updated on the other " +
								"federated members automatically.",
						},
					},
				},
			},
		},
	)
}
View Source
var SchemaGeneratorV4 = func(isRequired bool) map[string]*schema.Schema {
	return lo.Assign(
		federatedSchemaV3,
		map[string]*schema.Schema{
			"cleanup_on_delete": {
				Type:        schema.TypeBool,
				Optional:    true,
				Default:     false,
				Description: "Delete all federated members on `terraform destroy` if set to `true`. Caution: it will delete all the repositories in the federation on other Artifactory instances. Set `access_token` attribute if Access Federation for access tokens is not enabled.",
			},
			"member": {
				Type:     schema.TypeSet,
				Required: isRequired,
				Optional: !isRequired,
				Description: "The list of Federated members. If a Federated member receives a request that does not include the repository URL, it will " +
					"automatically be added with the combination of the configured base URL and `key` field value. " +
					"Note that each of the federated members will need to have a base URL set. Please follow the [instruction](https://www.jfrog.com/confluence/display/JFROG/Working+with+Federated+Repositories#WorkingwithFederatedRepositories-SettingUpaFederatedRepository)" +
					" to set up Federated repositories correctly.",
				Elem: &schema.Resource{
					Schema: map[string]*schema.Schema{
						"url": {
							Type:             schema.TypeString,
							Required:         true,
							Description:      "Full URL to ending with the repositoryName",
							ValidateDiagFunc: validation.ToDiagFunc(validation.IsURLWithHTTPorHTTPS),
						},
						"enabled": {
							Type:     schema.TypeBool,
							Required: true,
							Description: "Represents the active state of the federated member. It is supported to " +
								"change the enabled status of my own member. The config will be updated on the other " +
								"federated members automatically.",
						},
						"access_token": {
							Type:             schema.TypeString,
							Optional:         true,
							Sensitive:        true,
							ValidateDiagFunc: validation.ToDiagFunc(validation.StringIsNotEmpty),
							Description:      "Admin access token for this member Artifactory instance. Used in conjunction with `cleanup_on_delete` attribute when Access Federation for access tokens is not enabled.",
						},
					},
				},
			},
		},
	)
}

Functions

func PackMembers

func PackMembers(members []Member, d *schema.ResourceData) error

func ResourceArtifactoryFederatedAlpineRepository

func ResourceArtifactoryFederatedAlpineRepository() *schema.Resource

func ResourceArtifactoryFederatedAnsibleRepository

func ResourceArtifactoryFederatedAnsibleRepository() *schema.Resource

func ResourceArtifactoryFederatedCargoRepository

func ResourceArtifactoryFederatedCargoRepository() *schema.Resource

func ResourceArtifactoryFederatedConanRepository

func ResourceArtifactoryFederatedConanRepository() *schema.Resource

func ResourceArtifactoryFederatedDebianRepository

func ResourceArtifactoryFederatedDebianRepository() *schema.Resource

func ResourceArtifactoryFederatedDockerV1Repository

func ResourceArtifactoryFederatedDockerV1Repository() *schema.Resource

func ResourceArtifactoryFederatedDockerV2Repository

func ResourceArtifactoryFederatedDockerV2Repository() *schema.Resource

func ResourceArtifactoryFederatedGenericRepository

func ResourceArtifactoryFederatedGenericRepository(packageType string) *schema.Resource

func ResourceArtifactoryFederatedHelmOciRepository

func ResourceArtifactoryFederatedHelmOciRepository() *schema.Resource

func ResourceArtifactoryFederatedJavaRepository

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

func ResourceArtifactoryFederatedNugetRepository

func ResourceArtifactoryFederatedNugetRepository() *schema.Resource

func ResourceArtifactoryFederatedOciRepository

func ResourceArtifactoryFederatedOciRepository() *schema.Resource

func ResourceArtifactoryFederatedRpmRepository

func ResourceArtifactoryFederatedRpmRepository() *schema.Resource

func ResourceArtifactoryFederatedTerraformRepository

func ResourceArtifactoryFederatedTerraformRepository(registryType string) *schema.Resource

Types

type AlpineRepositoryParams

type AlpineRepositoryParams struct {
	local.AlpineLocalRepoParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type AnsibleRepositoryParams

type AnsibleRepositoryParams struct {
	local.RepositoryBaseParams
	RepoParams
	Members []Member `hcl:"member" json:"members"`
	repository.PrimaryKeyPairRefParam
}

type CargoFederatedRepositoryParams

type CargoFederatedRepositoryParams struct {
	local.CargoLocalRepoParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type ConanRepositoryParams

type ConanRepositoryParams struct {
	local.ConanRepoParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type DebianFederatedRepositoryParams

type DebianFederatedRepositoryParams struct {
	local.DebianLocalRepositoryParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type DockerFederatedRepositoryParams

type DockerFederatedRepositoryParams struct {
	local.DockerLocalRepositoryParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type GenericRepositoryParams

type GenericRepositoryParams struct {
	local.RepositoryBaseParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type HelmOciFederatedRepositoryParams

type HelmOciFederatedRepositoryParams struct {
	local.HelmOciLocalRepositoryParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type JavaFederatedRepositoryParams

type JavaFederatedRepositoryParams struct {
	local.JavaLocalRepositoryParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type Member

type Member struct {
	Url     string `json:"url"`
	Enabled bool   `json:"enabled"`
}

type NugetFederatedRepositoryParams

type NugetFederatedRepositoryParams struct {
	local.NugetLocalRepositoryParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type OciFederatedRepositoryParams

type OciFederatedRepositoryParams struct {
	local.OciLocalRepositoryParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type RepoParams

type RepoParams struct {
	Proxy        string `json:"proxy"`
	DisableProxy bool   `json:"disableProxy"`
}

type RpmFederatedRepositoryParams

type RpmFederatedRepositoryParams struct {
	local.RpmLocalRepositoryParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

type TerraformFederatedRepositoryParams

type TerraformFederatedRepositoryParams struct {
	local.RepositoryBaseParams
	Members []Member `hcl:"member" json:"members"`
	RepoParams
}

Jump to

Keyboard shortcuts

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