Documentation
¶
Overview ¶
Code generated by "mapstructure-to-hcl2 -type LocationConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type ConfigParamsConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type ConnectConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type HardwareConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type RunConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type ShutdownConfig"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type WaitIpConfig"; DO NOT EDIT.
Index ¶
- Constants
- func CommHost(host string) func(multistep.StateBag) (string, error)
- type Artifact
- type ConfigParamsConfig
- type ConnectConfig
- type FlatConfigParamsConfig
- type FlatConnectConfig
- type FlatHardwareConfig
- type FlatLocationConfig
- type FlatRunConfig
- type FlatShutdownConfig
- type FlatWaitIpConfig
- type HardwareConfig
- type LocationConfig
- type RunConfig
- type ShutdownConfig
- type StepConfigParams
- type StepConfigureHardware
- type StepConnect
- type StepConvertToTemplate
- type StepCreateSnapshot
- type StepRun
- type StepShutdown
- type StepWaitForIp
- type WaitIpConfig
Constants ¶
const BuilderId = "jetbrains.vsphere"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Artifact ¶
type Artifact struct {
Name string
VM *driver.VirtualMachine
// StateData should store data such as GeneratedData
// to be shared with post-processors
StateData map[string]interface{}
}
type ConfigParamsConfig ¶
type ConfigParamsConfig struct {
// Custom parameters.
ConfigParams map[string]string `mapstructure:"configuration_parameters"`
}
func (*ConfigParamsConfig) FlatMapstructure ¶
func (*ConfigParamsConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatConfigParamsConfig. FlatConfigParamsConfig is an auto-generated flat version of ConfigParamsConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type ConnectConfig ¶
type ConnectConfig struct {
// vCenter server hostname.
VCenterServer string `mapstructure:"vcenter_server"`
// vSphere username.
Username string `mapstructure:"username"`
// vSphere password.
Password string `mapstructure:"password"`
// Do not validate vCenter server's TLS certificate. Defaults to `false`.
InsecureConnection bool `mapstructure:"insecure_connection"`
// VMware datacenter name. Required if there is more than one datacenter in vCenter.
Datacenter string `mapstructure:"datacenter"`
}
func (*ConnectConfig) FlatMapstructure ¶
func (*ConnectConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatConnectConfig. FlatConnectConfig is an auto-generated flat version of ConnectConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*ConnectConfig) Prepare ¶
func (c *ConnectConfig) Prepare() []error
type FlatConfigParamsConfig ¶
type FlatConfigParamsConfig struct {
ConfigParams map[string]string `mapstructure:"configuration_parameters" cty:"configuration_parameters"`
}
FlatConfigParamsConfig is an auto-generated flat version of ConfigParamsConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatConfigParamsConfig) HCL2Spec ¶
func (*FlatConfigParamsConfig) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a ConfigParamsConfig. This spec is used by HCL to read the fields of ConfigParamsConfig. The decoded values from this spec will then be applied to a FlatConfigParamsConfig.
type FlatConnectConfig ¶
type FlatConnectConfig struct {
VCenterServer *string `mapstructure:"vcenter_server" cty:"vcenter_server"`
Username *string `mapstructure:"username" cty:"username"`
Password *string `mapstructure:"password" cty:"password"`
InsecureConnection *bool `mapstructure:"insecure_connection" cty:"insecure_connection"`
Datacenter *string `mapstructure:"datacenter" cty:"datacenter"`
}
FlatConnectConfig is an auto-generated flat version of ConnectConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatHardwareConfig ¶
type FlatHardwareConfig struct {
CPUs *int32 `mapstructure:"CPUs" cty:"CPUs"`
CpuCores *int32 `mapstructure:"cpu_cores" cty:"cpu_cores"`
CPUReservation *int64 `mapstructure:"CPU_reservation" cty:"CPU_reservation"`
CPULimit *int64 `mapstructure:"CPU_limit" cty:"CPU_limit"`
CpuHotAddEnabled *bool `mapstructure:"CPU_hot_plug" cty:"CPU_hot_plug"`
RAM *int64 `mapstructure:"RAM" cty:"RAM"`
RAMReservation *int64 `mapstructure:"RAM_reservation" cty:"RAM_reservation"`
RAMReserveAll *bool `mapstructure:"RAM_reserve_all" cty:"RAM_reserve_all"`
MemoryHotAddEnabled *bool `mapstructure:"RAM_hot_plug" cty:"RAM_hot_plug"`
VideoRAM *int64 `mapstructure:"video_ram" cty:"video_ram"`
NestedHV *bool `mapstructure:"NestedHV" cty:"NestedHV"`
}
FlatHardwareConfig is an auto-generated flat version of HardwareConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatLocationConfig ¶
type FlatLocationConfig struct {
VMName *string `mapstructure:"vm_name" cty:"vm_name"`
Folder *string `mapstructure:"folder" cty:"folder"`
Cluster *string `mapstructure:"cluster" cty:"cluster"`
Host *string `mapstructure:"host" cty:"host"`
ResourcePool *string `mapstructure:"resource_pool" cty:"resource_pool"`
Datastore *string `mapstructure:"datastore" cty:"datastore"`
}
FlatLocationConfig is an auto-generated flat version of LocationConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatRunConfig ¶
type FlatRunConfig struct {
BootOrder *string `mapstructure:"boot_order" cty:"boot_order"`
}
FlatRunConfig is an auto-generated flat version of RunConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatShutdownConfig ¶
type FlatShutdownConfig struct {
Command *string `mapstructure:"shutdown_command" cty:"shutdown_command"`
Timeout *string `mapstructure:"shutdown_timeout" cty:"shutdown_timeout"`
}
FlatShutdownConfig is an auto-generated flat version of ShutdownConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatWaitIpConfig ¶
type FlatWaitIpConfig struct {
WaitTimeout *string `mapstructure:"ip_wait_timeout" cty:"ip_wait_timeout"`
SettleTimeout *string `mapstructure:"ip_settle_timeout" cty:"ip_settle_timeout"`
}
FlatWaitIpConfig is an auto-generated flat version of WaitIpConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type HardwareConfig ¶
type HardwareConfig struct {
// Number of CPU sockets.
CPUs int32 `mapstructure:"CPUs"`
// Number of CPU cores per socket.
CpuCores int32 `mapstructure:"cpu_cores"`
// Amount of reserved CPU resources in MHz.
CPUReservation int64 `mapstructure:"CPU_reservation"`
// Upper limit of available CPU resources in MHz.
CPULimit int64 `mapstructure:"CPU_limit"`
// Enable CPU hot plug setting for virtual machine. Defaults to `false`.
CpuHotAddEnabled bool `mapstructure:"CPU_hot_plug"`
// Amount of RAM in MB.
RAM int64 `mapstructure:"RAM"`
// Amount of reserved RAM in MB.
RAMReservation int64 `mapstructure:"RAM_reservation"`
// Reserve all available RAM. Defaults to `false`. Cannot be used together
// with `RAM_reservation`.
RAMReserveAll bool `mapstructure:"RAM_reserve_all"`
// Enable RAM hot plug setting for virtual machine. Defaults to `false`.
MemoryHotAddEnabled bool `mapstructure:"RAM_hot_plug"`
// Amount of video memory in MB.
VideoRAM int64 `mapstructure:"video_ram"`
// Enable nested hardware virtualization for VM. Defaults to `false`.
NestedHV bool `mapstructure:"NestedHV"`
}
func (*HardwareConfig) FlatMapstructure ¶
func (*HardwareConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatHardwareConfig. FlatHardwareConfig is an auto-generated flat version of HardwareConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*HardwareConfig) Prepare ¶
func (c *HardwareConfig) Prepare() []error
type LocationConfig ¶
type LocationConfig struct {
// Name of the new VM to create.
VMName string `mapstructure:"vm_name"`
// VM folder to create the VM in.
Folder string `mapstructure:"folder"`
// ESXi cluster where target VM is created. See
// [Working with Clusters](#working-with-clusters).
Cluster string `mapstructure:"cluster"`
// ESXi host where target VM is created. A full path must be specified if
// the host is in a folder. For example `folder/host`. See the
// `Specifying Clusters and Hosts` section above for more details.
Host string `mapstructure:"host"`
// VMWare resource pool. Defaults to the root resource pool of the
// `host` or `cluster`.
ResourcePool string `mapstructure:"resource_pool"`
// VMWare datastore. Required if `host` is a cluster, or if `host` has
// multiple datastores.
Datastore string `mapstructure:"datastore"`
}
func (*LocationConfig) FlatMapstructure ¶
func (*LocationConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatLocationConfig. FlatLocationConfig is an auto-generated flat version of LocationConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*LocationConfig) Prepare ¶
func (c *LocationConfig) Prepare() []error
type RunConfig ¶
type RunConfig struct {
// Priority of boot devices. Defaults to `disk,cdrom`
BootOrder string `mapstructure:"boot_order"` // example: "floppy,cdrom,ethernet,disk"
}
func (*RunConfig) FlatMapstructure ¶
FlatMapstructure returns a new FlatRunConfig. FlatRunConfig is an auto-generated flat version of RunConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type ShutdownConfig ¶
type ShutdownConfig struct {
// Specify a VM guest shutdown command. VMware guest tools are used by
// default.
Command string `mapstructure:"shutdown_command"`
// Amount of time to wait for graceful VM shutdown. Examples 45s and 10m.
// Defaults to 5m(5 minutes).
Timeout time.Duration `mapstructure:"shutdown_timeout"`
}
func (*ShutdownConfig) FlatMapstructure ¶
func (*ShutdownConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatShutdownConfig. FlatShutdownConfig is an auto-generated flat version of ShutdownConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*ShutdownConfig) Prepare ¶
func (c *ShutdownConfig) Prepare() []error
type StepConfigParams ¶
type StepConfigParams struct {
Config *ConfigParamsConfig
}
func (*StepConfigParams) Cleanup ¶
func (s *StepConfigParams) Cleanup(state multistep.StateBag)
func (*StepConfigParams) Run ¶
func (s *StepConfigParams) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepConfigureHardware ¶
type StepConfigureHardware struct {
Config *HardwareConfig
}
func (*StepConfigureHardware) Cleanup ¶
func (s *StepConfigureHardware) Cleanup(multistep.StateBag)
func (*StepConfigureHardware) Run ¶
func (s *StepConfigureHardware) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepConnect ¶
type StepConnect struct {
Config *ConnectConfig
}
func (*StepConnect) Cleanup ¶
func (s *StepConnect) Cleanup(multistep.StateBag)
func (*StepConnect) Run ¶
func (s *StepConnect) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepConvertToTemplate ¶
type StepConvertToTemplate struct {
ConvertToTemplate bool
}
func (*StepConvertToTemplate) Cleanup ¶
func (s *StepConvertToTemplate) Cleanup(state multistep.StateBag)
func (*StepConvertToTemplate) Run ¶
func (s *StepConvertToTemplate) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepCreateSnapshot ¶
type StepCreateSnapshot struct {
CreateSnapshot bool
}
func (*StepCreateSnapshot) Cleanup ¶
func (s *StepCreateSnapshot) Cleanup(state multistep.StateBag)
func (*StepCreateSnapshot) Run ¶
func (s *StepCreateSnapshot) Run(_ context.Context, state multistep.StateBag) multistep.StepAction
type StepShutdown ¶
type StepShutdown struct {
Config *ShutdownConfig
}
func (*StepShutdown) Cleanup ¶
func (s *StepShutdown) Cleanup(state multistep.StateBag)
func (*StepShutdown) Run ¶
func (s *StepShutdown) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepWaitForIp ¶
type StepWaitForIp struct {
Config *WaitIpConfig
}
func (*StepWaitForIp) Cleanup ¶
func (s *StepWaitForIp) Cleanup(state multistep.StateBag)
func (*StepWaitForIp) Run ¶
func (s *StepWaitForIp) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type WaitIpConfig ¶
type WaitIpConfig struct {
// Amount of time to wait for VM's IP, similar to 'ssh_timeout'.
// Defaults to 30m (30 minutes). See the Goang
// [ParseDuration](https://golang.org/pkg/time/#ParseDuration) documentation
// for full details.
WaitTimeout time.Duration `mapstructure:"ip_wait_timeout"`
// Amount of time to wait for VM's IP to settle down, sometimes VM may
// report incorrect IP initially, then its recommended to set that
// parameter to apx. 2 minutes. Examples 45s and 10m. Defaults to
// 5s(5 seconds). See the Golang
// [ParseDuration](https://golang.org/pkg/time/#ParseDuration) documentation
// for full details.
SettleTimeout time.Duration `mapstructure:"ip_settle_timeout"`
}
func (*WaitIpConfig) FlatMapstructure ¶
func (*WaitIpConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatWaitIpConfig. FlatWaitIpConfig is an auto-generated flat version of WaitIpConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*WaitIpConfig) Prepare ¶
func (c *WaitIpConfig) Prepare() []error
Source Files
¶
- artifact.go
- config_location.go
- config_location.hcl2spec.go
- config_ssh.go
- step_config_params.go
- step_config_params.hcl2spec.go
- step_connect.go
- step_connect.hcl2spec.go
- step_hardware.go
- step_hardware.hcl2spec.go
- step_run.go
- step_run.hcl2spec.go
- step_shutdown.go
- step_shutdown.hcl2spec.go
- step_snapshot.go
- step_template.go
- step_wait_for_ip.go
- step_wait_for_ip.hcl2spec.go