provider

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MPL-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaAttrConnection = "connection"

	SchemaAttrSsh   = "ssh"
	SchemaAttrProxy = "proxy"

	SchemaAttrParallel = "parallel"
	SchemaAttrTimeout  = "timeout"
	SchemaAttrRetry    = "retry"

	SchemaAttrShell = "shell"
	SchemaAttrSudo  = "sudo"
)
View Source
const (
	SchemaAttrConnectionHost        = "host"
	SchemaAttrConnectionHostKey     = "host_key"
	SchemaAttrConnectionPort        = "port"
	SchemaAttrConnectionUser        = "user"
	SchemaAttrConnectionPassword    = "password"
	SchemaAttrConnectionPrivateKey  = "private_key"
	SchemaAttrConnectionCertificate = "certificate"

	SchemaAttrConnectionBastionHost        = "bastion_host"
	SchemaAttrConnectionBastionHostKey     = "bastion_host_key"
	SchemaAttrConnectionBastionPort        = "bastion_port"
	SchemaAttrConnectionBastionUser        = "bastion_user"
	SchemaAttrConnectionBastionPassword    = "bastion_password"
	SchemaAttrConnectionBastionPrivateKey  = "bastion_private_key"
	SchemaAttrConnectionBastionCertificate = "bastion_certificate"

	SchemaAttrConnectionTimeout       = "timeout"
	SchemaAttrConnectionAgent         = "agent"
	SchemaAttrConnectionAgentIdentity = "agent_identity"
)
View Source
const (
	SchemaAttrSshHost            = "host"
	SchemaAttrSshHostKey         = "host_key"
	SchemaAttrSshPort            = "port"
	SchemaAttrSshUser            = "user"
	SchemaAttrSshPassword        = "password"
	SchemaAttrSshPrivateKey      = "private_key"
	SchemaAttrSshCertificate     = "certificate"
	SchemaAttrSshTimeout         = "timeout"
	SchemaAttrSshAgent           = "agent"
	SchemaAttrSshAgentIdentity   = "agent_identity"
	SchemaAttrSshAgentIdentities = "agent_identities"
)
View Source
const Name = "system"
View Source
const (
	SchemaEnvPrefix = "TF_PROVIDER_SYSTEM_"
)

Variables

This section is empty.

Functions

func New

func New(version string) func() *schema.Provider

func TestCheckResourceAttrBase64

func TestCheckResourceAttrBase64(name, key, decodedValue string) resource.TestCheckFunc

TestCheckResourceAttrBase64 is a TestCheckFunc which validates the base64 encoded value in state for the given name/key combination.

func TestLogResourceAttr

func TestLogResourceAttr(t *testing.T, name string) resource.TestCheckFunc

TestLogResourceAttr returns a resource.TestCheckFunc which logs the attributes of the defined resource Usage: TestLogResourceAttr(t, "system_group.test")

func TestLogString

func TestLogString(t *testing.T, s string) string

TestLogString logs the provided s before returning it

Types

type Provider

type Provider struct {
	Config Schema
	System system.System
}

type Schema

type Schema struct {
	Ssh *SchemaSsh

	Proxy *SchemaProxy

	Parallel int
	Timeout  time.Duration
	Retry    bool

	Sudo bool
}

Schema is a struct to represent the configuration of the provider

type SchemaProxy

type SchemaProxy struct {
	Ssh *SchemaSsh
}

type SchemaSsh

type SchemaSsh struct {
	User            string
	Password        string
	PrivateKey      string
	Certificate     string
	Host            string
	HostKey         string
	Port            int
	Timeout         time.Duration
	Agent           bool
	AgentIdentities []string
}

type SyncResource

type SyncResource struct {
	CreateContext schema.CreateContextFunc
	ReadContext   schema.ReadContextFunc
	UpdateContext schema.UpdateContextFunc
	DeleteContext schema.DeleteContextFunc
	// contains filtered or unexported fields
}

SyncResource holds a sync.RWMutex

func (*SyncResource) CreateContextSync

func (r *SyncResource) CreateContextSync(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func (*SyncResource) DeleteContextSync

func (r *SyncResource) DeleteContextSync(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func (*SyncResource) ReadContextSync

func (r *SyncResource) ReadContextSync(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

func (*SyncResource) UpdateContextSync

func (r *SyncResource) UpdateContextSync(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics

Jump to

Keyboard shortcuts

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