provider

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHost = "127.0.0.1"

	DefaultUseHTTPS = true

	DefaultAllowInsecure = false

	DefaultAllowNTLM = true

	DefaultKerberosRealm = ""

	DefaultKerberosServicePrincipalName = ""

	DefaultKerberosConfig = "/etc/krb5.conf"

	DefaultKerberosCredentialCache = ""

	DefaultTLSServerName = ""

	// DefaultUser is used if there is no user given
	DefaultUser = "Administrator"

	// DefaultPort is used if there is no port given
	DefaultPort = 5986

	DefaultCACertFile = ""

	DefaultCertFile = ""

	DefaultKeyFile = ""

	// DefaultScriptPath is used as the path to copy the file to
	// for remote execution if not provided otherwise.
	DefaultScriptPath = "C:/Temp/terraform_%RAND%.cmd"

	// DefaultTimeout is used if there is no timeout given
	DefaultTimeoutString = "30s"
)
View Source
const (
	MaxUint32                    = 4294967295
	ReadMachineInstanceTimeout   = 2 * time.Minute
	CreateMachineInstanceTimeout = 30 * time.Minute
	UpdateMachineInstanceTimeout = 30 * time.Minute
	DeleteMachineInstanceTimeout = 5 * time.Minute
)
View Source
const (
	ReadNetworkSwitchTimeout   = 1 * time.Minute
	CreateNetworkSwitchTimeout = 5 * time.Minute
	UpdateNetworkSwitchTimeout = 5 * time.Minute
	DeleteNetworkSwitchTimeout = 1 * time.Minute
)
View Source
const (
	ReadVhdTimeout   = 1 * time.Minute
	CreateVhdTimeout = 5 * time.Minute
	UpdateVhdTimeout = 5 * time.Minute
	DeleteVhdTimeout = 1 * time.Minute
)

Variables

This section is empty.

Functions

func GetWinrmClient

func GetWinrmClient(config *Config) (winrmClient *winrm.Client, err error)

New creates a new communicator implementation over WinRM.

func IntBetween

func IntBetween(min, max int) schema.SchemaValidateDiagFunc

func IntInSlice

func IntInSlice(valid []int) schema.SchemaValidateDiagFunc

func IsDivisibleBy

func IsDivisibleBy(logicalSize int) schema.SchemaValidateDiagFunc

func New

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

Provider returns a terraform.ResourceProvider.

func ValueOrIntBetween

func ValueOrIntBetween(value, min, max int) schema.SchemaValidateDiagFunc

Types

type Config

type Config struct {
	Version          string
	Commit           string
	TerraformVersion string
	User             string
	Password         string
	Host             string
	Port             int
	HTTPS            bool
	Insecure         bool

	KrbRealm  string
	KrbSpn    string
	KrbConfig string
	KrbCCache string

	NTLM bool

	TLSServerName string
	CACert        []byte
	Cert          []byte
	Key           []byte

	ScriptPath string
	Timeout    string
}

func (*Config) Client

func (c *Config) Client() (comm api.Client, err error)

HypervWinRmClient() returns a new client for configuring hyperv.

Jump to

Keyboard shortcuts

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