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.
// Either this or `iteration_id` MUST be set.
// Mutually exclusive with `iteration_id`.
// If using several images from a single iteration, you may prefer
// sourcing an iteration first, and referencing it for subsequent uses,
// as every `hcp_packer_image` with the channel set will generate a
// potentially billable HCP Packer request, but if several
// `hcp_packer_image`s use a shared `hcp_packer_iteration` that will
// only generate one potentially billable request.
Channel string `mapstructure:"channel" required:"true"`
// The ID of the iteration to use when retrieving your image
// Either this or `channel` MUST be set.
// Mutually exclusive with `channel`
IterationID string `mapstructure:"iteration_id" required:"true"`
// The name of the cloud provider that your image is for. For example,
// "aws" or "gce".
CloudProvider string `mapstructure:"cloud_provider" required:"true"`
// The name of the cloud region your image is in. For example "us-east-1".
Region string `mapstructure:"region" required:"true"`
// The specific Packer builder used to create the image.
// For example, "amazon-ebs.example"
ComponentType string `mapstructure:"component_type" required:"false"`
}
type Datasource ¶
type Datasource struct {
// contains filtered or unexported fields
}
func (*Datasource) ConfigSpec ¶
func (d *Datasource) ConfigSpec() hcldec.ObjectSpec
func (*Datasource) Configure ¶
func (d *Datasource) Configure(raws ...interface{}) error
func (*Datasource) OutputSpec ¶
func (d *Datasource) OutputSpec() hcldec.ObjectSpec
type DatasourceOutput ¶
type DatasourceOutput struct {
// The name of the cloud provider that the image exists in. For example,
// "aws", "azure", or "gce".
CloudProvider string `mapstructure:"cloud_provider"`
// The specific Packer builder or post-processor used to create the image.
ComponentType string `mapstructure:"component_type"`
// The date and time at which the image was created.
CreatedAt string `mapstructure:"created_at"`
// The ID of the build that created the image. 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.
BuildID string `mapstructure:"build_id"`
// 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"`
// The ID of the channel used to query the image iteration. This value will be empty if the `iteration_id` was used
// directly instead of a channel.
ChannelID string `mapstructure:"channel_id"`
// The UUID associated with the Packer run that created this image.
PackerRunUUID string `mapstructure:"packer_run_uuid"`
// ID or URL of the remote cloud image as given by a build.
ID string `mapstructure:"id"`
// 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"`
// The key:value metadata labels associated with this build.
Labels map[string]string `mapstructure:"labels"`
}
DatasourceOutput Information from []*models.HashicorpCloudPackerImage with some information from the parent []*models.HashicorpCloudPackerBuild included where it seemed like it might be relevant. Need to copy so we can generate
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 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"`
IterationID *string `mapstructure:"iteration_id" required:"true" cty:"iteration_id" hcl:"iteration_id"`
CloudProvider *string `mapstructure:"cloud_provider" required:"true" cty:"cloud_provider" hcl:"cloud_provider"`
Region *string `mapstructure:"region" required:"true" cty:"region" hcl:"region"`
ComponentType *string `mapstructure:"component_type" required:"false" cty:"component_type" hcl:"component_type"`
}
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 {
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"`
BuildID *string `mapstructure:"build_id" cty:"build_id" hcl:"build_id"`
IterationID *string `mapstructure:"iteration_id" cty:"iteration_id" hcl:"iteration_id"`
ChannelID *string `mapstructure:"channel_id" cty:"channel_id" hcl:"channel_id"`
PackerRunUUID *string `mapstructure:"packer_run_uuid" cty:"packer_run_uuid" hcl:"packer_run_uuid"`
ID *string `mapstructure:"id" cty:"id" hcl:"id"`
Region *string `mapstructure:"region" cty:"region" hcl:"region"`
Labels map[string]string `mapstructure:"labels" cty:"labels" hcl:"labels"`
}
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.