workload

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HookObjectType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"shell": types.StringType,
		"before": types.ListType{
			ElemType: types.StringType,
		},
		"after": types.ListType{
			ElemType: types.StringType,
		},
		"on_error": types.ListType{
			ElemType: types.StringType,
		},
	},
}
View Source
var HooksObjectType = map[string]attr.Type{
	"sign":  HookObjectType,
	"renew": HookObjectType,
}

Functions

func CertDataFromAPI added in v0.5.0

func CertDataFromAPI(ctx context.Context, x509Fields v20231101.X509Fields, state utils.AttributeGetter) (types.Object, diag.Diagnostics)

func CertInfoFromAPI added in v0.5.0

func CertificateFieldListFromAPI added in v0.5.0

func CertificateFieldListFromAPI(ctx context.Context, cfl *v20231101.CertificateFieldList, state utils.AttributeGetter, p path.Path) (types.Object, diag.Diagnostics)

func HookFromAPI

func HookFromAPI(ctx context.Context, hook *v20231101.EndpointHook, hookPath path.Path, state utils.AttributeGetter) (types.Object, diag.Diagnostics)

func KeyInfoFromAPI added in v0.5.0

func KeyInfoFromAPI(ctx context.Context, keyInfo *v20231101.EndpointKeyInfo, state utils.AttributeGetter) (types.Object, diag.Diagnostics)

func NewCertificateDataDataSourceSchema added in v0.5.0

func NewCertificateDataDataSourceSchema() (schema.SingleNestedAttribute, error)

func NewCertificateDataResourceSchema added in v0.5.0

func NewCertificateDataResourceSchema() (schema.SingleNestedAttribute, error)

func NewCertificateInfoDataSourceSchema added in v0.5.0

func NewCertificateInfoDataSourceSchema() (schema.SingleNestedAttribute, error)

func NewCertificateInfoResourceSchema added in v0.5.0

func NewCertificateInfoResourceSchema() (schema.SingleNestedAttribute, error)

func NewKeyInfoDataSourceSchema added in v0.5.0

func NewKeyInfoDataSourceSchema() (schema.SingleNestedAttribute, error)

func NewKeyInfoResourceSchema added in v0.5.0

func NewKeyInfoResourceSchema() (schema.SingleNestedAttribute, error)

func NewReloadInfoDataSourceSchema added in v0.5.0

func NewReloadInfoDataSourceSchema() (schema.SingleNestedAttribute, error)

func NewReloadInfoResourceSchema added in v0.5.0

func NewReloadInfoResourceSchema() (schema.SingleNestedAttribute, error)

func NewResource

func NewResource() resource.Resource

func ReloadInfoFromAPI added in v0.5.0

func ReloadInfoFromAPI(ctx context.Context, reloadInfo *v20231101.EndpointReloadInfo, state utils.AttributeGetter) (types.Object, diag.Diagnostics)

Types

type CertificateDataModel added in v0.5.0

type CertificateDataModel struct {
	CommonName         types.Object `tfsdk:"common_name"`
	SANs               types.Object `tfsdk:"sans"`
	Organization       types.Object `tfsdk:"organization"`
	OrganizationalUnit types.Object `tfsdk:"organizational_unit"`
	Locality           types.Object `tfsdk:"locality"`
	Province           types.Object `tfsdk:"province"`
	StreetAddress      types.Object `tfsdk:"street_address"`
	PostalCode         types.Object `tfsdk:"postal_code"`
	Country            types.Object `tfsdk:"country"`
}

func (CertificateDataModel) ToAPI added in v0.5.0

type CertificateField added in v0.5.0

type CertificateField struct {
	Static         types.String `tfsdk:"static"`
	DeviceMetadata types.String `tfsdk:"device_metadata"`
}

type CertificateFieldList added in v0.5.0

type CertificateFieldList struct {
	Static         types.List `tfsdk:"static"`
	DeviceMetadata types.List `tfsdk:"device_metadata"`
}

type CertificateInfoModel

type CertificateInfoModel struct {
	Type     types.String `tfsdk:"type"`
	CrtFile  types.String `tfsdk:"crt_file"`
	KeyFile  types.String `tfsdk:"key_file"`
	RootFile types.String `tfsdk:"root_file"`
	Duration types.String `tfsdk:"duration"`
	GID      types.Int64  `tfsdk:"gid"`
	UID      types.Int64  `tfsdk:"uid"`
	Mode     types.Int64  `tfsdk:"mode"`
}

func (CertificateInfoModel) ToAPI

type HookModel

type HookModel struct {
	Shell   types.String `tfsdk:"shell"`
	Before  types.List   `tfsdk:"before"`
	After   types.List   `tfsdk:"after"`
	OnError types.List   `tfsdk:"on_error"`
}

func (*HookModel) ToAPI

type HooksModel

type HooksModel struct {
	Sign  types.Object `tfsdk:"sign"`
	Renew types.Object `tfsdk:"renew"`
}

func (*HooksModel) ToAPI

type KeyInfoModel

type KeyInfoModel struct {
	Format     types.String `tfsdk:"format"`
	PubFile    types.String `tfsdk:"pub_file"`
	Type       types.String `tfsdk:"type"`
	Protection types.String `tfsdk:"protection"`
}

func (*KeyInfoModel) ToAPI

func (ki *KeyInfoModel) ToAPI() *v20231101.EndpointKeyInfo

type Model

type Model struct {
	WorkloadType         types.String `tfsdk:"workload_type"`
	DisplayName          types.String `tfsdk:"display_name"`
	Slug                 types.String `tfsdk:"slug"`
	DeviceCollectionSlug types.String `tfsdk:"device_collection_slug"`
	AuthorityID          types.String `tfsdk:"authority_id"`
	CertificateInfo      types.Object `tfsdk:"certificate_info"`
	KeyInfo              types.Object `tfsdk:"key_info"`
	ReloadInfo           types.Object `tfsdk:"reload_info"`
	Hooks                types.Object `tfsdk:"hooks"`
	CertificateData      types.Object `tfsdk:"certificate_data"`
}

type ReloadInfoModel

type ReloadInfoModel struct {
	Method   types.String `tfsdk:"method"`
	PIDFile  types.String `tfsdk:"pid_file"`
	Signal   types.Int64  `tfsdk:"signal"`
	UnitName types.String `tfsdk:"unit_name"`
}

func (*ReloadInfoModel) ToAPI

type Resource

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

Resource defines the resource implementation.

func (*Resource) Configure

Configure adds the Smallstep API client to the resource.

func (*Resource) Create

func (*Resource) Delete

func (*Resource) Metadata

func (*Resource) Read

func (*Resource) Schema

func (*Resource) Update

Jump to

Keyboard shortcuts

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