yandexexport

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MPL-2.0 Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 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 (a *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"`
	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
}

func (*Config) FlatMapstructure

func (*Config) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

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.

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

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.

func (*FlatConfig) HCL2Spec

func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a Config. This spec is used by HCL to read the fields of Config. The decoded values from this spec will then be applied to a FlatConfig.

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

func (*PostProcessor) PostProcess

func (p *PostProcessor) PostProcess(ctx context.Context, ui packersdk.Ui, artifact packersdk.Artifact) (packersdk.Artifact, bool, bool, 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

type StepCreateS3Keys added in v1.6.6

type StepCreateS3Keys struct {
	ServiceAccountID string
	Paths            []string
}

func (*StepCreateS3Keys) Cleanup added in v1.6.6

func (s *StepCreateS3Keys) Cleanup(state multistep.StateBag)

func (*StepCreateS3Keys) Run added in v1.6.6

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

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

Run reads the instance metadata and looks for the log entry indicating the cloud-init script finished.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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