Documentation
¶
Overview ¶
CODE GENERATED. DO NOT EDIT
Code generated by "mapstructure-to-hcl2 -type Config"; DO NOT EDIT.
Index ¶
Constants ¶
View Source
const BuilderId = "packer.post-processor.yandex-export"
Variables ¶
View Source
var (
CloudInitScript = `` /* 1845-byte string literal not displayed */
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
common.PackerConfig `mapstructure:",squash"`
yandex.AccessConfig `mapstructure:",squash"`
yandex.CommonConfig `mapstructure:",squash"`
ExchangeConfig `mapstructure:",squash"`
// List of paths to Yandex Object Storage where exported image will be uploaded.
// Please be aware that use of space char inside path not supported.
// Also this param support [build](/docs/templates/engine) template function.
// Check available template data for [Yandex](/docs/builders/yandex#build-template-data) builder.
// Paths to Yandex Object Storage where exported image will be uploaded.
Paths []string `mapstructure:"paths" required:"true"`
// Path to a PEM encoded private key file to use to authenticate with SSH.
// The `~` can be used in path and will be expanded to the home directory
// of current user. Login for attach: `ubuntu`
SSHPrivateKeyFile string `mapstructure:"ssh_private_key_file" required:"false"`
// Number of attempts to wait for export (must be greater than 0). Default: 1000
Tries int `mapstructure:"tries" required:"false"`
// contains filtered or unexported fields
}
type ExchangeConfig ¶ added in v1.6.6
type ExchangeConfig struct {
// Service Account ID with proper permission to modify an instance, create and attach disk and
// make upload to specific Yandex Object Storage paths.
ServiceAccountID string `mapstructure:"service_account_id" required:"true"`
}
func (*ExchangeConfig) Prepare ¶ added in v1.6.6
func (c *ExchangeConfig) Prepare(errs *packersdk.MultiError) *packersdk.MultiError
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"`
Endpoint *string `mapstructure:"endpoint" required:"false" cty:"endpoint" hcl:"endpoint"`
ServiceAccountKeyFile *string `mapstructure:"service_account_key_file" required:"false" cty:"service_account_key_file" hcl:"service_account_key_file"`
Token *string `mapstructure:"token" required:"true" cty:"token" hcl:"token"`
MaxRetries *int `mapstructure:"max_retries" cty:"max_retries" hcl:"max_retries"`
SerialLogFile *string `mapstructure:"serial_log_file" required:"false" cty:"serial_log_file" hcl:"serial_log_file"`
StateTimeout *string `mapstructure:"state_timeout" required:"false" cty:"state_timeout" hcl:"state_timeout"`
InstanceCores *int `mapstructure:"instance_cores" required:"false" cty:"instance_cores" hcl:"instance_cores"`
InstanceGpus *int `mapstructure:"instance_gpus" required:"false" cty:"instance_gpus" hcl:"instance_gpus"`
InstanceMemory *int `mapstructure:"instance_mem_gb" required:"false" cty:"instance_mem_gb" hcl:"instance_mem_gb"`
InstanceName *string `mapstructure:"instance_name" required:"false" cty:"instance_name" hcl:"instance_name"`
PlatformID *string `mapstructure:"platform_id" required:"false" cty:"platform_id" hcl:"platform_id"`
Labels map[string]string `mapstructure:"labels" required:"false" cty:"labels" hcl:"labels"`
Metadata map[string]string `mapstructure:"metadata" required:"false" cty:"metadata" hcl:"metadata"`
MetadataFromFile map[string]string `mapstructure:"metadata_from_file" cty:"metadata_from_file" hcl:"metadata_from_file"`
Preemptible *bool `mapstructure:"preemptible" cty:"preemptible" hcl:"preemptible"`
DiskName *string `mapstructure:"disk_name" required:"false" cty:"disk_name" hcl:"disk_name"`
DiskSizeGb *int `mapstructure:"disk_size_gb" required:"false" cty:"disk_size_gb" hcl:"disk_size_gb"`
DiskType *string `mapstructure:"disk_type" required:"false" cty:"disk_type" hcl:"disk_type"`
DiskLabels map[string]string `mapstructure:"disk_labels" required:"false" cty:"disk_labels" hcl:"disk_labels"`
SubnetID *string `mapstructure:"subnet_id" required:"false" cty:"subnet_id" hcl:"subnet_id"`
Zone *string `mapstructure:"zone" required:"false" cty:"zone" hcl:"zone"`
UseIPv4Nat *bool `mapstructure:"use_ipv4_nat" required:"false" cty:"use_ipv4_nat" hcl:"use_ipv4_nat"`
UseIPv6 *bool `mapstructure:"use_ipv6" required:"false" cty:"use_ipv6" hcl:"use_ipv6"`
UseInternalIP *bool `mapstructure:"use_internal_ip" required:"false" cty:"use_internal_ip" hcl:"use_internal_ip"`
FolderID *string `mapstructure:"folder_id" required:"true" cty:"folder_id" hcl:"folder_id"`
ServiceAccountID *string `mapstructure:"service_account_id" required:"true" cty:"service_account_id" hcl:"service_account_id"`
Paths []string `mapstructure:"paths" required:"true" cty:"paths" hcl:"paths"`
SSHPrivateKeyFile *string `mapstructure:"ssh_private_key_file" required:"false" cty:"ssh_private_key_file" hcl:"ssh_private_key_file"`
Tries *int `mapstructure:"tries" required:"false" cty:"tries" hcl:"tries"`
}
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 ...interface{}) error
type StepAttachDisk ¶ added in v1.6.6
type StepAttachDisk struct {
yandex.CommonConfig
ImageID string
}
func (*StepAttachDisk) Cleanup ¶ added in v1.6.6
func (s *StepAttachDisk) Cleanup(state multistep.StateBag)
func (*StepAttachDisk) Run ¶ added in v1.6.6
func (c *StepAttachDisk) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepCreateS3Keys ¶ added in v1.6.6
func (*StepCreateS3Keys) Cleanup ¶ added in v1.6.6
func (s *StepCreateS3Keys) Cleanup(state multistep.StateBag)
func (*StepCreateS3Keys) Run ¶ added in v1.6.6
func (c *StepCreateS3Keys) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
type StepUploadSecrets ¶ added in v1.6.6
type StepUploadSecrets struct{}
func (*StepUploadSecrets) Cleanup ¶ added in v1.6.6
func (s *StepUploadSecrets) Cleanup(state multistep.StateBag)
Cleanup.
func (*StepUploadSecrets) Run ¶ added in v1.6.6
func (s *StepUploadSecrets) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run reads the instance metadata and looks for the log entry indicating the cloud-init script finished.
type StepWaitCloudInitScript ¶ added in v1.6.6
type StepWaitCloudInitScript struct {
Tries int
}
func (*StepWaitCloudInitScript) Cleanup ¶ added in v1.6.6
func (s *StepWaitCloudInitScript) Cleanup(state multistep.StateBag)
Cleanup.
func (*StepWaitCloudInitScript) Run ¶ added in v1.6.6
func (s *StepWaitCloudInitScript) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction
Run reads the instance metadata and looks for the log entry indicating the cloud-init script finished.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.