fmt
This commit is contained in:
parent
a5546fa0f3
commit
b9b5de5684
|
@ -13,7 +13,7 @@ import (
|
||||||
type StepSecurityGroup struct {
|
type StepSecurityGroup struct {
|
||||||
SecurityGroupId string
|
SecurityGroupId string
|
||||||
SSHPort int
|
SSHPort int
|
||||||
VpcId string
|
VpcId string
|
||||||
|
|
||||||
createdGroupId string
|
createdGroupId string
|
||||||
}
|
}
|
||||||
|
@ -37,9 +37,9 @@ func (s *StepSecurityGroup) Run(state map[string]interface{}) multistep.StepActi
|
||||||
groupName := fmt.Sprintf("packer %s", hex.EncodeToString(identifier.NewUUID().Raw()))
|
groupName := fmt.Sprintf("packer %s", hex.EncodeToString(identifier.NewUUID().Raw()))
|
||||||
log.Printf("Temporary group name: %s", groupName)
|
log.Printf("Temporary group name: %s", groupName)
|
||||||
group := ec2.SecurityGroup{
|
group := ec2.SecurityGroup{
|
||||||
Name: groupName,
|
Name: groupName,
|
||||||
Description: "Temporary group for Packer",
|
Description: "Temporary group for Packer",
|
||||||
VpcId: s.VpcId,
|
VpcId: s.VpcId,
|
||||||
}
|
}
|
||||||
groupResp, err := ec2conn.CreateSecurityGroup(group)
|
groupResp, err := ec2conn.CreateSecurityGroup(group)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -92,12 +92,13 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
||||||
&awscommon.StepSecurityGroup{
|
&awscommon.StepSecurityGroup{
|
||||||
SecurityGroupId: b.config.SecurityGroupId,
|
SecurityGroupId: b.config.SecurityGroupId,
|
||||||
SSHPort: b.config.SSHPort,
|
SSHPort: b.config.SSHPort,
|
||||||
|
VpcId: b.config.VpcId,
|
||||||
},
|
},
|
||||||
&awscommon.StepRunSourceInstance{
|
&awscommon.StepRunSourceInstance{
|
||||||
ExpectedRootDevice: "ebs",
|
ExpectedRootDevice: "ebs",
|
||||||
InstanceType: b.config.InstanceType,
|
InstanceType: b.config.InstanceType,
|
||||||
SourceAMI: b.config.SourceAmi,
|
SourceAMI: b.config.SourceAmi,
|
||||||
SubnetId: b.config.SubnetId,
|
SubnetId: b.config.SubnetId,
|
||||||
},
|
},
|
||||||
&common.StepConnectSSH{
|
&common.StepConnectSSH{
|
||||||
SSHAddress: awscommon.SSHAddress(b.config.SSHPort),
|
SSHAddress: awscommon.SSHAddress(b.config.SSHPort),
|
||||||
|
|
|
@ -98,12 +98,13 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
|
||||||
&awscommon.StepSecurityGroup{
|
&awscommon.StepSecurityGroup{
|
||||||
SecurityGroupId: b.config.SecurityGroupId,
|
SecurityGroupId: b.config.SecurityGroupId,
|
||||||
SSHPort: b.config.SSHPort,
|
SSHPort: b.config.SSHPort,
|
||||||
|
VpcId: b.config.VpcId,
|
||||||
},
|
},
|
||||||
&awscommon.StepRunSourceInstance{
|
&awscommon.StepRunSourceInstance{
|
||||||
ExpectedRootDevice: "instance-store",
|
ExpectedRootDevice: "instance-store",
|
||||||
InstanceType: b.config.InstanceType,
|
InstanceType: b.config.InstanceType,
|
||||||
SourceAMI: b.config.SourceAmi,
|
SourceAMI: b.config.SourceAmi,
|
||||||
SubnetId: b.config.SubnetId,
|
SubnetId: b.config.SubnetId,
|
||||||
},
|
},
|
||||||
&common.StepConnectSSH{
|
&common.StepConnectSSH{
|
||||||
SSHAddress: awscommon.SSHAddress(b.config.SSHPort),
|
SSHAddress: awscommon.SSHAddress(b.config.SSHPort),
|
||||||
|
|
Loading…
Reference in New Issue