Documentation
¶
Index ¶
- Constants
- func SSHConfig(username, password string) func(multistep.StateBag) (*ssh.ClientConfig, error)
- func SSHHost(tc *tcapi.Client, sshInterface string) func(multistep.StateBag) (string, error)
- func SleepSeconds() (seconds int)
- func TimeoutSeconds() (seconds int)
- func WaitForDoesNotExist(conf *StateChangeConf) (i interface{}, err error)
- func WaitForExists(conf *StateChangeConf) (i interface{}, err error)
- func WaitForState(conf *StateChangeConf) (i interface{}, err error)
- type Artifact
- type AuthConfig
- type Builder
- type Config
- type ImageConfig
- type RunConfig
- type StateChangeConf
- type StateRefreshFunc
- type StepCreateImage
- type StepDeregisterImage
- type StepImageRegionCopy
- type StepKeyPair
- type StepPreValidate
- type StepRunInstance
- type StepSourceImageInfo
- type StepStopInstance
- type TagFilterOptions
- type TagMap
Constants ¶
View Source
const BuilderID = "epicgames.tencloud"
Variables ¶
This section is empty.
Functions ¶
func SleepSeconds ¶
func SleepSeconds() (seconds int)
func TimeoutSeconds ¶
func TimeoutSeconds() (seconds int)
func WaitForDoesNotExist ¶
func WaitForDoesNotExist(conf *StateChangeConf) (i interface{}, err error)
func WaitForExists ¶
func WaitForExists(conf *StateChangeConf) (i interface{}, err error)
func WaitForState ¶
func WaitForState(conf *StateChangeConf) (i interface{}, err error)
Types ¶
type AuthConfig ¶
type AuthConfig struct {
KeyID string `mapstructure:"key_id"`
Key string `mapstructure:"key"`
Region string `mapstructure:"region"`
Project int `mapstructure:"project"`
// contains filtered or unexported fields
}
authentication configuration
func (*AuthConfig) Client ¶
func (c *AuthConfig) Client() (*tcapi.Client, error)
func (*AuthConfig) Prepare ¶
func (c *AuthConfig) Prepare(ctx *interpolate.Context) []error
type Config ¶
type Config struct {
common.PackerConfig `mapstructure:",squash"`
AuthConfig `mapstructure:",squash"`
ImageConfig `mapstructure:",squash"`
RunConfig `mapstructure:",squash"`
// contains filtered or unexported fields
}
type ImageConfig ¶
type ImageConfig struct {
ImageName string `mapstructure:"image_name"`
ImageDescription string `mapstructure:"image_description"`
ImageDescTags TagMap `mapstructure:"tags"`
ImageDescTagsDelim string `mapstructure:"tag_delimiter"`
ImageRegions []string `mapstructure:"image_regions"`
ForceDeregister bool `mapstructure:"force_deregister"`
CleanImageName bool `mapstructure:"clean_image_name"`
}
image configuration
func (*ImageConfig) Prepare ¶
func (c *ImageConfig) Prepare(ctx *interpolate.Context) []error
type RunConfig ¶
type RunConfig struct {
AvailabilityZone string `mapstructure:"availability_zone"`
SourceImageId string `mapstructure:"source_image_id"`
SourceImageFilter TagFilterOptions `mapstructure:"source_image_filters"`
InstanceType string `mapstructure:"instance_type"`
InstanceChargeType string `mapstructure:"instance_charge_type"`
SystemDiskType string `mapstructure:"system_disk_type"`
SystemDiskSize string `mapstructure:"system_disk_size"`
VpcId string `mapstructure:"vpc_id"`
SubnetId string `mapstructure:"subnet_id"`
InternetChargeType string `mapstructure:"internet_charge_type"`
InternetMaxBandwidthOut string `mapstructure:"internet_max_bandwidth_out"`
PublicIpAssigned bool `mapstructure:"public_ip_assigned"`
SecurityGroupIds []string `mapstructure:"security_group_ids"`
UserData string `mapstructure:"user_data"`
UserDataFile string `mapstructure:"user_data_file"`
TemporaryKeyPairName string `mapstructure:"temporary_key_pair_name"`
DisableStopInstance bool `mapstructure:"disable_stop_instance"`
SSHKeyPairName string `mapstructure:"ssh_keypair_name"`
SSHInterface string `mapstructure:"ssh_interface"`
Comm communicator.Config `mapstructure:",squash"`
}
instance run configuration
type StateChangeConf ¶
type StateChangeConf struct {
Pending []string
Refresh StateRefreshFunc
StepState multistep.StateBag
Target string
}
type StateRefreshFunc ¶
func ImageExistsRefreshFunc ¶
func ImageExistsRefreshFunc(tc *tcapi.Client, imageName string) StateRefreshFunc
func ImageStateRefreshFunc ¶
func ImageStateRefreshFunc(tc *tcapi.Client, imageId string) StateRefreshFunc
func InstanceStateRefreshFunc ¶
func InstanceStateRefreshFunc(tc *tcapi.Client, instanceId string) StateRefreshFunc
type StepCreateImage ¶
func (*StepCreateImage) Cleanup ¶
func (step *StepCreateImage) Cleanup(state multistep.StateBag)
func (*StepCreateImage) Run ¶
func (step *StepCreateImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepDeregisterImage ¶
func (*StepDeregisterImage) Cleanup ¶
func (step *StepDeregisterImage) Cleanup(_ multistep.StateBag)
func (*StepDeregisterImage) Run ¶
func (step *StepDeregisterImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepImageRegionCopy ¶
func (*StepImageRegionCopy) Cleanup ¶
func (step *StepImageRegionCopy) Cleanup(_ multistep.StateBag)
func (*StepImageRegionCopy) Run ¶
func (step *StepImageRegionCopy) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepKeyPair ¶
type StepKeyPair struct {
Debug bool
DebugKeyPath string
TemporaryKeyPairName string
KeyPairName string
PrivateKeyFile string
// contains filtered or unexported fields
}
func (*StepKeyPair) Cleanup ¶
func (step *StepKeyPair) Cleanup(state multistep.StateBag)
func (*StepKeyPair) Run ¶
func (step *StepKeyPair) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepPreValidate ¶
func (*StepPreValidate) Cleanup ¶
func (step *StepPreValidate) Cleanup(_ multistep.StateBag)
func (*StepPreValidate) Run ¶
func (step *StepPreValidate) Run(this context.Context, state multistep.StateBag) multistep.StepAction
type StepRunInstance ¶
type StepRunInstance struct {
AvailabilityZone string `mapstructure:"availability_zone"`
SourceImageId string `mapstructure:"source_image_id"`
SourceImageFilter TagFilterOptions `mapstructure:"source_image_filter"`
InstanceType string `mapstructure:"instance_type"`
InstanceChargeType string `mapstructure:"instance_charge_type"`
SystemDiskType string `mapstructure:"system_disk_type"`
SystemDiskSize string `mapstructure:"system_disk_size"`
VpcId string `mapstructure:"vpc_id"`
SubnetId string `mapstructure:"subnet_id"`
InternetChargeType string `mapstructure:"internet_charge_type"`
InternetMaxBandwidthOut string `mapstructure:"internet_max_bandwidth_out"`
PublicIpAssigned bool `mapstructure:"public_ip_assigned"`
SecurityGroupIds []string `mapstructure:"security_group_ids"`
UserData string `mapstructure:"user_data"`
UserDataFile string `mapstructure:"user_data_file"`
// contains filtered or unexported fields
}
func (*StepRunInstance) Cleanup ¶
func (step *StepRunInstance) Cleanup(state multistep.StateBag)
func (*StepRunInstance) Run ¶
func (step *StepRunInstance) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepSourceImageInfo ¶
type StepSourceImageInfo struct {
SourceImage string
SourceImageFilter TagFilterOptions
}
func (*StepSourceImageInfo) Cleanup ¶
func (step *StepSourceImageInfo) Cleanup(_ multistep.StateBag)
func (*StepSourceImageInfo) Run ¶
func (step *StepSourceImageInfo) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepStopInstance ¶
func (*StepStopInstance) Cleanup ¶
func (step *StepStopInstance) Cleanup(_ multistep.StateBag)
func (*StepStopInstance) Run ¶
func (step *StepStopInstance) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type TagFilterOptions ¶
type TagFilterOptions struct {
Filters map[string]string `mapstructure:"filters"`
TagFilters map[string]string `mapstructure:"tag_filters"`
TagFilterDelim string `mapstructure:"tag_filter_delimiter"`
MostRecent bool `mapstructure:"most_recent"`
}
TagFilterOptions holds all of the potential filters for describing a tc image
func (TagFilterOptions) Empty ¶
func (t TagFilterOptions) Empty() bool
Empty determines if the TagFilterOptions is set or not
func (TagFilterOptions) FindImage ¶
func (t TagFilterOptions) FindImage(client *tcapi.Client) (*tcapi.Image, error)
FindImage finds a source image id given the provided filters
func (TagFilterOptions) IsDelimSet ¶
func (t TagFilterOptions) IsDelimSet() bool
IsDelimSet checks if there is a delimeter set for tag filters or not
Click to show internal directories.
Click to hide internal directories.