Documentation ¶
Index ¶
- func InstanceStateRefreshFunc(conn *ec2.EC2, i *ec2.Instance) func() (interface{}, string, error)
- func SSHAddress(port int) func(map[string]interface{}) (string, error)
- func SSHConfig(username string) func(map[string]interface{}) (*gossh.ClientConfig, error)
- func WaitForAMI(c *ec2.EC2, imageId string) error
- func WaitForState(conf *StateChangeConf) (i interface{}, err error)
- type AccessConfig
- type Artifact
- type RunConfig
- type StateChangeConf
- type StepKeyPair
- type StepRunSourceInstance
- type StepSecurityGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstanceStateRefreshFunc ¶ added in v0.2.2
func SSHAddress ¶
SSHAddress returns a function that can be given to the SSH communicator for determining the SSH address based on the instance DNS name.
func SSHConfig ¶
func SSHConfig(username string) func(map[string]interface{}) (*gossh.ClientConfig, error)
SSHConfig returns a function that can be used for the SSH communicator config for connecting to the instance created over SSH using the generated private key.
func WaitForAMI ¶
WaitForAMI waits for the given AMI ID to become ready.
func WaitForState ¶
func WaitForState(conf *StateChangeConf) (i interface{}, err error)
Types ¶
type AccessConfig ¶
type AccessConfig struct { AccessKey string `mapstructure:"access_key"` SecretKey string `mapstructure:"secret_key"` RawRegion string `mapstructure:"region"` }
AccessConfig is for common configuration related to AWS access
func (*AccessConfig) Auth ¶
func (c *AccessConfig) Auth() (aws.Auth, error)
Auth returns a valid aws.Auth object for access to AWS services, or an error if the authentication couldn't be resolved.
func (*AccessConfig) Prepare ¶
func (c *AccessConfig) Prepare() []error
type Artifact ¶
type Artifact struct { // A map of regions to AMI IDs. Amis map[string]string // BuilderId is the unique ID for the builder that created this AMI BuilderIdValue string // EC2 connection for performing API stuff. Conn *ec2.EC2 }
Artifact is an artifact implementation that contains built AMIs.
type RunConfig ¶
type RunConfig struct { SourceAmi string `mapstructure:"source_ami"` IamInstanceProfile string `mapstructure:"iam_instance_profile"` InstanceType string `mapstructure:"instance_type"` RawSSHTimeout string `mapstructure:"ssh_timeout"` SSHUsername string `mapstructure:"ssh_username"` SSHPort int `mapstructure:"ssh_port"` SecurityGroupId string `mapstructure:"security_group_id"` SubnetId string `mapstructure:"subnet_id"` VpcId string `mapstructure:"vpc_id"` // contains filtered or unexported fields }
RunConfig contains configuration for running an instance from a source AMI and details on how to access that launched image.
func (*RunConfig) SSHTimeout ¶
type StateChangeConf ¶
type StepKeyPair ¶
type StepKeyPair struct {
// contains filtered or unexported fields
}
func (*StepKeyPair) Cleanup ¶
func (s *StepKeyPair) Cleanup(state map[string]interface{})
func (*StepKeyPair) Run ¶
func (s *StepKeyPair) Run(state map[string]interface{}) multistep.StepAction
type StepRunSourceInstance ¶
type StepRunSourceInstance struct { ExpectedRootDevice string InstanceType string SourceAMI string IamInstanceProfile string SubnetId string // contains filtered or unexported fields }
func (*StepRunSourceInstance) Cleanup ¶
func (s *StepRunSourceInstance) Cleanup(state map[string]interface{})
func (*StepRunSourceInstance) Run ¶
func (s *StepRunSourceInstance) Run(state map[string]interface{}) multistep.StepAction
type StepSecurityGroup ¶
type StepSecurityGroup struct { SecurityGroupId string SSHPort int VpcId string // contains filtered or unexported fields }
func (*StepSecurityGroup) Cleanup ¶
func (s *StepSecurityGroup) Cleanup(state map[string]interface{})
func (*StepSecurityGroup) Run ¶
func (s *StepSecurityGroup) Run(state map[string]interface{}) multistep.StepAction