Versions in this module Expand all Collapse all v1 v1.3.2 Oct 29, 2018 Changes in this version + const BuilderId + const StartupScriptKey + const StartupScriptStatusDone + const StartupScriptStatusError + const StartupScriptStatusKey + const StartupScriptStatusNotDone + const StartupWrappedScriptKey + var DriverScopes = []string + var StartupScriptLinux string = fmt.Sprintf(..., StartupWrappedScriptKey, StartupScriptStatusKey, StartupScriptStatusDone) + var StartupScriptWindows string = "" + var TemplateFuncs = template.FuncMap + func ProcessAccountFile(account_file *AccountFile, text string) error + type AccountFile struct + ClientEmail string + ClientId string + PrivateKey string + PrivateKeyId string + type Artifact struct + func (*Artifact) BuilderId() string + func (*Artifact) Files() []string + func (a *Artifact) Destroy() error + func (a *Artifact) Id() string + func (a *Artifact) State(name string) interface{} + func (a *Artifact) String() string + type Builder struct + func (b *Builder) Cancel() + func (b *Builder) Prepare(raws ...interface{}) ([]string, error) + func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packer.Artifact, error) + type Config struct + AcceleratorCount int64 + AcceleratorType string + Account AccountFile + AccountFile string + Address string + Comm communicator.Config + DisableDefaultServiceAccount bool + DiskName string + DiskSizeGb int64 + DiskType string + ImageDescription string + ImageFamily string + ImageLabels map[string]string + ImageLicenses []string + ImageName string + InstanceName string + Labels map[string]string + MachineType string + Metadata map[string]string + MinCpuPlatform string + Network string + NetworkProjectId string + OmitExternalIP bool + OnHostMaintenance string + Preemptible bool + ProjectId string + RawStateTimeout string + Region string + Scopes []string + ServiceAccountEmail string + SourceImage string + SourceImageFamily string + SourceImageProjectId string + StartupScriptFile string + Subnetwork string + Tags []string + UseInternalIP bool + Zone string + func NewConfig(raws ...interface{}) (*Config, []string, error) + func (c *Config) CalcTimeout() error + type Driver interface + CreateImage func(name, description, family, zone, disk string, image_labels map[string]string, ...) (<-chan *Image, <-chan error) + CreateOrResetWindowsPassword func(zone, name string, config *WindowsPasswordConfig) (<-chan error, error) + DeleteDisk func(zone, name string) (<-chan error, error) + DeleteImage func(name string) <-chan error + DeleteInstance func(zone, name string) (<-chan error, error) + GetImage func(name string, fromFamily bool) (*Image, error) + GetImageFromProject func(project, name string, fromFamily bool) (*Image, error) + GetInstanceMetadata func(zone, name, key string) (string, error) + GetInternalIP func(zone, name string) (string, error) + GetNatIP func(zone, name string) (string, error) + GetSerialPortOutput func(zone, name string) (string, error) + ImageExists func(name string) bool + RunInstance func(*InstanceConfig) (<-chan error, error) + WaitForInstance func(state, zone, name string) <-chan error + func NewDriverGCE(ui packer.Ui, p string, a *AccountFile) (Driver, error) + type DriverMock struct + CreateImageDesc string + CreateImageDisk string + CreateImageErrCh <-chan error + CreateImageFamily string + CreateImageLabels map[string]string + CreateImageLicenses []string + CreateImageName string + CreateImageResultCh <-chan *Image + CreateImageResultProjectId string + CreateImageResultSelfLink string + CreateImageResultSizeGb int64 + CreateImageZone string + CreateOrResetWindowsPasswordConfig *WindowsPasswordConfig + CreateOrResetWindowsPasswordErr error + CreateOrResetWindowsPasswordErrCh <-chan error + CreateOrResetWindowsPasswordInstance string + CreateOrResetWindowsPasswordZone string + DeleteDiskErr error + DeleteDiskErrCh <-chan error + DeleteDiskName string + DeleteDiskZone string + DeleteImageErrCh <-chan error + DeleteImageName string + DeleteInstanceErr error + DeleteInstanceErrCh <-chan error + DeleteInstanceName string + DeleteInstanceZone string + GetImageErr error + GetImageFromFamily bool + GetImageFromProjectErr error + GetImageFromProjectFromFamily bool + GetImageFromProjectName string + GetImageFromProjectProject string + GetImageFromProjectResult *Image + GetImageName string + GetImageResult *Image + GetInstanceMetadataErr error + GetInstanceMetadataKey string + GetInstanceMetadataName string + GetInstanceMetadataResult string + GetInstanceMetadataZone string + GetInternalIPErr error + GetInternalIPName string + GetInternalIPResult string + GetInternalIPZone string + GetNatIPErr error + GetNatIPName string + GetNatIPResult string + GetNatIPZone string + GetSerialPortOutputErr error + GetSerialPortOutputName string + GetSerialPortOutputResult string + GetSerialPortOutputZone string + ImageExistsName string + ImageExistsResult bool + RunInstanceConfig *InstanceConfig + RunInstanceErr error + RunInstanceErrCh <-chan error + WaitForInstanceErrCh <-chan error + WaitForInstanceName string + WaitForInstanceState string + WaitForInstanceZone string + func (d *DriverMock) CreateImage(name, description, family, zone, disk string, image_labels map[string]string, ...) (<-chan *Image, <-chan error) + func (d *DriverMock) CreateOrResetWindowsPassword(instance, zone string, c *WindowsPasswordConfig) (<-chan error, error) + func (d *DriverMock) DeleteDisk(zone, name string) (<-chan error, error) + func (d *DriverMock) DeleteImage(name string) <-chan error + func (d *DriverMock) DeleteInstance(zone, name string) (<-chan error, error) + func (d *DriverMock) GetImage(name string, fromFamily bool) (*Image, error) + func (d *DriverMock) GetImageFromProject(project, name string, fromFamily bool) (*Image, error) + func (d *DriverMock) GetInstanceMetadata(zone, name, key string) (string, error) + func (d *DriverMock) GetInternalIP(zone, name string) (string, error) + func (d *DriverMock) GetNatIP(zone, name string) (string, error) + func (d *DriverMock) GetSerialPortOutput(zone, name string) (string, error) + func (d *DriverMock) GetWindowsPassword() (string, error) + func (d *DriverMock) ImageExists(name string) bool + func (d *DriverMock) RunInstance(c *InstanceConfig) (<-chan error, error) + func (d *DriverMock) WaitForInstance(state, zone, name string) <-chan error + type Image struct + Labels map[string]string + Licenses []string + Name string + ProjectId string + SelfLink string + SizeGb int64 + func (i *Image) IsWindows() bool + type InstanceConfig struct + AcceleratorCount int64 + AcceleratorType string + Address string + Description string + DisableDefaultServiceAccount bool + DiskSizeGb int64 + DiskType string + Image *Image + Labels map[string]string + MachineType string + Metadata map[string]string + MinCpuPlatform string + Name string + Network string + NetworkProjectId string + OmitExternalIP bool + OnHostMaintenance string + Preemptible bool + Region string + Scopes []string + ServiceAccountEmail string + Subnetwork string + Tags []string + Zone string + type StepCheckExistingImage int + func (s *StepCheckExistingImage) Cleanup(state multistep.StateBag) + func (s *StepCheckExistingImage) Run(_ context.Context, state multistep.StateBag) multistep.StepAction + type StepCreateImage int + func (s *StepCreateImage) Cleanup(state multistep.StateBag) + func (s *StepCreateImage) Run(_ context.Context, state multistep.StateBag) multistep.StepAction + type StepCreateInstance struct + Debug bool + func (s *StepCreateInstance) Cleanup(state multistep.StateBag) + func (s *StepCreateInstance) Run(_ context.Context, state multistep.StateBag) multistep.StepAction + type StepCreateSSHKey struct + Debug bool + DebugKeyPath string + func (s *StepCreateSSHKey) Cleanup(state multistep.StateBag) + func (s *StepCreateSSHKey) Run(_ context.Context, state multistep.StateBag) multistep.StepAction + type StepCreateWindowsPassword struct + Debug bool + DebugKeyPath string + func (s *StepCreateWindowsPassword) Cleanup(state multistep.StateBag) + func (s *StepCreateWindowsPassword) Run(_ context.Context, state multistep.StateBag) multistep.StepAction + type StepInstanceInfo struct + Debug bool + func (s *StepInstanceInfo) Cleanup(state multistep.StateBag) + func (s *StepInstanceInfo) Run(_ context.Context, state multistep.StateBag) multistep.StepAction + type StepTeardownInstance struct + Debug bool + func (s *StepTeardownInstance) Cleanup(state multistep.StateBag) + func (s *StepTeardownInstance) Run(_ context.Context, state multistep.StateBag) multistep.StepAction + type StepWaitStartupScript int + func (s *StepWaitStartupScript) Cleanup(state multistep.StateBag) + func (s *StepWaitStartupScript) Run(_ context.Context, state multistep.StateBag) multistep.StepAction + type WindowsPasswordConfig struct + Email string + ExpireOn time.Time + Exponent string + Modulus string + UserName string