Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { common.PackerConfig `mapstructure:",squash"` // The name of the bucket your image is in. Bucket string `mapstructure:"bucket_name" required:"true"` // The name of the channel to use when retrieving your image Channel string `mapstructure:"channel" required:"true"` }
type DatasourceOutput ¶
type DatasourceOutput struct { // The iteration id. This is a ULID, which is a unique identifier similar // to a UUID. It is created by the HCP Packer Registry when an iteration is // first created, and is unique to this iteration. Id string `mapstructure:"Id"` // The version number assigned to an iteration. This number is an integer, // and is created by the HCP Packer Registry once an iteration is // marked "complete". If a new iteration is marked "complete", the version // that HCP Packer assigns to it will always be the highest previous // iteration version plus one. IncrementalVersion int32 `mapstructure:"incremental_version"` // The date the iteration was created. CreatedAt string `mapstructure:"created_at"` // A list of builds that are stored in the iteration. These builds can be // parsed using HCL to find individual image ids for specific providers. Builds []ParBuild `mapstructure:"builds"` }
func (*DatasourceOutput) FlatMapstructure ¶
func (*DatasourceOutput) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }
FlatMapstructure returns a new FlatDatasourceOutput. FlatDatasourceOutput is an auto-generated flat version of DatasourceOutput. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type DeactivatedDatasource ¶
type DeactivatedDatasource struct {
// contains filtered or unexported fields
}
Type for Packer datasource has been renamed temporarily to prevent it from being automatically registered as a viable datasource plugin in command/plugin.go. In the future this type will be renamed to allow for the use of the datasource.
func (*DeactivatedDatasource) ConfigSpec ¶
func (d *DeactivatedDatasource) ConfigSpec() hcldec.ObjectSpec
func (*DeactivatedDatasource) Configure ¶
func (d *DeactivatedDatasource) Configure(raws ...interface{}) error
func (*DeactivatedDatasource) Execute ¶
func (d *DeactivatedDatasource) Execute() (cty.Value, error)
func (*DeactivatedDatasource) OutputSpec ¶
func (d *DeactivatedDatasource) OutputSpec() hcldec.ObjectSpec
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"` Bucket *string `mapstructure:"bucket_name" required:"true" cty:"bucket_name" hcl:"bucket_name"` Channel *string `mapstructure:"channel" required:"true" cty:"channel" hcl:"channel"` }
FlatConfig is an auto-generated flat version of Config. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatDatasourceOutput ¶
type FlatDatasourceOutput struct { Id *string `mapstructure:"Id" cty:"Id" hcl:"Id"` IncrementalVersion *int32 `mapstructure:"incremental_version" cty:"incremental_version" hcl:"incremental_version"` CreatedAt *string `mapstructure:"created_at" cty:"created_at" hcl:"created_at"` Builds []FlatParBuild `mapstructure:"builds" cty:"builds" hcl:"builds"` }
FlatDatasourceOutput is an auto-generated flat version of DatasourceOutput. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
func (*FlatDatasourceOutput) HCL2Spec ¶
func (*FlatDatasourceOutput) HCL2Spec() map[string]hcldec.Spec
HCL2Spec returns the hcl spec of a DatasourceOutput. This spec is used by HCL to read the fields of DatasourceOutput. The decoded values from this spec will then be applied to a FlatDatasourceOutput.
type FlatParBuild ¶
type FlatParBuild struct { CloudProvider *string `mapstructure:"cloud_provider" cty:"cloud_provider" hcl:"cloud_provider"` ComponentType *string `mapstructure:"component_type" cty:"component_type" hcl:"component_type"` CreatedAt *string `mapstructure:"created_at" cty:"created_at" hcl:"created_at"` ID *string `mapstructure:"id" cty:"id" hcl:"id"` Images []FlatParImage `mapstructure:"images" cty:"images" hcl:"images"` IterationID *string `mapstructure:"iteration_id" cty:"iteration_id" hcl:"iteration_id"` Labels map[string]string `mapstructure:"labels" cty:"labels" hcl:"labels"` PackerRunUUID *string `mapstructure:"packer_run_uuid" cty:"packer_run_uuid" hcl:"packer_run_uuid"` Status *string `mapstructure:"status" cty:"status" hcl:"status"` UpdatedAt *string `mapstructure:"updated_at" cty:"updated_at" hcl:"updated_at"` }
FlatParBuild is an auto-generated flat version of ParBuild. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatParImage ¶
type FlatParImage struct { CreatedAt *string `mapstructure:"created_at,omitempty" cty:"created_at" hcl:"created_at"` ID *string `mapstructure:"id,omitempty" cty:"id" hcl:"id"` ImageID *string `mapstructure:"image_id,omitempty" cty:"image_id" hcl:"image_id"` Region *string `mapstructure:"region,omitempty" cty:"region" hcl:"region"` }
FlatParImage is an auto-generated flat version of ParImage. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type ParBuild ¶
type ParBuild struct { // The name of the cloud provider that the build exists in. For example, // "aws", "azure", or "gce". CloudProvider string `mapstructure:"cloud_provider"` // The specific Packer builder or post-processor used to create the build. ComponentType string `mapstructure:"component_type"` // The date and time at which the build was run. CreatedAt string `mapstructure:"created_at"` // The build id. This is a ULID, which is a unique identifier similar // to a UUID. It is created by the HCP Packer Registry when an build is // first created, and is unique to this build. ID string `mapstructure:"id"` // A list of images as stored in the HCP Packer registry. See the ParImage // docs for more information. Images []ParImage `mapstructure:"images"` // The iteration id. This is a ULID, which is a unique identifier similar // to a UUID. It is created by the HCP Packer Registry when an iteration is // first created, and is unique to this iteration. IterationID string `mapstructure:"iteration_id"` // Unstructured key:value metadata associated with the build. Labels map[string]string `mapstructure:"labels"` // The UUID associated with the Packer run that created this build. PackerRunUUID string `mapstructure:"packer_run_uuid"` // Whether the build is considered "complete" (the Packer build ran // successfully and created an artifact), or "incomplete" (the Packer // build did not finish, and there is no uploaded artifact). Status string `mapstructure:"status"` // The date and time at which the build was last updated. UpdatedAt string `mapstructure:"updated_at"` }
Copy of []*models.HashicorpCloudPackerBuild. Need to copy so we can generate the HCL spec.
func (*ParBuild) FlatMapstructure ¶
FlatMapstructure returns a new FlatParBuild. FlatParBuild is an auto-generated flat version of ParBuild. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
type ParImage ¶
type ParImage struct { // The date and time at which the build was last updated. CreatedAt string `mapstructure:"created_at,omitempty"` // The iteration id. This is a ULID, which is a unique identifier similar // to a UUID. It is created by the HCP Packer Registry when an iteration is // first created, and is unique to this iteration. ID string `mapstructure:"id,omitempty"` // ID or URL of the remote cloud image as given by a build. ImageID string `mapstructure:"image_id,omitempty"` // The cloud region as given by `packer build`. eg. "ap-east-1". // For locally managed clouds, this may map instead to a cluster, server // or datastore. Region string `mapstructure:"region,omitempty"` }
Copy of []*models.HashicorpCloudPackerImage Need to copy so we can generate the HCL spec.
func (*ParImage) FlatMapstructure ¶
FlatMapstructure returns a new FlatParImage. FlatParImage is an auto-generated flat version of ParImage. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.