image

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCachedImageResource

func NewCachedImageResource() resource.Resource

NewCachedImageResource return new cached image resource.

func NewPublishImageResource

func NewPublishImageResource() resource.Resource

NewPublishImageResource return new publish image resource.

func ToAliasList

func ToAliasList(ctx context.Context, aliasSet types.Set) ([]string, diag.Diagnostics)

ToAliasList converts aliases of type types.Set into a slice of strings.

func ToAliasSetType

func ToAliasSetType(ctx context.Context, aliases []string) (types.Set, diag.Diagnostics)

ToAliasSetType converts slice of strings into aliases of type types.Set.

Types

type CachedImageModel

type CachedImageModel struct {
	SourceImage  types.String `tfsdk:"source_image"`
	SourceRemote types.String `tfsdk:"source_remote"`
	Aliases      types.Set    `tfsdk:"aliases"`
	CopyAliases  types.Bool   `tfsdk:"copy_aliases"`
	Type         types.String `tfsdk:"type"`
	Project      types.String `tfsdk:"project"`
	Remote       types.String `tfsdk:"remote"`

	// Computed.
	ResourceID    types.String `tfsdk:"resource_id"`
	Architecture  types.String `tfsdk:"architecture"`
	CreatedAt     types.Int64  `tfsdk:"created_at"`
	Fingerprint   types.String `tfsdk:"fingerprint"`
	CopiedAliases types.Set    `tfsdk:"copied_aliases"`
}

CachedImageModel resource data model that matches the schema.

type CachedImageResource

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

CachedImageResource represent Incus cached image resource.

func (*CachedImageResource) Configure

func (CachedImageResource) Create

func (CachedImageResource) Delete

func (CachedImageResource) Metadata

func (CachedImageResource) Read

func (CachedImageResource) Schema

func (CachedImageResource) SyncState

SyncState fetches the server's current state for a cached image and updates the provided model. It then applies this updated model as the new state in Terraform.

func (CachedImageResource) Update

type PublishImageModel

type PublishImageModel struct {
	Instance       types.String `tfsdk:"instance"`
	Aliases        types.Set    `tfsdk:"aliases"`
	Properties     types.Map    `tfsdk:"properties"`
	Public         types.Bool   `tfsdk:"public"`
	Filename       types.String `tfsdk:"filename"`
	CompressionAlg types.String `tfsdk:"compression_algorithm"`
	Triggers       types.List   `tfsdk:"triggers"`
	Project        types.String `tfsdk:"project"`
	Remote         types.String `tfsdk:"remote"`

	// Computed.
	ResourceID   types.String `tfsdk:"resource_id"`
	Architecture types.String `tfsdk:"architecture"`
	Fingerprint  types.String `tfsdk:"fingerprint"`
	CreatedAt    types.Int64  `tfsdk:"created_at"`
}

PublishImageModel resource data model that matches the schema.

type PublishImageResource

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

PublishImageResource represent Incus publish image resource.

func (*PublishImageResource) Configure

func (PublishImageResource) Create

func (PublishImageResource) Delete

func (PublishImageResource) Metadata

func (PublishImageResource) Read

func (PublishImageResource) Schema

func (PublishImageResource) SyncState

SyncState fetches the server's current state for a published image and updates the provided model. It then applies this updated model as the new state in Terraform.

func (PublishImageResource) Update

Jump to

Keyboard shortcuts

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