user

package
v8.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 26 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 UsersEndpointPath = "artifactory/api/security/users/"

Variables

This section is empty.

Functions

func NewAnonymousUserResource

func NewAnonymousUserResource() resource.Resource

func NewManagedUserResource

func NewManagedUserResource() resource.Resource

func NewUserResource

func NewUserResource() resource.Resource

func PackUser

func PackUser(user User, d *schema.ResourceData) diag.Diagnostics

func ResourceArtifactoryUser

func ResourceArtifactoryUser() *schema.Resource

Types

type ArtifactoryAnonymousUserResource

type ArtifactoryAnonymousUserResource struct {
	// contains filtered or unexported fields
}

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:"name"`
}

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 {
	// contains filtered or unexported fields
}

func (*ArtifactoryBaseUserResource) Configure

func (*ArtifactoryBaseUserResource) Create

func (*ArtifactoryBaseUserResource) Delete

func (*ArtifactoryBaseUserResource) ImportState

ImportState imports the resource into the Terraform state.

func (*ArtifactoryBaseUserResource) Read

func (*ArtifactoryBaseUserResource) Update

type ArtifactoryManagedUserResource

type ArtifactoryManagedUserResource struct {
	ArtifactoryBaseUserResource
}

func (*ArtifactoryManagedUserResource) Metadata

func (*ArtifactoryManagedUserResource) Schema

type ArtifactoryUserResource

type ArtifactoryUserResource struct {
	ArtifactoryBaseUserResource
}

func (*ArtifactoryUserResource) Metadata

func (*ArtifactoryUserResource) Schema

type ArtifactoryUserResourceAPIModel

type ArtifactoryUserResourceAPIModel 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"`
}

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 User

type User 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"`
	LastLoggedIn             string   `json:"lastLoggedIn"`
	Realm                    string   `json:"realm"`
	Groups                   []string `json:"groups"`
}

Jump to

Keyboard shortcuts

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