Documentation ¶
Overview ¶
Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
Code generated by "mapstructure-to-hcl2 -type MachineImageFilter"; DO NOT EDIT.
Index ¶
- Constants
- type AccessConfig
- type Artifact
- type Builder
- type Client
- type Config
- type Driver
- type DriverMock
- func (d *DriverMock) CreateImageFromMachine(machineId string, config Config) (string, error)
- func (d *DriverMock) CreateMachine(config Config) (string, error)
- func (d *DriverMock) DeleteImage(imageId string) error
- func (d *DriverMock) DeleteMachine(machineId string) error
- func (d *DriverMock) GetImage(config Config) (string, error)
- func (d *DriverMock) GetMachineIP(machineId string) (string, error)
- func (d *DriverMock) StopMachine(machineId string) error
- func (d *DriverMock) WaitForImageCreation(machineId string, timeout time.Duration) error
- func (d *DriverMock) WaitForMachineDeletion(machineId string, timeout time.Duration) error
- func (d *DriverMock) WaitForMachineState(machineId string, state string, timeout time.Duration) error
- type FlatConfig
- type FlatMachineImageFilter
- type MachineImageFilter
- type SourceMachineConfig
- type StepCreateImageFromMachine
- type StepCreateSourceMachine
- type StepDeleteMachine
- type StepStopMachine
- type StepWaitForStopNotToFail
- type TargetImageConfig
Constants ¶
const (
BuilderId = "joyent.triton"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessConfig ¶
type AccessConfig struct { // The URL of the Triton cloud API to use. If omitted // it will default to the us-sw-1 region of the Joyent Public cloud. If you // are using your own private Triton installation you will have to supply the // URL of the cloud API of your own Triton installation. Endpoint string `mapstructure:"triton_url" required:"false"` // The username of the Triton account to use when // using the Triton Cloud API. Account string `mapstructure:"triton_account" required:"true"` // The username of a user who has access to your // Triton account. Username string `mapstructure:"triton_user" required:"false"` // The fingerprint of the public key of the SSH key // pair to use for authentication with the Triton Cloud API. If // triton_key_material is not set, it is assumed that the SSH agent has the // private key corresponding to this key ID loaded. KeyID string `mapstructure:"triton_key_id" required:"true"` // Path to the file in which the private key // of triton_key_id is stored. For example /home/soandso/.ssh/id_rsa. If // this is not specified, the SSH agent is used to sign requests with the // triton_key_id specified. KeyMaterial string `mapstructure:"triton_key_material" required:"false"` //secure_skip_tls_verify - (bool) This allows skipping TLS verification // of the Triton endpoint. It is useful when connecting to a temporary Triton // installation such as Cloud-On-A-Laptop which does not generally use a // certificate signed by a trusted root CA. The default is false. InsecureSkipTLSVerify bool `mapstructure:"insecure_skip_tls_verify" required:"false"` // contains filtered or unexported fields }
AccessConfig is for common configuration related to Triton access
func (*AccessConfig) Comm ¶
func (c *AccessConfig) Comm() communicator.Config
func (*AccessConfig) CreateTritonClient ¶
func (c *AccessConfig) CreateTritonClient() (*Client, error)
func (*AccessConfig) Prepare ¶
func (c *AccessConfig) Prepare(ctx *interpolate.Context) []error
Prepare performs basic validation on the AccessConfig and ensures we can sign a request.
type Artifact ¶
type Artifact struct { // ImageID is the image ID of the artifact ImageID string // BuilderIDValue is the unique ID for the builder that created this Image BuilderIDValue string // SDC connection for cleanup etc Driver Driver // StateData should store data such as GeneratedData // to be shared with post-processors StateData map[string]interface{} }
Artifact is an artifact implementation that contains built Triton images.
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) ConfigSpec ¶
func (b *Builder) ConfigSpec() hcldec.ObjectSpec
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` AccessConfig `mapstructure:",squash"` SourceMachineConfig `mapstructure:",squash"` TargetImageConfig `mapstructure:",squash"` Comm communicator.Config `mapstructure:",squash"` // contains filtered or unexported fields }
type Driver ¶
type Driver interface { GetImage(config Config) (string, error) CreateImageFromMachine(machineId string, config Config) (string, error) CreateMachine(config Config) (string, error) DeleteImage(imageId string) error DeleteMachine(machineId string) error GetMachineIP(machineId string) (string, error) StopMachine(machineId string) error WaitForImageCreation(imageId string, timeout time.Duration) error WaitForMachineDeletion(machineId string, timeout time.Duration) error WaitForMachineState(machineId string, state string, timeout time.Duration) error }
type DriverMock ¶
type DriverMock struct { CreateImageFromMachineId string CreateImageFromMachineErr error CreateMachineId string CreateMachineErr error DeleteImageId string DeleteImageErr error DeleteMachineId string DeleteMachineErr error GetImageId string GetImageErr error GetMachineErr error StopMachineId string StopMachineErr error WaitForImageCreationErr error WaitForMachineDeletionErr error WaitForMachineStateErr error }
func (*DriverMock) CreateImageFromMachine ¶
func (d *DriverMock) CreateImageFromMachine(machineId string, config Config) (string, error)
func (*DriverMock) CreateMachine ¶
func (d *DriverMock) CreateMachine(config Config) (string, error)
func (*DriverMock) DeleteImage ¶
func (d *DriverMock) DeleteImage(imageId string) error
func (*DriverMock) DeleteMachine ¶
func (d *DriverMock) DeleteMachine(machineId string) error
func (*DriverMock) GetImage ¶ added in v1.1.2
func (d *DriverMock) GetImage(config Config) (string, error)
func (*DriverMock) GetMachineIP ¶ added in v1.0.1
func (d *DriverMock) GetMachineIP(machineId string) (string, error)
func (*DriverMock) StopMachine ¶
func (d *DriverMock) StopMachine(machineId string) error
func (*DriverMock) WaitForImageCreation ¶
func (d *DriverMock) WaitForImageCreation(machineId string, timeout time.Duration) error
func (*DriverMock) WaitForMachineDeletion ¶
func (d *DriverMock) WaitForMachineDeletion(machineId string, timeout time.Duration) error
func (*DriverMock) WaitForMachineState ¶
type FlatConfig ¶
type FlatConfig struct { PackerBuildName *string `mapstructure:"packer_build_name" cty:"packer_build_name" hcl:"packer_build_name"` PackerBuilderType *string `mapstructure:"packer_builder_type" cty:"packer_builder_type" hcl:"packer_builder_type"` PackerCoreVersion *string `mapstructure:"packer_core_version" cty:"packer_core_version" hcl:"packer_core_version"` PackerDebug *bool `mapstructure:"packer_debug" cty:"packer_debug" hcl:"packer_debug"` PackerForce *bool `mapstructure:"packer_force" cty:"packer_force" hcl:"packer_force"` PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error" hcl:"packer_on_error"` PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"` PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"` Endpoint *string `mapstructure:"triton_url" required:"false" cty:"triton_url" hcl:"triton_url"` Account *string `mapstructure:"triton_account" required:"true" cty:"triton_account" hcl:"triton_account"` Username *string `mapstructure:"triton_user" required:"false" cty:"triton_user" hcl:"triton_user"` KeyID *string `mapstructure:"triton_key_id" required:"true" cty:"triton_key_id" hcl:"triton_key_id"` KeyMaterial *string `mapstructure:"triton_key_material" required:"false" cty:"triton_key_material" hcl:"triton_key_material"` InsecureSkipTLSVerify *bool `mapstructure:"insecure_skip_tls_verify" required:"false" cty:"insecure_skip_tls_verify" hcl:"insecure_skip_tls_verify"` MachineName *string `mapstructure:"source_machine_name" required:"false" cty:"source_machine_name" hcl:"source_machine_name"` MachinePackage *string `mapstructure:"source_machine_package" required:"true" cty:"source_machine_package" hcl:"source_machine_package"` MachineImage *string `mapstructure:"source_machine_image" required:"true" cty:"source_machine_image" hcl:"source_machine_image"` MachineNetworks []string `mapstructure:"source_machine_networks" required:"false" cty:"source_machine_networks" hcl:"source_machine_networks"` MachineMetadata map[string]string `mapstructure:"source_machine_metadata" required:"false" cty:"source_machine_metadata" hcl:"source_machine_metadata"` MachineTags map[string]string `mapstructure:"source_machine_tags" required:"false" cty:"source_machine_tags" hcl:"source_machine_tags"` MachineTag []config.FlatKeyValue `mapstructure:"source_machine_tag" required:"false" cty:"source_machine_tag" hcl:"source_machine_tag"` MachineFirewallEnabled *bool `` /* 139-byte string literal not displayed */ MachineImageFilters *FlatMachineImageFilter `` /* 127-byte string literal not displayed */ ImageName *string `mapstructure:"image_name" required:"true" cty:"image_name" hcl:"image_name"` ImageVersion *string `mapstructure:"image_version" required:"true" cty:"image_version" hcl:"image_version"` ImageDescription *string `mapstructure:"image_description" required:"false" cty:"image_description" hcl:"image_description"` ImageHomepage *string `mapstructure:"image_homepage" required:"false" cty:"image_homepage" hcl:"image_homepage"` ImageEULA *string `mapstructure:"image_eula_url" required:"false" cty:"image_eula_url" hcl:"image_eula_url"` ImageACL []string `mapstructure:"image_acls" required:"false" cty:"image_acls" hcl:"image_acls"` ImageTags map[string]string `mapstructure:"image_tags" required:"false" cty:"image_tags" hcl:"image_tags"` ImageTag []config.FlatNameValue `mapstructure:"image_tag" required:"false" cty:"image_tag" hcl:"image_tag"` Type *string `mapstructure:"communicator" cty:"communicator" hcl:"communicator"` PauseBeforeConnect *string `mapstructure:"pause_before_connecting" cty:"pause_before_connecting" hcl:"pause_before_connecting"` SSHHost *string `mapstructure:"ssh_host" cty:"ssh_host" hcl:"ssh_host"` SSHPort *int `mapstructure:"ssh_port" cty:"ssh_port" hcl:"ssh_port"` SSHUsername *string `mapstructure:"ssh_username" cty:"ssh_username" hcl:"ssh_username"` SSHPassword *string `mapstructure:"ssh_password" cty:"ssh_password" hcl:"ssh_password"` SSHKeyPairName *string `mapstructure:"ssh_keypair_name" undocumented:"true" cty:"ssh_keypair_name" hcl:"ssh_keypair_name"` SSHTemporaryKeyPairName *string `mapstructure:"temporary_key_pair_name" undocumented:"true" cty:"temporary_key_pair_name" hcl:"temporary_key_pair_name"` SSHTemporaryKeyPairType *string `mapstructure:"temporary_key_pair_type" cty:"temporary_key_pair_type" hcl:"temporary_key_pair_type"` SSHTemporaryKeyPairBits *int `mapstructure:"temporary_key_pair_bits" cty:"temporary_key_pair_bits" hcl:"temporary_key_pair_bits"` SSHCiphers []string `mapstructure:"ssh_ciphers" cty:"ssh_ciphers" hcl:"ssh_ciphers"` SSHClearAuthorizedKeys *bool `mapstructure:"ssh_clear_authorized_keys" cty:"ssh_clear_authorized_keys" hcl:"ssh_clear_authorized_keys"` SSHKEXAlgos []string `mapstructure:"ssh_key_exchange_algorithms" cty:"ssh_key_exchange_algorithms" hcl:"ssh_key_exchange_algorithms"` SSHPrivateKeyFile *string `mapstructure:"ssh_private_key_file" undocumented:"true" cty:"ssh_private_key_file" hcl:"ssh_private_key_file"` SSHCertificateFile *string `mapstructure:"ssh_certificate_file" cty:"ssh_certificate_file" hcl:"ssh_certificate_file"` SSHPty *bool `mapstructure:"ssh_pty" cty:"ssh_pty" hcl:"ssh_pty"` SSHTimeout *string `mapstructure:"ssh_timeout" cty:"ssh_timeout" hcl:"ssh_timeout"` SSHWaitTimeout *string `mapstructure:"ssh_wait_timeout" undocumented:"true" cty:"ssh_wait_timeout" hcl:"ssh_wait_timeout"` SSHAgentAuth *bool `mapstructure:"ssh_agent_auth" undocumented:"true" cty:"ssh_agent_auth" hcl:"ssh_agent_auth"` SSHDisableAgentForwarding *bool `mapstructure:"ssh_disable_agent_forwarding" cty:"ssh_disable_agent_forwarding" hcl:"ssh_disable_agent_forwarding"` SSHHandshakeAttempts *int `mapstructure:"ssh_handshake_attempts" cty:"ssh_handshake_attempts" hcl:"ssh_handshake_attempts"` SSHBastionHost *string `mapstructure:"ssh_bastion_host" cty:"ssh_bastion_host" hcl:"ssh_bastion_host"` SSHBastionPort *int `mapstructure:"ssh_bastion_port" cty:"ssh_bastion_port" hcl:"ssh_bastion_port"` SSHBastionAgentAuth *bool `mapstructure:"ssh_bastion_agent_auth" cty:"ssh_bastion_agent_auth" hcl:"ssh_bastion_agent_auth"` SSHBastionUsername *string `mapstructure:"ssh_bastion_username" cty:"ssh_bastion_username" hcl:"ssh_bastion_username"` SSHBastionPassword *string `mapstructure:"ssh_bastion_password" cty:"ssh_bastion_password" hcl:"ssh_bastion_password"` SSHBastionInteractive *bool `mapstructure:"ssh_bastion_interactive" cty:"ssh_bastion_interactive" hcl:"ssh_bastion_interactive"` SSHBastionPrivateKeyFile *string `mapstructure:"ssh_bastion_private_key_file" cty:"ssh_bastion_private_key_file" hcl:"ssh_bastion_private_key_file"` SSHBastionCertificateFile *string `mapstructure:"ssh_bastion_certificate_file" cty:"ssh_bastion_certificate_file" hcl:"ssh_bastion_certificate_file"` SSHFileTransferMethod *string `mapstructure:"ssh_file_transfer_method" cty:"ssh_file_transfer_method" hcl:"ssh_file_transfer_method"` SSHProxyHost *string `mapstructure:"ssh_proxy_host" cty:"ssh_proxy_host" hcl:"ssh_proxy_host"` SSHProxyPort *int `mapstructure:"ssh_proxy_port" cty:"ssh_proxy_port" hcl:"ssh_proxy_port"` SSHProxyUsername *string `mapstructure:"ssh_proxy_username" cty:"ssh_proxy_username" hcl:"ssh_proxy_username"` SSHProxyPassword *string `mapstructure:"ssh_proxy_password" cty:"ssh_proxy_password" hcl:"ssh_proxy_password"` SSHKeepAliveInterval *string `mapstructure:"ssh_keep_alive_interval" cty:"ssh_keep_alive_interval" hcl:"ssh_keep_alive_interval"` SSHReadWriteTimeout *string `mapstructure:"ssh_read_write_timeout" cty:"ssh_read_write_timeout" hcl:"ssh_read_write_timeout"` SSHRemoteTunnels []string `mapstructure:"ssh_remote_tunnels" cty:"ssh_remote_tunnels" hcl:"ssh_remote_tunnels"` SSHLocalTunnels []string `mapstructure:"ssh_local_tunnels" cty:"ssh_local_tunnels" hcl:"ssh_local_tunnels"` SSHPublicKey []byte `mapstructure:"ssh_public_key" undocumented:"true" cty:"ssh_public_key" hcl:"ssh_public_key"` SSHPrivateKey []byte `mapstructure:"ssh_private_key" undocumented:"true" cty:"ssh_private_key" hcl:"ssh_private_key"` WinRMUser *string `mapstructure:"winrm_username" cty:"winrm_username" hcl:"winrm_username"` WinRMPassword *string `mapstructure:"winrm_password" cty:"winrm_password" hcl:"winrm_password"` WinRMHost *string `mapstructure:"winrm_host" cty:"winrm_host" hcl:"winrm_host"` WinRMNoProxy *bool `mapstructure:"winrm_no_proxy" cty:"winrm_no_proxy" hcl:"winrm_no_proxy"` WinRMPort *int `mapstructure:"winrm_port" cty:"winrm_port" hcl:"winrm_port"` WinRMTimeout *string `mapstructure:"winrm_timeout" cty:"winrm_timeout" hcl:"winrm_timeout"` WinRMUseSSL *bool `mapstructure:"winrm_use_ssl" cty:"winrm_use_ssl" hcl:"winrm_use_ssl"` WinRMInsecure *bool `mapstructure:"winrm_insecure" cty:"winrm_insecure" hcl:"winrm_insecure"` WinRMUseNTLM *bool `mapstructure:"winrm_use_ntlm" cty:"winrm_use_ntlm" hcl:"winrm_use_ntlm"` }
FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatMachineImageFilter ¶
type FlatMachineImageFilter struct { MostRecent *bool `mapstructure:"most_recent" cty:"most_recent" hcl:"most_recent"` Name *string `cty:"name" hcl:"name"` OS *string `cty:"os" hcl:"os"` Version *string `cty:"version" hcl:"version"` Public *bool `cty:"public" hcl:"public"` State *string `cty:"state" hcl:"state"` Owner *string `cty:"owner" hcl:"owner"` Type *string `cty:"type" hcl:"type"` }
FlatMachineImageFilter is an auto-generated flat version of MachineImageFilter. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatMachineImageFilter) HCL2Spec ¶
func (*FlatMachineImageFilter) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a MachineImageFilter. This spec is used by HCL to read the fields of MachineImageFilter. The decoded values from this spec will then be applied to a FlatMachineImageFilter.
type MachineImageFilter ¶ added in v1.1.2
type MachineImageFilter struct { MostRecent bool `mapstructure:"most_recent"` Name string OS string Version string Public bool State string Owner string Type string }
func (*MachineImageFilter) Empty ¶ added in v1.1.2
func (m *MachineImageFilter) Empty() bool
func (*MachineImageFilter) FlatMapstructure ¶
func (*MachineImageFilter) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatMachineImageFilter. FlatMachineImageFilter is an auto-generated flat version of MachineImageFilter. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type SourceMachineConfig ¶
type SourceMachineConfig struct { // Name of the VM used for building the // image. Does not affect (and does not have to be the same) as the name for a // VM instance running this image. Maximum 512 characters but should in // practice be much shorter (think between 5 and 20 characters). For example // mysql-64-server-image-builder. When omitted defaults to // packer-builder-[image_name]. MachineName string `mapstructure:"source_machine_name" required:"false"` // The Triton package to use while // building the image. Does not affect (and does not have to be the same) as // the package which will be used for a VM instance running this image. On the // Joyent public cloud this could for example be g3-standard-0.5-smartos. MachinePackage string `mapstructure:"source_machine_package" required:"true"` // The UUID of the image to base the new // image on. Triton supports multiple types of images, called 'brands' in // Triton / Joyent lingo, for contains and VM's. See the chapter Containers // and virtual machines in // the Joyent Triton documentation for detailed information. The following // brands are currently supported by this builder:joyent andkvm. The // choice of base image automatically decides the brand. On the Joyent public // cloud a valid source_machine_image could for example be // 70e3ae72-96b6-11e6-9056-9737fd4d0764 for version 16.3.1 of the 64bit // SmartOS base image (a 'joyent' brand image). source_machine_image_filter // can be used to populate this UUID. MachineImage string `mapstructure:"source_machine_image" required:"true"` // The UUID's of Triton // networks added to the source machine used for creating the image. For // example if any of the provisioners which are run need Internet access you // will need to add the UUID's of the appropriate networks here. If this is // not specified, instances will be placed into the default Triton public and // internal networks. MachineNetworks []string `mapstructure:"source_machine_networks" required:"false"` // Triton metadata // applied to the VM used to create the image. Metadata can be used to pass // configuration information to the VM without the need for networking. See // Using the metadata // API in the // Joyent documentation for more information. This can for example be used to // set the user-script metadata key to have Triton start a user supplied // script after the VM has booted. MachineMetadata map[string]string `mapstructure:"source_machine_metadata" required:"false"` // Key/value pair tags applied to the VM used to create the image. MachineTags map[string]string `mapstructure:"source_machine_tags" required:"false"` // Same as [`source_machine_tags`](#source_machine_tags) but defined as a // singular block containing a `key` and a `value` field. In HCL2 mode the // [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // will allow you to create those programatically. MachineTag config.KeyValues `mapstructure:"source_machine_tag" required:"false"` // Whether or not the firewall // of the VM used to create an image of is enabled. The Triton firewall only // filters inbound traffic to the VM. All outbound traffic is always allowed. // Currently this builder does not provide an interface to add specific // firewall rules. Unless you have a global rule defined in Triton which // allows SSH traffic enabling the firewall will interfere with the SSH // provisioner. The default is false. MachineFirewallEnabled bool `mapstructure:"source_machine_firewall_enabled" required:"false"` // Filters used to populate the // source_machine_image field. Example: MachineImageFilters MachineImageFilter `mapstructure:"source_machine_image_filter" required:"false"` }
SourceMachineConfig represents the configuration to run a machine using the SDC API in order for provisioning to take place.
func (*SourceMachineConfig) Prepare ¶
func (c *SourceMachineConfig) Prepare(ctx *interpolate.Context) []error
Prepare performs basic validation on a SourceMachineConfig struct.
type StepCreateImageFromMachine ¶
type StepCreateImageFromMachine struct{}
StepCreateImageFromMachine creates an image with the specified attributes from the machine with the given ID, and waits for the image to be created. The machine must be in the "stopped" state prior to this step being run.
func (*StepCreateImageFromMachine) Cleanup ¶
func (s *StepCreateImageFromMachine) Cleanup(state multistep.StateBag)
func (*StepCreateImageFromMachine) Run ¶
func (s *StepCreateImageFromMachine) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepCreateSourceMachine ¶
type StepCreateSourceMachine struct{}
StepCreateSourceMachine creates an machine with the specified attributes and waits for it to become available for provisioners.
func (*StepCreateSourceMachine) Cleanup ¶
func (s *StepCreateSourceMachine) Cleanup(state multistep.StateBag)
func (*StepCreateSourceMachine) Run ¶
func (s *StepCreateSourceMachine) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepDeleteMachine ¶
type StepDeleteMachine struct{}
StepDeleteMachine deletes the machine with the ID specified in state["machine"]
func (*StepDeleteMachine) Cleanup ¶
func (s *StepDeleteMachine) Cleanup(state multistep.StateBag)
func (*StepDeleteMachine) Run ¶
func (s *StepDeleteMachine) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepStopMachine ¶
type StepStopMachine struct{}
StepStopMachine stops the machine with the given Machine ID, and waits for it to reach the stopped state.
func (*StepStopMachine) Cleanup ¶
func (s *StepStopMachine) Cleanup(state multistep.StateBag)
func (*StepStopMachine) Run ¶
func (s *StepStopMachine) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepWaitForStopNotToFail ¶
type StepWaitForStopNotToFail struct{}
StepWaitForStopNotToFail waits for 10 seconds before returning with continue in order to prevent an observed issue where machines stopped immediately after they are started never actually stop.
func (*StepWaitForStopNotToFail) Cleanup ¶
func (s *StepWaitForStopNotToFail) Cleanup(state multistep.StateBag)
func (*StepWaitForStopNotToFail) Run ¶
func (s *StepWaitForStopNotToFail) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type TargetImageConfig ¶
type TargetImageConfig struct { // The name the finished image in Triton will be // assigned. Maximum 512 characters but should in practice be much shorter // (think between 5 and 20 characters). For example postgresql-95-server for // an image used as a PostgreSQL 9.5 server. ImageName string `mapstructure:"image_name" required:"true"` // The version string for this image. Maximum 128 // characters. Any string will do but a format of Major.Minor.Patch is // strongly advised by Joyent. See Semantic Versioning // for more information on the Major.Minor.Patch versioning format. ImageVersion string `mapstructure:"image_version" required:"true"` // Description of the image. Maximum 512 // characters. ImageDescription string `mapstructure:"image_description" required:"false"` // URL of the homepage where users can find // information about the image. Maximum 128 characters. ImageHomepage string `mapstructure:"image_homepage" required:"false"` // URL of the End User License Agreement (EULA) // for the image. Maximum 128 characters. ImageEULA string `mapstructure:"image_eula_url" required:"false"` // The UUID's of the users which will have // access to this image. When omitted only the owner (the Triton user whose // credentials are used) will have access to the image. ImageACL []string `mapstructure:"image_acls" required:"false"` // Name/Value tags applied to the image. ImageTags map[string]string `mapstructure:"image_tags" required:"false"` // Same as [`image_tags`](#image_tags) but defined as a singular repeatable // block containing a `name` and a `value` field. In HCL2 mode the // [`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks) // will allow you to create those programatically. ImageTag config.NameValues `mapstructure:"image_tag" required:"false"` }
TargetImageConfig represents the configuration for the image to be created from the source machine.
func (*TargetImageConfig) Prepare ¶
func (c *TargetImageConfig) Prepare(ctx *interpolate.Context) []error
Prepare performs basic validation on a TargetImageConfig struct.
Source Files ¶
- access_config.go
- artifact.go
- builder.go
- config.go
- config.hcl2spec.go
- driver.go
- driver_mock.go
- driver_triton.go
- source_machine_config.go
- source_machine_config.hcl2spec.go
- ssh.go
- step_create_image_from_machine.go
- step_create_source_machine.go
- step_delete_machine.go
- step_stop_machine.go
- step_wait_for_stop_to_not_fail.go
- target_image_config.go