alicloud: better docs + autogenerated post processor docs
This commit is contained in:
parent
e2a02636bc
commit
c2d3e494b6
@ -18,26 +18,26 @@ import (
|
||||
|
||||
// Config of alicloud
|
||||
type AlicloudAccessConfig struct {
|
||||
// This is the Alicloud access key. It must be provided when profile not exist, but it can also be
|
||||
// sourced from the ALICLOUD_ACCESS_KEY environment variable.
|
||||
AlicloudAccessKey string `mapstructure:"access_key" required:"false"`
|
||||
// This is the Alicloud secret key. It must be provided when profile not exist, but it can also be
|
||||
// sourced from the ALICLOUD_SECRET_KEY environment variable.
|
||||
AlicloudSecretKey string `mapstructure:"secret_key" required:"false"`
|
||||
// This is the Alicloud region. It must be provided when profile not exist, but it can also be
|
||||
// sourced from the ALICLOUD_REGION environment variables.
|
||||
AlicloudRegion string `mapstructure:"region" required:"false"`
|
||||
// Alicloud access key must be provided unless `profile` is set, but it can
|
||||
// also be sourced from the ```ALICLOUD_ACCESS_KEY``` environment variable.
|
||||
AlicloudAccessKey string `mapstructure:"access_key" required:"true"`
|
||||
// Alicloud secret key must be provided unless `profile` is set, but it can
|
||||
// also be sourced from the ```ALICLOUD_SECRET_KEY``` environment variable.
|
||||
AlicloudSecretKey string `mapstructure:"secret_key" required:"true"`
|
||||
// Alicloud region must be provided unless `profile` is set, but it can
|
||||
// also be sourced from the ```ALICLOUD_REGION``` environment variable.
|
||||
AlicloudRegion string `mapstructure:"region" required:"true"`
|
||||
// The region validation can be skipped if this value is true, the default
|
||||
// value is false.
|
||||
AlicloudSkipValidation bool `mapstructure:"skip_region_validation" required:"false"`
|
||||
// The image validation can be skipped if this value is true, the default
|
||||
// value is false.
|
||||
AlicloudSkipImageValidation bool `mapstructure:"skip_image_validation" required:"false"`
|
||||
// This is th Alicloud profile. If access_key not exist, is must be provided, but it can also be
|
||||
// sourced from the ALICLOUD_PROFILE environment variables.
|
||||
// Alicloud profile must be set unless `access_key` is set; it can also be
|
||||
// sourced from the ```ALICLOUD_PROFILE``` environment variable.
|
||||
AlicloudProfile string `mapstructure:"profile" required:"false"`
|
||||
// This is the Alicloud shared credentials file path. If this file path exist, os will read access key
|
||||
// and secret key from this file.
|
||||
// Alicloud shared credentials file path. If this file exists, access and
|
||||
// secret keys will be read from this file.
|
||||
AlicloudSharedCredentialsFile string `mapstructure:"shared_credentials_file" required:"false"`
|
||||
// STS access token, can be set through template or by exporting as
|
||||
// environment variable such as `export SECURITY_TOKEN=value`.
|
||||
|
@ -54,9 +54,9 @@ type FlatConfig struct {
|
||||
PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error"`
|
||||
PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables"`
|
||||
PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables"`
|
||||
AlicloudAccessKey *string `mapstructure:"access_key" required:"false" cty:"access_key"`
|
||||
AlicloudSecretKey *string `mapstructure:"secret_key" required:"false" cty:"secret_key"`
|
||||
AlicloudRegion *string `mapstructure:"region" required:"false" cty:"region"`
|
||||
AlicloudAccessKey *string `mapstructure:"access_key" required:"true" cty:"access_key"`
|
||||
AlicloudSecretKey *string `mapstructure:"secret_key" required:"true" cty:"secret_key"`
|
||||
AlicloudRegion *string `mapstructure:"region" required:"true" cty:"region"`
|
||||
AlicloudSkipValidation *bool `mapstructure:"skip_region_validation" required:"false" cty:"skip_region_validation"`
|
||||
AlicloudSkipImageValidation *bool `mapstructure:"skip_image_validation" required:"false" cty:"skip_image_validation"`
|
||||
AlicloudProfile *string `mapstructure:"profile" required:"false" cty:"profile"`
|
||||
|
@ -136,59 +136,58 @@ type AlicloudDiskDevices struct {
|
||||
}
|
||||
|
||||
type AlicloudImageConfig struct {
|
||||
// The name of the user-defined image, [2, 128]
|
||||
// English or Chinese characters. It must begin with an uppercase/lowercase
|
||||
// letter or a Chinese character, and may contain numbers, _ or -. It
|
||||
// cannot begin with `http://` or `https://`.
|
||||
// The name of the user-defined image, [2, 128] English or Chinese
|
||||
// characters. It must begin with an uppercase/lowercase letter or a
|
||||
// Chinese character, and may contain numbers, `_` or `-`. It cannot begin
|
||||
// with `http://` or `https://`.
|
||||
AlicloudImageName string `mapstructure:"image_name" required:"true"`
|
||||
// The version number of the image, with a length
|
||||
// limit of 1 to 40 English characters.
|
||||
// The version number of the image, with a length limit of 1 to 40 English
|
||||
// characters.
|
||||
AlicloudImageVersion string `mapstructure:"image_version" required:"false"`
|
||||
// The description of the image, with a length
|
||||
// limit of 0 to 256 characters. Leaving it blank means null, which is the
|
||||
// default value. It cannot begin with `http://` or `https://`.
|
||||
// The description of the image, with a length limit of 0 to 256
|
||||
// characters. Leaving it blank means null, which is the default value. It
|
||||
// cannot begin with `http://` or `https://`.
|
||||
AlicloudImageDescription string `mapstructure:"image_description" required:"false"`
|
||||
// The IDs of to-be-added Aliyun
|
||||
// accounts to which the image is shared. The number of accounts is 1 to 10.
|
||||
// If number of accounts is greater than 10, this parameter is ignored.
|
||||
// The IDs of to-be-added Aliyun accounts to which the image is shared. The
|
||||
// number of accounts is 1 to 10. If number of accounts is greater than 10,
|
||||
// this parameter is ignored.
|
||||
AlicloudImageShareAccounts []string `mapstructure:"image_share_account" required:"false"`
|
||||
AlicloudImageUNShareAccounts []string `mapstructure:"image_unshare_account"`
|
||||
// Copy to the destination regionIds.
|
||||
AlicloudImageDestinationRegions []string `mapstructure:"image_copy_regions" required:"false"`
|
||||
// The name of the destination image,
|
||||
// [2, 128] English or Chinese characters. It must begin with an
|
||||
// uppercase/lowercase letter or a Chinese character, and may contain numbers,
|
||||
// _ or -. It cannot begin with `http://` or `https://`.
|
||||
// The name of the destination image, [2, 128] English or Chinese
|
||||
// characters. It must begin with an uppercase/lowercase letter or a
|
||||
// Chinese character, and may contain numbers, _ or -. It cannot begin with
|
||||
// `http://` or `https://`.
|
||||
AlicloudImageDestinationNames []string `mapstructure:"image_copy_names" required:"false"`
|
||||
// Whether or not to encrypt the target images, including those copied if image_copy_regions is specified. If this option
|
||||
// is set to true, a temporary image will be created from the provisioned
|
||||
// instance in the main region and an encrypted copy will be generated in the
|
||||
// same region. By default, Packer will keep the encryption setting to what
|
||||
// it was in the source image.
|
||||
// Whether or not to encrypt the target images, including those
|
||||
// copied if image_copy_regions is specified. If this option is set to
|
||||
// true, a temporary image will be created from the provisioned instance in
|
||||
// the main region and an encrypted copy will be generated in the same
|
||||
// region. By default, Packer will keep the encryption setting to what it
|
||||
// was in the source image.
|
||||
ImageEncrypted config.Trilean `mapstructure:"image_encrypted" required:"false"`
|
||||
// If this value is true, when the target image names including those
|
||||
// copied are duplicated with existing images, it will delete the existing
|
||||
// images and then create the target images, otherwise, the creation will
|
||||
// fail. The default value is false. Check `image_name` and
|
||||
// `image_copy_names` options for names of target images. If
|
||||
// [-force](/docs/commands/build#force) option is
|
||||
// provided in `build` command, this option can be omitted and taken as
|
||||
// true.
|
||||
// [-force](/docs/commands/build#force) option is provided in `build`
|
||||
// command, this option can be omitted and taken as true.
|
||||
AlicloudImageForceDelete bool `mapstructure:"image_force_delete" required:"false"`
|
||||
// If this value is true, when delete the duplicated existing images, the
|
||||
// source snapshots of those images will be delete either. If
|
||||
// [-force](/docs/commands/build#force) option is
|
||||
// provided in `build` command, this option can be omitted and taken as
|
||||
// true.
|
||||
// [-force](/docs/commands/build#force) option is provided in `build`
|
||||
// command, this option can be omitted and taken as true.
|
||||
AlicloudImageForceDeleteSnapshots bool `mapstructure:"image_force_delete_snapshots" required:"false"`
|
||||
AlicloudImageForceDeleteInstances bool `mapstructure:"image_force_delete_instances"`
|
||||
// If this value is true, the image
|
||||
// created will not include any snapshot of data disks. This option would be
|
||||
// useful for any circumstance that default data disks with instance types are
|
||||
// not concerned. The default value is false.
|
||||
// If this value is true, the image created will not include any snapshot
|
||||
// of data disks. This option would be useful for any circumstance that
|
||||
// default data disks with instance types are not concerned. The default
|
||||
// value is false.
|
||||
AlicloudImageIgnoreDataDisks bool `mapstructure:"image_ignore_data_disks" required:"false"`
|
||||
// The region validation can be skipped
|
||||
// if this value is true, the default value is false.
|
||||
// The region validation can be skipped if this value is true, the default
|
||||
// value is false.
|
||||
AlicloudImageSkipRegionValidation bool `mapstructure:"skip_region_validation" required:"false"`
|
||||
// Key/value pair tags applied to the destination image and relevant
|
||||
// snapshots.
|
||||
|
@ -1,4 +1,5 @@
|
||||
//go:generate mapstructure-to-hcl2 -type Config
|
||||
//go:generate struct-markdown
|
||||
|
||||
package alicloudimport
|
||||
|
||||
@ -57,20 +58,48 @@ const (
|
||||
type Config struct {
|
||||
packerecs.Config `mapstructure:",squash"`
|
||||
|
||||
// Variables specific to this post processor
|
||||
OSSBucket string `mapstructure:"oss_bucket_name"`
|
||||
OSSKey string `mapstructure:"oss_key_name"`
|
||||
SkipClean bool `mapstructure:"skip_clean"`
|
||||
Tags map[string]string `mapstructure:"tags"`
|
||||
AlicloudImageDescription string `mapstructure:"image_description"`
|
||||
AlicloudImageShareAccounts []string `mapstructure:"image_share_account"`
|
||||
AlicloudImageDestinationRegions []string `mapstructure:"image_copy_regions"`
|
||||
OSType string `mapstructure:"image_os_type"`
|
||||
Platform string `mapstructure:"image_platform"`
|
||||
Architecture string `mapstructure:"image_architecture"`
|
||||
Size string `mapstructure:"image_system_size"`
|
||||
Format string `mapstructure:"format"`
|
||||
AlicloudImageForceDelete bool `mapstructure:"image_force_delete"`
|
||||
// The name of the OSS bucket where the RAW or VHD file will be copied to
|
||||
// for import. If the Bucket isn't exist, post-process will create it for
|
||||
// you.
|
||||
OSSBucket string `mapstructure:"oss_bucket_name" required:"true"`
|
||||
// The name of the object key in `oss_bucket_name` where the RAW or VHD
|
||||
// file will be copied to for import. This is treated as a [template
|
||||
// engine](/docs/templates/engine), and you may access any of the variables
|
||||
// stored in the generated data using the [build](/docs/templates/engine)
|
||||
// template function.
|
||||
OSSKey string `mapstructure:"oss_key_name"`
|
||||
// Whether we should skip removing the RAW or VHD file uploaded to OSS
|
||||
// after the import process has completed. `true` means that we should
|
||||
// leave it in the OSS bucket, `false` means to clean it out. Defaults to
|
||||
// `false`.
|
||||
SkipClean bool `mapstructure:"skip_clean"`
|
||||
Tags map[string]string `mapstructure:"tags"`
|
||||
// The description of the image, with a length limit of `0` to `256`
|
||||
// characters. Leaving it blank means null, which is the default value. It
|
||||
// cannot begin with `http://` or `https://`.
|
||||
AlicloudImageDescription string `mapstructure:"image_description"`
|
||||
AlicloudImageShareAccounts []string `mapstructure:"image_share_account"`
|
||||
AlicloudImageDestinationRegions []string `mapstructure:"image_copy_regions"`
|
||||
// Type of the OS, like linux/windows
|
||||
OSType string `mapstructure:"image_os_type" required:"true"`
|
||||
// Platform such as `CentOS`
|
||||
Platform string `mapstructure:"image_platform" required:"true"`
|
||||
// Platform type of the image system: `i386` or `x86_64`
|
||||
Architecture string `mapstructure:"image_architecture" required:"true"`
|
||||
// Size of the system disk, in GB, values
|
||||
// range:
|
||||
// - cloud - 5 \~ 2000
|
||||
// - cloud_efficiency - 20 \~ 2048
|
||||
// - cloud_ssd - 20 \~ 2048
|
||||
Size string `mapstructure:"image_system_size"`
|
||||
// The format of the image for import, now alicloud only support RAW and
|
||||
// VHD.
|
||||
Format string `mapstructure:"format" required:"true"`
|
||||
// If this value is true, when the target image name is duplicated with an
|
||||
// existing image, it will delete the existing image and then create the
|
||||
// target image, otherwise, the creation will fail. The default value is
|
||||
// false.
|
||||
AlicloudImageForceDelete bool `mapstructure:"image_force_delete"`
|
||||
|
||||
ctx interpolate.Context
|
||||
}
|
||||
|
@ -18,9 +18,9 @@ type FlatConfig struct {
|
||||
PackerOnError *string `mapstructure:"packer_on_error" cty:"packer_on_error"`
|
||||
PackerUserVars map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables"`
|
||||
PackerSensitiveVars []string `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables"`
|
||||
AlicloudAccessKey *string `mapstructure:"access_key" required:"false" cty:"access_key"`
|
||||
AlicloudSecretKey *string `mapstructure:"secret_key" required:"false" cty:"secret_key"`
|
||||
AlicloudRegion *string `mapstructure:"region" required:"false" cty:"region"`
|
||||
AlicloudAccessKey *string `mapstructure:"access_key" required:"true" cty:"access_key"`
|
||||
AlicloudSecretKey *string `mapstructure:"secret_key" required:"true" cty:"secret_key"`
|
||||
AlicloudRegion *string `mapstructure:"region" required:"true" cty:"region"`
|
||||
AlicloudSkipValidation *bool `mapstructure:"skip_region_validation" required:"false" cty:"skip_region_validation"`
|
||||
AlicloudSkipImageValidation *bool `mapstructure:"skip_image_validation" required:"false" cty:"skip_image_validation"`
|
||||
AlicloudProfile *string `mapstructure:"profile" required:"false" cty:"profile"`
|
||||
@ -106,14 +106,14 @@ type FlatConfig struct {
|
||||
WinRMInsecure *bool `mapstructure:"winrm_insecure" cty:"winrm_insecure"`
|
||||
WinRMUseNTLM *bool `mapstructure:"winrm_use_ntlm" cty:"winrm_use_ntlm"`
|
||||
SSHPrivateIp *bool `mapstructure:"ssh_private_ip" required:"false" cty:"ssh_private_ip"`
|
||||
OSSBucket *string `mapstructure:"oss_bucket_name" cty:"oss_bucket_name"`
|
||||
OSSBucket *string `mapstructure:"oss_bucket_name" required:"true" cty:"oss_bucket_name"`
|
||||
OSSKey *string `mapstructure:"oss_key_name" cty:"oss_key_name"`
|
||||
SkipClean *bool `mapstructure:"skip_clean" cty:"skip_clean"`
|
||||
OSType *string `mapstructure:"image_os_type" cty:"image_os_type"`
|
||||
Platform *string `mapstructure:"image_platform" cty:"image_platform"`
|
||||
Architecture *string `mapstructure:"image_architecture" cty:"image_architecture"`
|
||||
OSType *string `mapstructure:"image_os_type" required:"true" cty:"image_os_type"`
|
||||
Platform *string `mapstructure:"image_platform" required:"true" cty:"image_platform"`
|
||||
Architecture *string `mapstructure:"image_architecture" required:"true" cty:"image_architecture"`
|
||||
Size *string `mapstructure:"image_system_size" cty:"image_system_size"`
|
||||
Format *string `mapstructure:"format" cty:"format"`
|
||||
Format *string `mapstructure:"format" required:"true" cty:"format"`
|
||||
}
|
||||
|
||||
// FlatMapstructure returns a new FlatConfig.
|
||||
|
@ -23,6 +23,8 @@ builder.
|
||||
|
||||
### Required:
|
||||
|
||||
@include 'builder/alicloud/ecs/AlicloudAccessConfig-required.mdx'
|
||||
|
||||
@include 'builder/alicloud/ecs/RunConfig-required.mdx'
|
||||
|
||||
@include 'builder/alicloud/ecs/AlicloudImageConfig-required.mdx'
|
||||
|
@ -28,66 +28,18 @@ are two categories: required and optional parameters.
|
||||
|
||||
### Required:
|
||||
|
||||
- `access_key` (string) - This is the Alicloud access key. It must be
|
||||
provided, but it can also be sourced from the `ALICLOUD_ACCESS_KEY`
|
||||
environment variable.
|
||||
@include 'builder/alicloud/ecs/AlicloudAccessConfig-required.mdx'
|
||||
|
||||
- `secret_key` (string) - This is the Alicloud secret key. It must be
|
||||
provided, but it can also be sourced from the `ALICLOUD_SECRET_KEY`
|
||||
environment variable.
|
||||
@include 'builder/alicloud/ecs/AlicloudImageConfig-required.mdx'
|
||||
|
||||
- `region` (string) - This is the Alicloud region. It must be provided, but
|
||||
it can also be sourced from the `ALICLOUD_REGION` environment variables.
|
||||
|
||||
- `image_name` (string) - The name of the user-defined image, \[2, 128\]
|
||||
English or Chinese characters. It must begin with an uppercase/lowercase
|
||||
letter or a Chinese character, and may contain numbers, `_` or `-`. It
|
||||
cannot begin with `http://` or `https://`
|
||||
|
||||
- `oss_bucket_name` (string) - The name of the OSS bucket where the RAW or
|
||||
VHD file will be copied to for import. If the Bucket isn't exist,
|
||||
post-process will create it for you.
|
||||
|
||||
- `image_os_type` (string) - Type of the OS linux/windows
|
||||
|
||||
- `image_platform` (string) - platform such `CentOS`
|
||||
|
||||
- `image_architecture` (string) - Platform type of the image system: `i386` or
|
||||
`x86_64`
|
||||
|
||||
- `format` (string) - The format of the image for import, now alicloud only
|
||||
support RAW and VHD.
|
||||
@include 'post-processor/alicloud-import/Config-required.mdx'
|
||||
|
||||
### Optional:
|
||||
|
||||
- `keep_input_artifact` (boolean) - if true, do not delete the RAW or VHD
|
||||
disk image after importing it to the cloud. Defaults to false.
|
||||
|
||||
- `oss_key_name` (string) - The name of the object key in `oss_bucket_name`
|
||||
where the RAW or VHD file will be copied to for import. This is treated as
|
||||
a [template engine](/docs/templates/engine), and you may access any of
|
||||
the variables stored in the generated data using the
|
||||
[build](/docs/templates/engine) template function.
|
||||
|
||||
- `skip_clean` (boolean) - Whether we should skip removing the RAW or VHD
|
||||
file uploaded to OSS after the import process has completed. `true` means
|
||||
that we should leave it in the OSS bucket, `false` means to clean it out.
|
||||
Defaults to `false`.
|
||||
|
||||
- `image_description` (string) - The description of the image, with a length
|
||||
limit of 0 to 256 characters. Leaving it blank means null, which is the
|
||||
default value. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `image_force_delete` (boolean) - If this value is true, when the target
|
||||
image name is duplicated with an existing image, it will delete the
|
||||
existing image and then create the target image, otherwise, the creation
|
||||
will fail. The default value is false.
|
||||
|
||||
- `image_system_size` (number) - Size of the system disk, in GB, values
|
||||
range:
|
||||
- cloud - 5 \~ 2000
|
||||
- cloud_efficiency - 20 \~ 2048
|
||||
- cloud_ssd - 20 \~ 2048
|
||||
@include 'post-processor/alicloud-import/Config-not-required.mdx'
|
||||
|
||||
## Basic Example
|
||||
|
||||
|
@ -1,25 +1,16 @@
|
||||
<!-- Code generated from the comments of the AlicloudAccessConfig struct in builder/alicloud/ecs/access_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `access_key` (string) - This is the Alicloud access key. It must be provided when profile not exist, but it can also be
|
||||
sourced from the ALICLOUD_ACCESS_KEY environment variable.
|
||||
|
||||
- `secret_key` (string) - This is the Alicloud secret key. It must be provided when profile not exist, but it can also be
|
||||
sourced from the ALICLOUD_SECRET_KEY environment variable.
|
||||
|
||||
- `region` (string) - This is the Alicloud region. It must be provided when profile not exist, but it can also be
|
||||
sourced from the ALICLOUD_REGION environment variables.
|
||||
|
||||
- `skip_region_validation` (bool) - The region validation can be skipped if this value is true, the default
|
||||
value is false.
|
||||
|
||||
- `skip_image_validation` (bool) - The image validation can be skipped if this value is true, the default
|
||||
value is false.
|
||||
|
||||
- `profile` (string) - This is th Alicloud profile. If access_key not exist, is must be provided, but it can also be
|
||||
sourced from the ALICLOUD_PROFILE environment variables.
|
||||
- `profile` (string) - Alicloud profile must be set unless `access_key` is set; it can also be
|
||||
sourced from the ```ALICLOUD_PROFILE``` environment variable.
|
||||
|
||||
- `shared_credentials_file` (string) - This is the Alicloud shared credentials file path. If this file path exist, os will read access key
|
||||
and secret key from this file.
|
||||
- `shared_credentials_file` (string) - Alicloud shared credentials file path. If this file exists, access and
|
||||
secret keys will be read from this file.
|
||||
|
||||
- `security_token` (string) - STS access token, can be set through template or by exporting as
|
||||
environment variable such as `export SECURITY_TOKEN=value`.
|
||||
|
@ -0,0 +1,11 @@
|
||||
<!-- Code generated from the comments of the AlicloudAccessConfig struct in builder/alicloud/ecs/access_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `access_key` (string) - Alicloud access key must be provided unless `profile` is set, but it can
|
||||
also be sourced from the ```ALICLOUD_ACCESS_KEY``` environment variable.
|
||||
|
||||
- `secret_key` (string) - Alicloud secret key must be provided unless `profile` is set, but it can
|
||||
also be sourced from the ```ALICLOUD_SECRET_KEY``` environment variable.
|
||||
|
||||
- `region` (string) - Alicloud region must be provided unless `profile` is set, but it can
|
||||
also be sourced from the ```ALICLOUD_REGION``` environment variable.
|
||||
|
@ -1,53 +1,52 @@
|
||||
<!-- Code generated from the comments of the AlicloudImageConfig struct in builder/alicloud/ecs/image_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `image_version` (string) - The version number of the image, with a length
|
||||
limit of 1 to 40 English characters.
|
||||
- `image_version` (string) - The version number of the image, with a length limit of 1 to 40 English
|
||||
characters.
|
||||
|
||||
- `image_description` (string) - The description of the image, with a length
|
||||
limit of 0 to 256 characters. Leaving it blank means null, which is the
|
||||
default value. It cannot begin with `http://` or `https://`.
|
||||
- `image_description` (string) - The description of the image, with a length limit of 0 to 256
|
||||
characters. Leaving it blank means null, which is the default value. It
|
||||
cannot begin with `http://` or `https://`.
|
||||
|
||||
- `image_share_account` ([]string) - The IDs of to-be-added Aliyun
|
||||
accounts to which the image is shared. The number of accounts is 1 to 10.
|
||||
If number of accounts is greater than 10, this parameter is ignored.
|
||||
- `image_share_account` ([]string) - The IDs of to-be-added Aliyun accounts to which the image is shared. The
|
||||
number of accounts is 1 to 10. If number of accounts is greater than 10,
|
||||
this parameter is ignored.
|
||||
|
||||
- `image_unshare_account` ([]string) - Alicloud Image UN Share Accounts
|
||||
- `image_copy_regions` ([]string) - Copy to the destination regionIds.
|
||||
|
||||
- `image_copy_names` ([]string) - The name of the destination image,
|
||||
[2, 128] English or Chinese characters. It must begin with an
|
||||
uppercase/lowercase letter or a Chinese character, and may contain numbers,
|
||||
_ or -. It cannot begin with `http://` or `https://`.
|
||||
- `image_copy_names` ([]string) - The name of the destination image, [2, 128] English or Chinese
|
||||
characters. It must begin with an uppercase/lowercase letter or a
|
||||
Chinese character, and may contain numbers, _ or -. It cannot begin with
|
||||
`http://` or `https://`.
|
||||
|
||||
- `image_encrypted` (boolean) - Whether or not to encrypt the target images, including those copied if image_copy_regions is specified. If this option
|
||||
is set to true, a temporary image will be created from the provisioned
|
||||
instance in the main region and an encrypted copy will be generated in the
|
||||
same region. By default, Packer will keep the encryption setting to what
|
||||
it was in the source image.
|
||||
- `image_encrypted` (boolean) - Whether or not to encrypt the target images, including those
|
||||
copied if image_copy_regions is specified. If this option is set to
|
||||
true, a temporary image will be created from the provisioned instance in
|
||||
the main region and an encrypted copy will be generated in the same
|
||||
region. By default, Packer will keep the encryption setting to what it
|
||||
was in the source image.
|
||||
|
||||
- `image_force_delete` (bool) - If this value is true, when the target image names including those
|
||||
copied are duplicated with existing images, it will delete the existing
|
||||
images and then create the target images, otherwise, the creation will
|
||||
fail. The default value is false. Check `image_name` and
|
||||
`image_copy_names` options for names of target images. If
|
||||
[-force](/docs/commands/build#force) option is
|
||||
provided in `build` command, this option can be omitted and taken as
|
||||
true.
|
||||
[-force](/docs/commands/build#force) option is provided in `build`
|
||||
command, this option can be omitted and taken as true.
|
||||
|
||||
- `image_force_delete_snapshots` (bool) - If this value is true, when delete the duplicated existing images, the
|
||||
source snapshots of those images will be delete either. If
|
||||
[-force](/docs/commands/build#force) option is
|
||||
provided in `build` command, this option can be omitted and taken as
|
||||
true.
|
||||
[-force](/docs/commands/build#force) option is provided in `build`
|
||||
command, this option can be omitted and taken as true.
|
||||
|
||||
- `image_force_delete_instances` (bool) - Alicloud Image Force Delete Instances
|
||||
- `image_ignore_data_disks` (bool) - If this value is true, the image
|
||||
created will not include any snapshot of data disks. This option would be
|
||||
useful for any circumstance that default data disks with instance types are
|
||||
not concerned. The default value is false.
|
||||
- `image_ignore_data_disks` (bool) - If this value is true, the image created will not include any snapshot
|
||||
of data disks. This option would be useful for any circumstance that
|
||||
default data disks with instance types are not concerned. The default
|
||||
value is false.
|
||||
|
||||
- `skip_region_validation` (bool) - The region validation can be skipped
|
||||
if this value is true, the default value is false.
|
||||
- `skip_region_validation` (bool) - The region validation can be skipped if this value is true, the default
|
||||
value is false.
|
||||
|
||||
- `tags` (map[string]string) - Key/value pair tags applied to the destination image and relevant
|
||||
snapshots.
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!-- Code generated from the comments of the AlicloudImageConfig struct in builder/alicloud/ecs/image_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `image_name` (string) - The name of the user-defined image, [2, 128]
|
||||
English or Chinese characters. It must begin with an uppercase/lowercase
|
||||
letter or a Chinese character, and may contain numbers, _ or -. It
|
||||
cannot begin with `http://` or `https://`.
|
||||
- `image_name` (string) - The name of the user-defined image, [2, 128] English or Chinese
|
||||
characters. It must begin with an uppercase/lowercase letter or a
|
||||
Chinese character, and may contain numbers, `_` or `-`. It cannot begin
|
||||
with `http://` or `https://`.
|
||||
|
@ -0,0 +1,31 @@
|
||||
<!-- Code generated from the comments of the Config struct in post-processor/alicloud-import/post-processor.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `oss_key_name` (string) - The name of the object key in `oss_bucket_name` where the RAW or VHD
|
||||
file will be copied to for import. This is treated as a [template
|
||||
engine](/docs/templates/engine), and you may access any of the variables
|
||||
stored in the generated data using the [build](/docs/templates/engine)
|
||||
template function.
|
||||
|
||||
- `skip_clean` (bool) - Whether we should skip removing the RAW or VHD file uploaded to OSS
|
||||
after the import process has completed. `true` means that we should
|
||||
leave it in the OSS bucket, `false` means to clean it out. Defaults to
|
||||
`false`.
|
||||
|
||||
- `tags` (map[string]string) - Tags
|
||||
- `image_description` (string) - The description of the image, with a length limit of `0` to `256`
|
||||
characters. Leaving it blank means null, which is the default value. It
|
||||
cannot begin with `http://` or `https://`.
|
||||
|
||||
- `image_share_account` ([]string) - Alicloud Image Share Accounts
|
||||
- `image_copy_regions` ([]string) - Alicloud Image Destination Regions
|
||||
- `image_system_size` (string) - Size of the system disk, in GB, values
|
||||
range:
|
||||
- cloud - 5 \~ 2000
|
||||
- cloud_efficiency - 20 \~ 2048
|
||||
- cloud_ssd - 20 \~ 2048
|
||||
|
||||
- `image_force_delete` (bool) - If this value is true, when the target image name is duplicated with an
|
||||
existing image, it will delete the existing image and then create the
|
||||
target image, otherwise, the creation will fail. The default value is
|
||||
false.
|
||||
|
@ -0,0 +1,15 @@
|
||||
<!-- Code generated from the comments of the Config struct in post-processor/alicloud-import/post-processor.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `oss_bucket_name` (string) - The name of the OSS bucket where the RAW or VHD file will be copied to
|
||||
for import. If the Bucket isn't exist, post-process will create it for
|
||||
you.
|
||||
|
||||
- `image_os_type` (string) - Type of the OS, like linux/windows
|
||||
|
||||
- `image_platform` (string) - Platform such as `CentOS`
|
||||
|
||||
- `image_architecture` (string) - Platform type of the image system: `i386` or `x86_64`
|
||||
|
||||
- `format` (string) - The format of the image for import, now alicloud only support RAW and
|
||||
VHD.
|
||||
|
@ -0,0 +1,2 @@
|
||||
<!-- Code generated from the comments of the Config struct in post-processor/alicloud-import/post-processor.go; DO NOT EDIT MANUALLY -->
|
||||
Configuration of this post processor
|
Loading…
x
Reference in New Issue
Block a user