user

package
v2.20.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserAttributes = map[string]schema.Attribute{
	"username": schema.StringAttribute{
		Description: "This User's username. This is used for logging in, and may also be displayed alongside " +
			"actions the User performs (for example, in Events or public StackScripts).",
		Required: true,
	},
	"ssh_keys": schema.ListAttribute{
		Description: "A list of SSH Key labels added by this User. These are the keys that will be deployed " +
			"if this User is included in the authorized_users field of a create Linode, rebuild Linode, or " +
			"create Disk request.",
		Computed:    true,
		ElementType: types.StringType,
	},
	"email": schema.StringAttribute{
		Description: "The email address for this User, for account management communications, and may be used " +
			"for other communications as configured.",
		Computed: true,
	},
	"restricted": schema.BoolAttribute{
		Description: "If true, this User must be granted access to perform actions or access entities on this Account.",
		Computed:    true,
	},
	"global_grants": schema.ListAttribute{
		Description: "A structure containing the Account-level grants a User has.",
		Computed:    true,
		ElementType: linodeUserGrantsGlobalObjectType,
	},
	"database_grant":     linodeUserGrantsEntitySet,
	"domain_grant":       linodeUserGrantsEntitySet,
	"firewall_grant":     linodeUserGrantsEntitySet,
	"image_grant":        linodeUserGrantsEntitySet,
	"linode_grant":       linodeUserGrantsEntitySet,
	"longview_grant":     linodeUserGrantsEntitySet,
	"nodebalancer_grant": linodeUserGrantsEntitySet,
	"stackscript_grant":  linodeUserGrantsEntitySet,
	"volume_grant":       linodeUserGrantsEntitySet,
	"id": schema.StringAttribute{
		Description: "Unique identifier for this DataSource.",
		Computed:    true,
	},
	"password_created": schema.StringAttribute{
		Description: "The date and time when this User’s current password was created." +
			"User passwords are first created during the Account sign-up process, " +
			"and updated using the Reset Password webpage." +
			"null if this User has not created a password yet.",
		Computed: true,
	},
	"tfa_enabled": schema.BoolAttribute{
		Description: "A boolean value indicating if the User has Two Factor Authentication (TFA) enabled.",
		Computed:    true,
	},
	"verified_phone_number": schema.StringAttribute{
		Description: "The phone number verified for this User Profile with the Phone Number Verify command." +
			"null if this User Profile has no verified phone number.",
		Computed: true,
	},
}

Functions

func NewDataSource

func NewDataSource() datasource.DataSource

func Resource

func Resource() *schema.Resource

Types

type DataSource

type DataSource struct {
	helper.BaseDataSource
}

func (*DataSource) Read

type DataSourceModel

type DataSourceModel struct {
	Username            types.String `tfsdk:"username"`
	SSHKeys             types.List   `tfsdk:"ssh_keys"`
	Email               types.String `tfsdk:"email"`
	Restricted          types.Bool   `tfsdk:"restricted"`
	GlobalGrants        types.List   `tfsdk:"global_grants"`
	DomainGrant         types.Set    `tfsdk:"domain_grant"`
	FirewallGrant       types.Set    `tfsdk:"firewall_grant"`
	ImageGrant          types.Set    `tfsdk:"image_grant"`
	LinodeGrant         types.Set    `tfsdk:"linode_grant"`
	LongviewGrant       types.Set    `tfsdk:"longview_grant"`
	NodebalancerGrant   types.Set    `tfsdk:"nodebalancer_grant"`
	StackscriptGrant    types.Set    `tfsdk:"stackscript_grant"`
	VolumeGrant         types.Set    `tfsdk:"volume_grant"`
	DatabaseGrant       types.Set    `tfsdk:"database_grant"`
	ID                  types.String `tfsdk:"id"`
	PasswordCreated     types.String `tfsdk:"password_created"`
	TFAEnabled          types.Bool   `tfsdk:"tfa_enabled"`
	VerifiedPhoneNumber types.String `tfsdk:"verified_phone_number"`
}

func (*DataSourceModel) ParseNonUserGrants

func (data *DataSourceModel) ParseNonUserGrants()

func (*DataSourceModel) ParseUser

func (data *DataSourceModel) ParseUser(
	ctx context.Context, user *linodego.User,
) diag.Diagnostics

func (*DataSourceModel) ParseUserGrants

func (data *DataSourceModel) ParseUserGrants(
	ctx context.Context, userGrants *linodego.UserGrants,
) diag.Diagnostics

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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