googlecomputeimport

package
v1.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const BuilderId = "packer.post-processor.googlecompute-import"

Variables

This section is empty.

Functions

func CreateGceImage

func CreateGceImage(client *http.Client, ui packer.Ui, project string, rawImageURL string, imageName string, imageDescription string, imageFamily string, imageLabels map[string]string, imageGuestOsFeatures []string) (packer.Artifact, error)

func DeleteFromBucket

func DeleteFromBucket(client *http.Client, ui packer.Ui, bucket string, gcsObjectName string) error

func UploadToBucket

func UploadToBucket(client *http.Client, ui packer.Ui, artifact packer.Artifact, bucket string, gcsObjectName string) (string, error)

Types

type Artifact

type Artifact struct {
	// contains filtered or unexported fields
}

func (*Artifact) BuilderId

func (*Artifact) BuilderId() string

func (*Artifact) Destroy

func (a *Artifact) Destroy() error

func (*Artifact) Files

func (a *Artifact) Files() []string

func (*Artifact) Id

func (*Artifact) Id() string

func (*Artifact) State

func (*Artifact) State(name string) interface{}

func (*Artifact) String

func (a *Artifact) String() string

type Config

type Config struct {
	common.PackerConfig `mapstructure:",squash"`

	AccountFile string `mapstructure:"account_file"`
	ProjectId   string `mapstructure:"project_id"`

	Bucket               string            `mapstructure:"bucket"`
	GCSObjectName        string            `mapstructure:"gcs_object_name"`
	ImageDescription     string            `mapstructure:"image_description"`
	ImageFamily          string            `mapstructure:"image_family"`
	ImageGuestOsFeatures []string          `mapstructure:"image_guest_os_features"`
	ImageLabels          map[string]string `mapstructure:"image_labels"`
	ImageName            string            `mapstructure:"image_name"`
	SkipClean            bool              `mapstructure:"skip_clean"`
	VaultGCPOauthEngine  string            `mapstructure:"vault_gcp_oauth_engine"`

	Account *jwt.Config
	// contains filtered or unexported fields
}

type PostProcessor

type PostProcessor struct {
	// contains filtered or unexported fields
}

func (*PostProcessor) Configure

func (p *PostProcessor) Configure(raws ...interface{}) error

func (*PostProcessor) PostProcess

func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact packer.Artifact) (packer.Artifact, bool, bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL