Documentation
¶
Index ¶
Constants ¶
View Source
const BuilderId = "packer.post-processor.mws-import"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSClient ¶
type AWSClient interface {
PresignGetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.PresignOptions)) (*v4.PresignedHTTPRequest, error)
}
type Artifact ¶
func NewArtifact ¶
func NewArtifact(driver Driver, image *computemodel.ImageOptionalResponse, generatedData any) *Artifact
type Config ¶
type Config struct {
common.PackerConfig `mapstructure:",squash"`
commonconfig.AccessConfig `mapstructure:",squash"`
commonconfig.ImageConfig `mapstructure:",squash"`
commonconfig.ObjectStorageConfig `mapstructure:",squash"`
// MWS Cloud Platform Object Storage path from where the image will be imported.
ObjectStoragePath string `mapstructure:"object_storage_path" required:"true"`
// Timeout for resources cleanup (defaults to "1h").
CleanupTimeout time.Duration `mapstructure:"cleanup_timeout" required:"false"`
// contains filtered or unexported fields
}
func (*Config) FlatMapstructure ¶
FlatMapstructure returns a new FlatConfig. FlatConfig is an auto-generated flat version of Config. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type Driver ¶
type Driver interface {
steps.StepCreateHMACKeyDriver
ImportImage(context.Context, drivermws.ImportImageParams) (*computemodel.ImageOptionalResponse, error)
DeleteImage(context.Context, string) error
}
type FlatConfig ¶
type FlatConfig struct {
PackerBuildName *string `mapstructure:"packer_build_name" cty:"packer_build_name" hcl:"packer_build_name"`
PackerBuilderType *string `mapstructure:"packer_builder_type" cty:"packer_builder_type" hcl:"packer_builder_type"`
PackerCoreVersion *string `mapstructure:"packer_core_version" cty:"packer_core_version" hcl:"packer_core_version"`
PackerDebug *bool `mapstructure:"packer_debug" cty:"packer_debug" hcl:"packer_debug"`
PackerForce *bool `mapstructure:"packer_force" cty:"packer_force" hcl:"packer_force"`
PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error" hcl:"packer_on_error"`
PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"`
PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"`
Project *string `mapstructure:"project" required:"true" cty:"project" hcl:"project"`
Zone *string `mapstructure:"zone" required:"false" cty:"zone" hcl:"zone"`
BaseEndpoint *string `mapstructure:"base_endpoint" required:"false" cty:"base_endpoint" hcl:"base_endpoint"`
ServiceAccountAuthorizedKeyPath *string `` /* 151-byte string literal not displayed */
Token *string `mapstructure:"token" required:"false" cty:"token" hcl:"token"`
ImageName *string `mapstructure:"image_name" required:"false" cty:"image_name" hcl:"image_name"`
ImageDisplayName *string `mapstructure:"image_display_name" required:"false" cty:"image_display_name" hcl:"image_display_name"`
ImageDescription *string `mapstructure:"image_description" required:"false" cty:"image_description" hcl:"image_description"`
ServiceAccount *string `mapstructure:"service_account" required:"false" cty:"service_account" hcl:"service_account"`
AccessKey *string `mapstructure:"access_key" required:"false" cty:"access_key" hcl:"access_key"`
SecretKey *string `mapstructure:"secret_key" required:"false" cty:"secret_key" hcl:"secret_key"`
ObjectStorageEndpoint *string `mapstructure:"object_storage_endpoint" required:"false" cty:"object_storage_endpoint" hcl:"object_storage_endpoint"`
ObjectStorageRegion *string `mapstructure:"object_storage_region" required:"false" cty:"object_storage_region" hcl:"object_storage_region"`
ObjectStoragePath *string `mapstructure:"object_storage_path" required:"true" cty:"object_storage_path" hcl:"object_storage_path"`
CleanupTimeout *string `mapstructure:"cleanup_timeout" required:"false" cty:"cleanup_timeout" hcl:"cleanup_timeout"`
}
FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type PostProcessor ¶
type PostProcessor struct {
// contains filtered or unexported fields
}
func (*PostProcessor) ConfigSpec ¶
func (p *PostProcessor) ConfigSpec() hcldec.ObjectSpec
func (*PostProcessor) Configure ¶
func (p *PostProcessor) Configure(raws ...any) error
type StepCreateAWSClient ¶
func (*StepCreateAWSClient) Cleanup ¶
func (*StepCreateAWSClient) Cleanup(multistep.StateBag)
func (*StepCreateAWSClient) Run ¶
func (s *StepCreateAWSClient) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepCreateSignedLink ¶
type StepCreateSignedLink struct {
Path string
}
func (*StepCreateSignedLink) Cleanup ¶
func (*StepCreateSignedLink) Cleanup(multistep.StateBag)
func (*StepCreateSignedLink) Run ¶
func (s *StepCreateSignedLink) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepImportImage ¶
type StepImportImage struct {
Project string
ImageName string
ImageDisplayName string
ImageDescription string
GeneratedData *packerbuilderdata.GeneratedData
}
func (*StepImportImage) Cleanup ¶
func (*StepImportImage) Cleanup(multistep.StateBag)
func (*StepImportImage) Run ¶
func (s *StepImportImage) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Source Files
¶
Click to show internal directories.
Click to hide internal directories.