Documentation
¶
Index ¶
Constants ¶
View Source
const (
BuilderID string = "packer.post-processor.upcloud-import"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The username to use when interfacing with the UpCloud API. Username string `mapstructure:"username" required:"true"` // The password to use when interfacing with the UpCloud API. Password string `mapstructure:"password" required:"true"` // The list of zones in which the template should be imported Zones []string `mapstructure:"zones" required:"true"` // The name of the template. Use `replace_existing` to replace existing template // with same name or suffix template name with e.g. timestamp to avoid errors during import TemplateName string `mapstructure:"template_name" required:"true"` // Replace existing template if one exists with the same name. Defaults to `false`. ReplaceExisting bool `mapstructure:"replace_existing"` // The amount of time to wait for resource state changes. Defaults to `60m`. Timeout time.Duration `mapstructure:"state_timeout_duration"` common.PackerConfig `mapstructure:",squash"` // contains filtered or unexported fields }
type FlatConfig ¶
type FlatConfig struct { Username *string `mapstructure:"username" required:"true" cty:"username" hcl:"username"` Password *string `mapstructure:"password" required:"true" cty:"password" hcl:"password"` Zones []string `mapstructure:"zones" required:"true" cty:"zones" hcl:"zones"` TemplateName *string `mapstructure:"template_name" required:"true" cty:"template_name" hcl:"template_name"` ReplaceExisting *bool `mapstructure:"replace_existing" cty:"replace_existing" hcl:"replace_existing"` Timeout *string `mapstructure:"state_timeout_duration" cty:"state_timeout_duration" hcl:"state_timeout_duration"` 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"` }
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
func (*PostProcessor) PostProcess ¶
func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, a packer.Artifact) (packer.Artifact, bool, bool, error)
PostProcess takes a previously created Artifact and produces another Artifact. If an error occurs, it should return that error. If `keep` is true, then the previous artifact defaults to being kept if user has not given a value to keep_input_artifact. If forceOverride is true, then any user input for keep_input_artifact is ignored and the artifact is either kept or discarded according to the value set in `keep`. PostProcess is cancellable using context
Click to show internal directories.
Click to hide internal directories.