user

package
v10.8.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package user supports the resource artifactory_user and artifactory_managed_user, which use the new terraform-plugin-framework

The truth table below shows how extra logic is needed to accommodate the behavior of Artifactory API for users while maintaining backward compatibility with states created by SDKv2 provider.

Create | Config | Plan | PUT | POST | GET | State | |----------------|----------------|----------------|---------|----------------|----------------| | Not Defined | Null | | [] | | Null | | [] | [] | [] | [] | | [] | | ["readers"] | ["readers"] | ["readers"] | | ["readers"] | ["readers"] |

Update | Config | Plan | POST | GET | State | |-----------------------|-----------------------|-----------------------|-----------------------|-----------------------| | Not Defined | Null | | | Null | | [] | [] | [] | | [] | | ["readers", "foo"] | ["readers", "foo"] | ["readers", "foo"] | ["readers", "foo"] | ["readers", "foo"] |

Index

Constants

View Source
const (
	AccessAPIArtifactoryVersion = "7.84.3"
	UserGroupEndpointPath       = "access/api/v2/users/{name}/groups"
)

Variables

This section is empty.

Functions

func GetUserEndpointPath added in v10.4.3

func GetUserEndpointPath(artifactoryVersion string) string

func GetUsersEndpointPath added in v10.4.3

func GetUsersEndpointPath(artifactoryVersion string) string

func NewAnonymousUserResource

func NewAnonymousUserResource() resource.Resource

func NewManagedUserResource

func NewManagedUserResource() resource.Resource

func NewUnmanagedUserResource added in v10.7.1

func NewUnmanagedUserResource() resource.Resource

func NewUserResource

func NewUserResource() resource.Resource

Types

type ArtifactoryAnonymousUserResource

type ArtifactoryAnonymousUserResource struct {
	ProviderData util.ProviderMetadata
	TypeName     string
}

func (*ArtifactoryAnonymousUserResource) Configure

func (*ArtifactoryAnonymousUserResource) Create

func (*ArtifactoryAnonymousUserResource) Delete

func (*ArtifactoryAnonymousUserResource) ImportState

ImportState imports the resource into the Terraform state.

func (*ArtifactoryAnonymousUserResource) Metadata

func (*ArtifactoryAnonymousUserResource) Read

func (*ArtifactoryAnonymousUserResource) Schema

func (*ArtifactoryAnonymousUserResource) Update

type ArtifactoryAnonymousUserResourceAPIModel

type ArtifactoryAnonymousUserResourceAPIModel struct {
	Name string `json:"username"`
}

ArtifactoryAnonymousUserResourceAPIModel describes the API data model.

type ArtifactoryAnonymousUserResourceModel

type ArtifactoryAnonymousUserResourceModel struct {
	Id   types.String `tfsdk:"id"`
	Name types.String `tfsdk:"name"`
}

ArtifactoryAnonymousUserResourceModel describes the Terraform resource data model to match the resource schema.

type ArtifactoryBaseUserResource

type ArtifactoryBaseUserResource struct {
	ProviderData util.ProviderMetadata
	TypeName     string
}

func (*ArtifactoryBaseUserResource) Configure

func (*ArtifactoryBaseUserResource) Create

func (*ArtifactoryBaseUserResource) Delete

func (*ArtifactoryBaseUserResource) ImportState

ImportState imports the resource into the Terraform state.

func (*ArtifactoryBaseUserResource) Metadata

func (*ArtifactoryBaseUserResource) Read

func (*ArtifactoryBaseUserResource) Update

type ArtifactoryManagedUserResource

type ArtifactoryManagedUserResource struct {
	ArtifactoryBaseUserResource
}

func (*ArtifactoryManagedUserResource) Schema

type ArtifactoryUserAPIModel added in v10.4.3

type ArtifactoryUserAPIModel struct {
	Name                     string    `json:"name"`
	Email                    string    `json:"email"`
	Password                 string    `json:"password,omitempty"`
	Admin                    bool      `json:"admin"`
	ProfileUpdatable         bool      `json:"profileUpdatable"`
	DisableUIAccess          bool      `json:"disableUIAccess"`
	InternalPasswordDisabled *bool     `json:"internalPasswordDisabled"`
	Groups                   *[]string `json:"groups,omitempty"`
}

ArtifactoryUserAPIModel corresponds to old Artifactory user API

type ArtifactoryUserResource

type ArtifactoryUserResource struct {
	ArtifactoryBaseUserResource
}

func (*ArtifactoryUserResource) Schema

type ArtifactoryUserResourceAPIModel

type ArtifactoryUserResourceAPIModel struct {
	Name                     string    `json:"username"`
	Email                    string    `json:"email"`
	Password                 string    `json:"password,omitempty"`
	Admin                    bool      `json:"admin"`
	ProfileUpdatable         bool      `json:"profile_updatable"`
	DisableUIAccess          bool      `json:"disable_ui_access"`
	InternalPasswordDisabled *bool     `json:"internal_password_disabled,omitempty"`
	Groups                   *[]string `json:"groups,omitempty"`
}

ArtifactoryUserResourceAPIModel describes the API data model.

func (ArtifactoryUserResourceAPIModel) ToState

type ArtifactoryUserResourceModel

type ArtifactoryUserResourceModel struct {
	Id                       types.String `tfsdk:"id"`
	Name                     types.String `tfsdk:"name"`
	Email                    types.String `tfsdk:"email"`
	Password                 types.String `tfsdk:"password"`
	Admin                    types.Bool   `tfsdk:"admin"`
	ProfileUpdatable         types.Bool   `tfsdk:"profile_updatable"`
	DisableUIAccess          types.Bool   `tfsdk:"disable_ui_access"`
	InternalPasswordDisabled types.Bool   `tfsdk:"internal_password_disabled"`
	Groups                   types.Set    `tfsdk:"groups"`
}

ArtifactoryUserResourceModel describes the Terraform resource data model to match the resource schema.

type GroupsAddRemove added in v10.3.2

type GroupsAddRemove struct {
	Add    []string `json:"add"`
	Remove []string `json:"remove"`
}

Jump to

Keyboard shortcuts

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