📌 Hard Pin Website Dependencies (#9543)
* Update and pin dependencies * Update NextJS Scripts * npm run lint * npm run format * docs generator: indent docs by two and make spacing better Co-authored-by: Adrien Delorme <azr@users.noreply.github.com>
This commit is contained in:
parent
5de8278449
commit
d8b67f8520
|
@ -65,7 +65,7 @@ func main() {
|
|||
SourcePath: sourcePath,
|
||||
Name: typeSpec.Name.Name,
|
||||
Filename: typeSpec.Name.Name + ".mdx",
|
||||
Header: typeDecl.Doc.Text(),
|
||||
Header: strings.TrimSpace(typeDecl.Doc.Text()),
|
||||
}
|
||||
required := Struct{
|
||||
SourcePath: sourcePath,
|
||||
|
|
|
@ -24,12 +24,14 @@ var structDocsTemplate = template.Must(template.New("structDocsTemplate").
|
|||
"indent": indent,
|
||||
}).
|
||||
Parse(`<!-- Code generated from the comments of the {{ .Name }} struct in {{ .SourcePath }}; DO NOT EDIT MANUALLY -->
|
||||
{{ .Header -}}
|
||||
{{range .Fields}}
|
||||
- ` + "`" + `{{ .Name}}` + "`" + ` ({{ .Type }}) - {{ .Docs | indent 4 }}
|
||||
{{- end -}}`))
|
||||
{{ if .Header }}
|
||||
{{ .Header }}
|
||||
{{ end -}}
|
||||
{{ range .Fields }}
|
||||
- ` + "`" + `{{ .Name}}` + "`" + ` ({{ .Type }}) - {{ .Docs | indent 2 }}
|
||||
{{ end }}`))
|
||||
|
||||
func indent(spaces int, v string) string {
|
||||
pad := strings.Repeat(" ", spaces)
|
||||
return strings.Replace(v, "\n", "\n"+pad, -1)
|
||||
return strings.TrimSpace(strings.Replace(v, "\n", "\n"+pad, -1))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
presets: ['next/babel'],
|
||||
plugins: ['import-glob-array']
|
||||
plugins: ['import-glob-array'],
|
||||
}
|
||||
|
|
|
@ -16,7 +16,10 @@ export default [
|
|||
category: 'build',
|
||||
content: ['source', 'provisioner', 'post-processor'],
|
||||
},
|
||||
'locals', 'source', 'variable'],
|
||||
'locals',
|
||||
'source',
|
||||
'variable',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'functions',
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
export default [
|
||||
{
|
||||
category: 'hcl',
|
||||
content: ['from-json-v1', 'variables', 'component-object-spec']
|
||||
content: ['from-json-v1', 'variables', 'component-object-spec'],
|
||||
},
|
||||
{
|
||||
category: 'automatic-operating-system-installs',
|
||||
content: ['autounattend_windows', 'preseed_ubuntu']
|
||||
content: ['autounattend_windows', 'preseed_ubuntu'],
|
||||
},
|
||||
|
||||
{
|
||||
|
@ -20,8 +20,8 @@ export default [
|
|||
content: [
|
||||
'isotime-template-function',
|
||||
'veewee-to-packer',
|
||||
'use-packer-with-comment'
|
||||
]
|
||||
'use-packer-with-comment',
|
||||
],
|
||||
},
|
||||
{
|
||||
category: 'packer-on-cicd',
|
||||
|
@ -30,7 +30,7 @@ export default [
|
|||
'build-virtualbox-image',
|
||||
'pipelineing-builds',
|
||||
'trigger-tfe',
|
||||
'upload-images-to-artifact'
|
||||
]
|
||||
}
|
||||
'upload-images-to-artifact',
|
||||
],
|
||||
},
|
||||
]
|
||||
|
|
|
@ -3,21 +3,21 @@ export default [
|
|||
{
|
||||
text: 'Intro',
|
||||
url: '/intro',
|
||||
type: 'inbound'
|
||||
type: 'inbound',
|
||||
},
|
||||
{
|
||||
text: 'Guides',
|
||||
url: '/guides',
|
||||
type: 'inbound'
|
||||
type: 'inbound',
|
||||
},
|
||||
{
|
||||
text: 'Docs',
|
||||
url: '/docs',
|
||||
type: 'inbound'
|
||||
type: 'inbound',
|
||||
},
|
||||
{
|
||||
text: 'Community',
|
||||
url: '/community',
|
||||
type: 'inbound'
|
||||
}
|
||||
type: 'inbound',
|
||||
},
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,35 +4,31 @@
|
|||
"version": "1.0.0",
|
||||
"author": "HashiCorp",
|
||||
"dependencies": {
|
||||
"@hashicorp/nextjs-scripts": "^10.0.2",
|
||||
"@hashicorp/react-button": "^2.2.1",
|
||||
"@hashicorp/react-content": "^4.0.0",
|
||||
"@hashicorp/react-docs-page": "^4.0.0",
|
||||
"@hashicorp/react-docs-sidenav": "^3.2.5",
|
||||
"@hashicorp/react-global-styles": "^4.4.0",
|
||||
"@hashicorp/react-head": "^1.1.1",
|
||||
"@hashicorp/react-mega-nav": "^4.0.1-2",
|
||||
"@hashicorp/react-product-downloader": "^4.0.2",
|
||||
"@hashicorp/react-section-header": "^2.0.0",
|
||||
"@hashicorp/react-subnav": "^3.2.3",
|
||||
"@hashicorp/react-vertical-text-block-list": "^2.0.1",
|
||||
"algoliasearch": "^4.3.0",
|
||||
"babel-plugin-import-glob-array": "^0.2.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"gray-matter": "^4.0.2",
|
||||
"imagemin-mozjpeg": "^9.0.0",
|
||||
"imagemin-optipng": "^8.0.0",
|
||||
"imagemin-svgo": "^8.0.0",
|
||||
"@hashicorp/nextjs-scripts": "11.1.0",
|
||||
"@hashicorp/react-button": "2.2.1",
|
||||
"@hashicorp/react-content": "4.0.0",
|
||||
"@hashicorp/react-docs-page": "4.0.0",
|
||||
"@hashicorp/react-docs-sidenav": "3.2.5",
|
||||
"@hashicorp/react-global-styles": "4.4.0",
|
||||
"@hashicorp/react-head": "1.1.1",
|
||||
"@hashicorp/react-mega-nav": "4.0.1-2",
|
||||
"@hashicorp/react-product-downloader": "4.0.2",
|
||||
"@hashicorp/react-section-header": "2.0.0",
|
||||
"@hashicorp/react-subnav": "3.2.3",
|
||||
"@hashicorp/react-vertical-text-block-list": "2.0.1",
|
||||
"algoliasearch": "4.3.0",
|
||||
"babel-plugin-import-glob-array": "0.2.0",
|
||||
"dotenv": "8.2.0",
|
||||
"gray-matter": "4.0.2",
|
||||
"next": "9.4.4",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1"
|
||||
"react": "16.13.1",
|
||||
"react-dom": "16.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dart-linkcheck": "^2.0.15",
|
||||
"glob": "^7.1.6",
|
||||
"husky": "^4.2.5",
|
||||
"inquirer": "^7.1.0",
|
||||
"prettier": "^2.0.5"
|
||||
"dart-linkcheck": "2.0.15",
|
||||
"glob": "7.1.6",
|
||||
"husky": "4.2.5",
|
||||
"prettier": "2.0.5"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
|
|
@ -110,7 +110,6 @@ Block devices can be nested in the
|
|||
|
||||
## Basic Example
|
||||
|
||||
|
||||
<Tabs>
|
||||
<Tab heading="JSON">
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@ build {
|
|||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## Configuration Reference
|
||||
|
||||
Configuration options are organized below into two categories: required and
|
||||
|
|
|
@ -182,7 +182,7 @@ builder.
|
|||
Defaults to `/etc/resolv.conf` so that DNS lookups work.
|
||||
|
||||
- `chroot_device` (string) - The path of chroot device. Defaults an attempt is
|
||||
made to identify it based on the attach location.
|
||||
made to identify it based on the attach location.
|
||||
|
||||
- `chroot_disk_size` (float) - The size of the chroot disk in GiB. Defaults
|
||||
to `disk_size`.
|
||||
|
|
|
@ -53,7 +53,6 @@ build {
|
|||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
|
||||
## Configuration Reference
|
||||
|
||||
The null builder has no configuration parameters other than the
|
||||
|
|
|
@ -200,7 +200,7 @@ builder.
|
|||
- `cloud_init` (bool) - If true, add a Cloud-Init CDROM drive after the virtual machine has been converted to a template.
|
||||
|
||||
- `cloud_init_storage_pool` - (string) - Name of the Proxmox storage pool
|
||||
to store the Cloud-Init CDROM on. If not given, the storage pool of the boot device will be used.
|
||||
to store the Cloud-Init CDROM on. If not given, the storage pool of the boot device will be used.
|
||||
|
||||
## Example: Fedora with kickstart
|
||||
|
||||
|
|
|
@ -103,7 +103,6 @@ In addition to the options listed here, a
|
|||
[communicator](/docs/templates/communicator) can be configured for this
|
||||
builder.
|
||||
|
||||
|
||||
### Required:
|
||||
|
||||
@include 'builder/virtualbox/vm/Config-required.mdx'
|
||||
|
@ -186,7 +185,6 @@ builder.
|
|||
|
||||
@include 'helper/communicator/WinRM-not-required.mdx'
|
||||
|
||||
|
||||
### Boot Configuration
|
||||
|
||||
@include 'common/bootcommand/BootConfig.mdx'
|
||||
|
@ -220,7 +218,6 @@ contention. If you notice missing keys, you can tune this delay by specifying
|
|||
|
||||
@include 'builders/virtualbox-ssh-key-pair.mdx'
|
||||
|
||||
|
||||
## Guest Additions
|
||||
|
||||
Packer will automatically download the proper guest additions for the version of
|
||||
|
|
|
@ -146,14 +146,14 @@ can be done via environment variable:
|
|||
|
||||
@include 'helper/communicator/SSH-Agent-Auth-not-required.mdx'
|
||||
|
||||
-> **NOTE:** Packer uses vApp Options to inject ssh public keys to the Virtual Machine.
|
||||
The [temporary_key_pair_name](/docs/builders/vmware/vsphere-clone#temporary_key_pair_name) will only work
|
||||
if the template being cloned contains the vApp property `public-keys`.
|
||||
If using [ssh_private_key_file](/docs/builders/vmware/vsphere-clone#ssh_private_key_file), provide
|
||||
the public key via [configuration_parameters](/docs/builders/vmware/vsphere-clone#configuration_parameters) or
|
||||
[vApp Options Configuration](/docs/builders/vmware/vsphere-clone#vapp-options-configuration) whenever the `guestinto.userdata`
|
||||
is available. See [VMware Guestinfo datasource](https://github.com/vmware/cloud-init-vmware-guestinfo) for more information
|
||||
about the key.
|
||||
-> **NOTE:** Packer uses vApp Options to inject ssh public keys to the Virtual Machine.
|
||||
The [temporary_key_pair_name](/docs/builders/vmware/vsphere-clone#temporary_key_pair_name) will only work
|
||||
if the template being cloned contains the vApp property `public-keys`.
|
||||
If using [ssh_private_key_file](/docs/builders/vmware/vsphere-clone#ssh_private_key_file), provide
|
||||
the public key via [configuration_parameters](/docs/builders/vmware/vsphere-clone#configuration_parameters) or
|
||||
[vApp Options Configuration](/docs/builders/vmware/vsphere-clone#vapp-options-configuration) whenever the `guestinto.userdata`
|
||||
is available. See [VMware Guestinfo datasource](https://github.com/vmware/cloud-init-vmware-guestinfo) for more information
|
||||
about the key.
|
||||
|
||||
#### Optional WinRM fields:
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ Or use the `YC_TOKEN` environment variable with proper value. Token you could ge
|
|||
|
||||
To authenticate with a service account credential, only `service_account_key_file` is needed.
|
||||
Or use the `YC_SERVICE_ACCOUNT_KEY_FILE` environment variable.
|
||||
The parameter expects a value path to the service account file in json format. Check [documentation](https://cloud.yandex.com/docs/cli/operations/authentication/service-account#auth-as-sa)
|
||||
The parameter expects a value path to the service account file in json format. Check [documentation](https://cloud.yandex.com/docs/cli/operations/authentication/service-account#auth-as-sa)
|
||||
about how to create SA and its key.
|
||||
|
||||
### Authentication Using a Compute Instance Service Account
|
||||
|
@ -43,7 +43,6 @@ To get more information about this kind of authentication check [documentaion](h
|
|||
|
||||
-> **NB** Do not forget to assigne proper roles to Service Account, if you use this type of auth.
|
||||
|
||||
|
||||
## Basic Example
|
||||
|
||||
```json
|
||||
|
|
|
@ -36,12 +36,13 @@ artifacts that are created will be outputted at the end of the build.
|
|||
|
||||
- `-on-error=cleanup` (default), `-on-error=abort`, `-on-error=ask`, `-on-error=run-cleanup-provisioner` -
|
||||
Selects what to do when the build fails.
|
||||
|
||||
- `cleanup` cleans up after the previous steps, deleting temporary files and virtual machines.
|
||||
- `abort` exits without any cleanup, which might require the next build to use `-force`.
|
||||
- `ask` presents a prompt and waits for you to decide to clean up, abort, or retry
|
||||
the failed step.
|
||||
the failed step.
|
||||
- `run-cleanup-provisioner` aborts and exits without any cleanup besides
|
||||
the [error-cleanup-provisioner](/docs/templates/provisioners#on-error-provisioner) if one is defined.
|
||||
the [error-cleanup-provisioner](/docs/templates/provisioners#on-error-provisioner) if one is defined.
|
||||
|
||||
- `-only=foo,bar,baz` - Only run the builds with the given comma-separated
|
||||
names. Build names by default are their type, unless a specific `name`
|
||||
|
|
|
@ -129,7 +129,7 @@ packer console folder/
|
|||
```
|
||||
|
||||
Because `folder/` is a folder Packer will start in HCL2 mode, you can also
|
||||
directly pass an HCL2 formatted config file:
|
||||
directly pass an HCL2 formatted config file:
|
||||
|
||||
```shell-session
|
||||
packer console file.pkr.hcl
|
||||
|
|
|
@ -13,16 +13,15 @@ sidebar_title: <tt>build</tt>
|
|||
The `build` block defines what builders are started, how to `provision` them
|
||||
and if necessary what to do with their artifacts using `post-process`.
|
||||
|
||||
To use builders in a `build` block you can either:
|
||||
To use builders in a `build` block you can either:
|
||||
|
||||
* Set the `sources` array of string with references to pre-defined sources.
|
||||
- Set the `sources` array of string with references to pre-defined sources.
|
||||
|
||||
* Define [build-level `source` blocks](/docs/from-1.5/blocks/build/source) or
|
||||
`sources` to use builders. This also allows you to set specific fields.
|
||||
- Define [build-level `source` blocks](/docs/from-1.5/blocks/build/source) or
|
||||
`sources` to use builders. This also allows you to set specific fields.
|
||||
|
||||
`@include 'from-1.5/builds/example-block.mdx'`
|
||||
|
||||
|
||||
Define [top-level `source` blocks](/docs/from-1.5/blocks/source) to configure
|
||||
your builders. The list of available builders can be found in the
|
||||
[builders](/docs/builders) section.
|
||||
|
@ -90,12 +89,11 @@ Build 'a.null.second-example' finished.
|
|||
Here `'a.null.first-example'` was skipped.
|
||||
|
||||
-> Note: It is not yet possible to match a named `build` block to do this, but
|
||||
this is soon going to be possible. So here "a.*" will match nothing.
|
||||
|
||||
this is soon going to be possible. So here "a.\*" will match nothing.
|
||||
|
||||
## Related
|
||||
|
||||
* A list of [community
|
||||
builders](/community-tools#community-builders) is available.
|
||||
- A list of [community
|
||||
builders](/community-tools#community-builders) is available.
|
||||
|
||||
* Create your own [custom builder](/docs/extending/custom-builders) !
|
||||
- Create your own [custom builder](/docs/extending/custom-builders) !
|
||||
|
|
|
@ -29,7 +29,7 @@ upload artifacts, re-package, or more. The list of available post-processors
|
|||
can be found in the [post-processors](/docs/post-processors) section.
|
||||
|
||||
-> Note: The input 'artifact' received by a post-processor will be automatically
|
||||
deleted.
|
||||
deleted.
|
||||
|
||||
# Keep an input artifact
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ build {
|
|||
|
||||
The values within `only` or `except` are _build names_, not builder types.
|
||||
|
||||
|
||||
## Pausing Before Running
|
||||
|
||||
With certain provisioners it is sometimes desirable to pause for some period of
|
||||
|
@ -111,7 +110,6 @@ executing the shell script.
|
|||
With certain provisioners it is sometimes desirable to retry when it fails.
|
||||
Specifically, in cases where the provisioner depends on external processes that are not done yet.
|
||||
|
||||
|
||||
Every provisioner definition in a Packer template can take a special
|
||||
configuration `max_retries` that is the maximum number of times a provisioner will retry on error.
|
||||
By default, there `max_retries` is zero and there is no retry on error. An example is shown below:
|
||||
|
|
|
@ -49,6 +49,6 @@ This allows to have commonly defined source settings with specific parts of it
|
|||
defined inside the specific build block.
|
||||
|
||||
-> **Note:** It is **not allowed** to set the same field in a top-level source
|
||||
block and in a used source block. For example, if in the above example, the
|
||||
top-level "amazon-ebs.example" source block also had an `output` field;
|
||||
Packer would error.
|
||||
block and in a used source block. For example, if in the above example, the
|
||||
top-level "amazon-ebs.example" source block also had an `output` field;
|
||||
Packer would error.
|
||||
|
|
|
@ -14,7 +14,7 @@ The Packer - HCL2 language includes a number of built-in blocks that you can
|
|||
use. A block is a container for configuration.
|
||||
|
||||
Blocks can be defined in multiple files and `packer build folder` will build
|
||||
using solely the files from a directory named `folder`.
|
||||
using solely the files from a directory named `folder`.
|
||||
|
||||
Packer does not support user-defined blocks and so only the blocks built in to
|
||||
the language are available for use. The navigation for this section includes a
|
||||
|
@ -24,16 +24,16 @@ list of all of the available built-in HCL2 blocks.
|
|||
|
||||
`@include 'from-1.5/variables/foo-block.mdx'`
|
||||
|
||||
* [Variable block documentation](/docs/from-1.5/blocks/variable).
|
||||
- [Variable block documentation](/docs/from-1.5/blocks/variable).
|
||||
|
||||
`@include 'from-1.5/locals/example-block.mdx'`
|
||||
|
||||
* [Locals block documentation](/docs/from-1.5/blocks/locals).
|
||||
- [Locals block documentation](/docs/from-1.5/blocks/locals).
|
||||
|
||||
`@include 'from-1.5/sources/example-block.mdx'`
|
||||
|
||||
* [source block documentation](/docs/from-1.5/blocks/source).
|
||||
- [source block documentation](/docs/from-1.5/blocks/source).
|
||||
|
||||
`@include 'from-1.5/builds/example-block.mdx'`
|
||||
|
||||
* [build block documentation](/docs/from-1.5/blocks/build).
|
||||
- [build block documentation](/docs/from-1.5/blocks/build).
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
description: >
|
||||
The locals block also called the local-variable block defines locals within
|
||||
your Packer configuration.
|
||||
your Packer configuration.
|
||||
layout: docs
|
||||
page_title: locals - Blocks
|
||||
sidebar_title: <tt>locals</tt>
|
||||
|
@ -12,7 +12,7 @@ sidebar_title: <tt>locals</tt>
|
|||
`@include 'from-1.5/beta-hcl2-note.mdx'`
|
||||
|
||||
The `locals` block, also called the `local-variable` block, defines locals within
|
||||
your Packer configuration.
|
||||
your Packer configuration.
|
||||
|
||||
`@include 'from-1.5/locals/example-block.mdx'`
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ build {
|
|||
}
|
||||
```
|
||||
|
||||
The build-level [`source` block](/docs/from-1.5/blocks/build/source) allows to
|
||||
The build-level [`source` block](/docs/from-1.5/blocks/build/source) allows to
|
||||
set specific source fields.
|
||||
|
||||
```hcl
|
||||
|
@ -41,10 +41,10 @@ build {
|
|||
|
||||
## Related
|
||||
|
||||
* The list of available builders can be found in the [builders](/docs/builders)
|
||||
- The list of available builders can be found in the [builders](/docs/builders)
|
||||
section.
|
||||
|
||||
* A list of [community
|
||||
- A list of [community
|
||||
builders](/community-tools#community-builders) is available.
|
||||
|
||||
* Create your own [custom builder](/docs/extending/custom-builders) !
|
||||
- Create your own [custom builder](/docs/extending/custom-builders) !
|
||||
|
|
|
@ -61,7 +61,7 @@ Example of using [upper](/docs/from-1.5/functions/string/upper) to upper case th
|
|||
|
||||
For builder-specific builder variables, please also refer to the builder docs:
|
||||
|
||||
- Amazon EC2: [chroot](/docs/builders/amazon/chroot#build-shared-information-variables),
|
||||
- Amazon EC2: [chroot](/docs/builders/amazon/chroot#build-shared-information-variables),
|
||||
[EBS Volume](/docs/builders/amazon/ebsvolume#build-shared-information-variables),
|
||||
[EBS](/docs/builders/amazon/ebs#build-shared-information-variables),
|
||||
[EBS Surrogate](/docs/builders/amazon/ebssurrogate#build-shared-information-variables),
|
||||
|
|
|
@ -259,8 +259,7 @@ set.
|
|||
## `dynamic` blocks
|
||||
|
||||
Within top-level block constructs like sources, expressions can usually be used
|
||||
only when assigning a value to an argument using the `name = expression` or `key
|
||||
= expression` form. This covers many uses, but some source types include
|
||||
only when assigning a value to an argument using the `name = expression` or `key = expression` form. This covers many uses, but some source types include
|
||||
repeatable _nested blocks_ in their arguments, which do not accept expressions:
|
||||
|
||||
```hcl
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: Collection - Functions - Configuration Language
|
|||
sidebar_title: Collection Functions
|
||||
description: Overview of available collection functions
|
||||
---
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: conversion - Functions - Configuration Language
|
|||
sidebar_title: Type Conversion Functions
|
||||
description: Overview of available conversion functions
|
||||
---
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: crypto - Functions - Configuration Language
|
|||
sidebar_title: Hash and Crypto Functions
|
||||
description: Overview of available crypto functions
|
||||
---
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: datetime - Functions - Configuration Language
|
|||
sidebar_title: Date and Time Functions
|
||||
description: Overview of available datetime functions
|
||||
---
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: encoding - Functions - Configuration Language
|
|||
sidebar_title: Encoding Functions
|
||||
description: Overview of available encoding functions
|
||||
---
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ before Packer takes any actions.
|
|||
## Examples
|
||||
|
||||
```shell-session
|
||||
> tree pkr-consul
|
||||
> tree pkr-consul
|
||||
pkr-consul
|
||||
├── build-linux.pkr.hcl
|
||||
└── linux
|
||||
|
@ -97,7 +97,8 @@ build {
|
|||
```
|
||||
|
||||
List of provisioners with a `scripts` field:
|
||||
* [`shell`](/docs/provisioners/shell)
|
||||
* [`powershell`](/docs/provisioners/powershell)
|
||||
* [`shell-local`](/docs/provisioners/shell-local)
|
||||
* [`windows-shell`](/docs/provisioners/windows-shell)
|
||||
|
||||
- [`shell`](/docs/provisioners/shell)
|
||||
- [`powershell`](/docs/provisioners/powershell)
|
||||
- [`shell-local`](/docs/provisioners/shell-local)
|
||||
- [`windows-shell`](/docs/provisioners/windows-shell)
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: filesystem - Functions - Configuration Language
|
|||
sidebar_title: Filesystem Functions
|
||||
description: Overview of available filesystem functions
|
||||
---
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: ipnet - Functions - Configuration Language
|
|||
sidebar_title: IP Network Functions
|
||||
description: Overview of available ipnet functions
|
||||
---
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: Numeric - Functions - Configuration Language
|
|||
sidebar_title: Numeric Functions
|
||||
description: Overview of available numeric functions
|
||||
---
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: string - Functions - Configuration Language
|
|||
sidebar_title: String Functions
|
||||
description: Overview of available string functions
|
||||
---
|
||||
|
||||
|
|
|
@ -4,4 +4,3 @@ page_title: uuid - Functions - Configuration Language
|
|||
sidebar_title: UUID Functions
|
||||
description: Overview of available uuid functions
|
||||
---
|
||||
|
||||
|
|
|
@ -58,15 +58,15 @@ build {
|
|||
Note that cli arguments can be used with a glob operator, using the previous
|
||||
configuration:
|
||||
|
||||
* `packer build -only 'my_build.*' dir`: will only run the builds in blocks
|
||||
- `packer build -only 'my_build.*' dir`: will only run the builds in blocks
|
||||
named `my_build`.
|
||||
|
||||
* `packer build -only '*.amazon-ebs.*' dir`: will only run the builds with a
|
||||
source of type `amazon-ebs`.
|
||||
- `packer build -only '*.amazon-ebs.*' dir`: will only run the builds with a
|
||||
source of type `amazon-ebs`.
|
||||
|
||||
* `packer build -only '*.second-example-local-name' dir`: will only run that
|
||||
specifically named build.
|
||||
- `packer build -only '*.second-example-local-name' dir`: will only run that
|
||||
specifically named build.
|
||||
|
||||
-> Note: In the cli `only` and `except` will match agains **build names** (for
|
||||
example:`my_build.amazon-ebs.first-example`) but in a provisioner they will
|
||||
match on the **source type** (for example:`source.amazon-ebs.third-example`).
|
||||
example:`my_build.amazon-ebs.first-example`) but in a provisioner they will
|
||||
match on the **source type** (for example:`source.amazon-ebs.third-example`).
|
||||
|
|
|
@ -289,11 +289,11 @@ that apply to each top-level block type.
|
|||
|
||||
All arguments inside `variable` blocks have non-standard mappings to JSON:
|
||||
|
||||
* `type`: a string containing a type expression, like `"string"` or `"list(string)"`.
|
||||
* `default`: a literal JSON value that can be converted to the given type.
|
||||
- `type`: a string containing a type expression, like `"string"` or `"list(string)"`.
|
||||
- `default`: a literal JSON value that can be converted to the given type.
|
||||
Strings within this value are taken literally and _not_ interpreted as
|
||||
string templates.
|
||||
* `description`: a literal JSON string, _not_ interpreted as a template.
|
||||
- `description`: a literal JSON string, _not_ interpreted as a template.
|
||||
|
||||
```json
|
||||
{
|
||||
|
|
|
@ -37,12 +37,13 @@ post-processors such as Docker and Artifice.
|
|||
### Optional:
|
||||
|
||||
@include 'post-processor/manifest/Config-not-required.mdx'
|
||||
- `keep_input_artifact` (boolean) - Unlike most other post-processors, the
|
||||
keep_input_artifact option will have no effect for the manifest
|
||||
post-processor. We will always retain the input artifact for manifest,
|
||||
since deleting the files we just recorded is not a behavior anyone should
|
||||
ever expect. `keep_input_artifact will` therefore always be evaluated as
|
||||
true, regardless of the value you enter into this field.
|
||||
|
||||
- `keep_input_artifact` (boolean) - Unlike most other post-processors, the
|
||||
keep_input_artifact option will have no effect for the manifest
|
||||
post-processor. We will always retain the input artifact for manifest,
|
||||
since deleting the files we just recorded is not a behavior anyone should
|
||||
ever expect. `keep_input_artifact will` therefore always be evaluated as
|
||||
true, regardless of the value you enter into this field.
|
||||
|
||||
### Example Configuration
|
||||
|
||||
|
|
|
@ -29,10 +29,8 @@ As such, assigned Service Account must have write permissions to the Yandex Obje
|
|||
`paths`. A new temporary static access keys from assigned Service Account used to upload
|
||||
image.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
|
||||
### Required:
|
||||
|
||||
@include 'post-processor/yandex-export/Config-required.mdx'
|
||||
|
@ -41,7 +39,6 @@ image.
|
|||
|
||||
@include 'post-processor/yandex-export/Config-not-required.mdx'
|
||||
|
||||
|
||||
## Basic Example
|
||||
|
||||
The following example builds a Compute image in the folder with id `b1g8jvfcgmitdrslcn86`, with an
|
||||
|
@ -67,7 +64,7 @@ must have write access to both `s3://packer-export/my-exported-image.qcow2` and
|
|||
|
||||
"source_image_family": "ubuntu-1604-lts",
|
||||
"ssh_username": "ubuntu",
|
||||
"use_ipv4_nat": true,
|
||||
"use_ipv4_nat": true
|
||||
}
|
||||
],
|
||||
"post-processors": [
|
||||
|
|
|
@ -17,15 +17,12 @@ The Yandex.Cloud Compute Image Import post-processor create new Compute Image
|
|||
from a qcow2 file. As Compute service support image creation from Storage service object
|
||||
just before request to create its upload file into Storage service.
|
||||
|
||||
|
||||
Assigned Service Account must have write permissions to the Yandex Object Storage.
|
||||
A new temporary static access keys from assigned Service Account used to upload
|
||||
file.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
|
||||
### Required:
|
||||
|
||||
@include 'post-processor/yandex-import/Config-required.mdx'
|
||||
|
@ -34,7 +31,6 @@ file.
|
|||
|
||||
@include 'post-processor/yandex-import/Config-not-required.mdx'
|
||||
|
||||
|
||||
## Basic Example
|
||||
|
||||
TBD
|
||||
|
|
|
@ -17,7 +17,6 @@ The `salt-masterless` Packer provisioner provisions machines built by Packer
|
|||
using [Salt](http://saltstack.com/) states, without connecting to a Salt
|
||||
master.
|
||||
|
||||
|
||||
## Basic Example
|
||||
|
||||
The example below is fully functional.
|
||||
|
|
|
@ -109,7 +109,7 @@ Here is a full list of the available functions for reference.
|
|||
|
||||
For builder-specific builder variables, please also refer to the builder docs:
|
||||
|
||||
- Amazon EC2: [chroot](/docs/builders/amazon/chroot#build-shared-information-variables),
|
||||
- Amazon EC2: [chroot](/docs/builders/amazon/chroot#build-shared-information-variables),
|
||||
[EBS Volume](/docs/builders/amazon/ebsvolume#build-shared-information-variables),
|
||||
[EBS](/docs/builders/amazon/ebs#build-shared-information-variables),
|
||||
[EBS Surrogate](/docs/builders/amazon/ebssurrogate#build-shared-information-variables),
|
||||
|
|
|
@ -182,7 +182,6 @@ executing the shell script.
|
|||
With certain provisioners it is sometimes desirable to retry when it fails.
|
||||
Specifically, in cases where the provisioner depends on external processes that are not done yet.
|
||||
|
||||
|
||||
Every provisioner definition in a Packer template can take a special
|
||||
configuration `max_retries` that is the maximum number of times a provisioner will retry on error.
|
||||
By default, there `max_retries` is zero and there is no retry on error. An example is shown below:
|
||||
|
|
|
@ -26,12 +26,11 @@ It also makes it so that a failing build takes less time to debug and re-run.
|
|||
In this example, we will use the Virtualbox builders, but the concepts from
|
||||
this example can be applied to other builders as well.
|
||||
|
||||
|
||||
## Starting from an ISO
|
||||
|
||||
Here is an extremely basic virtualbox-iso template:
|
||||
|
||||
``` json
|
||||
```json
|
||||
{
|
||||
"builders": [
|
||||
{
|
||||
|
@ -102,7 +101,7 @@ That output filename generated in the first stage can be used as the
|
|||
[source_path](https://www.packer.io/docs/builders/virtualbox/ovf#source_path)
|
||||
for the virtualbox-ovf builder.
|
||||
|
||||
``` json
|
||||
```json
|
||||
{
|
||||
"builders": [
|
||||
{
|
||||
|
@ -119,9 +118,7 @@ for the virtualbox-ovf builder.
|
|||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"inline": [
|
||||
"echo secondary provisioning"
|
||||
],
|
||||
"inline": ["echo secondary provisioning"],
|
||||
"type": "shell"
|
||||
}
|
||||
]
|
||||
|
@ -140,18 +137,22 @@ the behavior you want. The below example shows a "vagrant" post-processor
|
|||
being used with a null builder, and manually sets the artifact from our
|
||||
stage-2 ovf build:
|
||||
|
||||
``` json
|
||||
```json
|
||||
{
|
||||
"builders": [{
|
||||
"type": "null",
|
||||
"communicator": "none"
|
||||
}],
|
||||
"builders": [
|
||||
{
|
||||
"type": "null",
|
||||
"communicator": "none"
|
||||
}
|
||||
],
|
||||
"post-processors": [
|
||||
[
|
||||
{
|
||||
"type": "artifice",
|
||||
"files": ["output-virtualbox-ovf/virtualbox-example-ovf.ovf",
|
||||
"output-virtualbox-ovf/virtualbox-example-ovf-disk001.vmdk"]
|
||||
"files": [
|
||||
"output-virtualbox-ovf/virtualbox-example-ovf.ovf",
|
||||
"output-virtualbox-ovf/virtualbox-example-ovf-disk001.vmdk"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "vagrant",
|
||||
|
@ -166,4 +167,4 @@ By using the null builder instead of just running an ovf builder, we can spare o
|
|||
|
||||
## Putting it all together
|
||||
|
||||
Packer templates don't come with a custom "glue" to bind them together. We recommend using your CI system or wrapping scripts to connect the templates into a chain.
|
||||
Packer templates don't come with a custom "glue" to bind them together. We recommend using your CI system or wrapping scripts to connect the templates into a chain.
|
||||
|
|
|
@ -23,13 +23,13 @@
|
|||
width: 80%;
|
||||
margin: 0 10%;
|
||||
}
|
||||
}
|
||||
|
||||
& > *:first-child {
|
||||
margin-right: 15px;
|
||||
&:first-child {
|
||||
margin-right: 15px;
|
||||
|
||||
@media (max-width: 350px) {
|
||||
margin-bottom: 15px;
|
||||
@media (max-width: 350px) {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
<!-- Code generated from the comments of the AlicloudAccessConfig struct in builder/alicloud/ecs/access_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `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) - 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) - 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`.
|
||||
|
||||
- `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) - 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) - 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`.
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
<!-- 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.
|
||||
|
||||
- `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,2 +1,3 @@
|
|||
<!-- Code generated from the comments of the AlicloudAccessConfig struct in builder/alicloud/ecs/access_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
Config of alicloud
|
||||
|
|
|
@ -1,39 +1,38 @@
|
|||
<!-- Code generated from the comments of the AlicloudDiskDevice struct in builder/alicloud/ecs/image_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `disk_name` (string) - The value of disk name is blank by default. [2,
|
||||
128] English or Chinese characters, must begin with an
|
||||
uppercase/lowercase letter or Chinese character. Can contain numbers,
|
||||
., _ and -. The disk name will appear on the console. It cannot
|
||||
begin with `http://` or `https://`.
|
||||
|
||||
- `disk_category` (string) - Category of the system disk. Optional values
|
||||
are:
|
||||
- cloud - general cloud disk
|
||||
- cloud_efficiency - efficiency cloud disk
|
||||
- cloud_ssd - cloud SSD
|
||||
|
||||
- `disk_size` (int) - Size of the system disk, measured in GiB. Value
|
||||
range: [20, 500]. The specified value must be equal to or greater
|
||||
than max{20, ImageSize}. Default value: max{40, ImageSize}.
|
||||
|
||||
- `disk_snapshot_id` (string) - Snapshots are used to create the data
|
||||
disk After this parameter is specified, Size is ignored. The actual
|
||||
size of the created disk is the size of the specified snapshot.
|
||||
|
||||
- `disk_description` (string) - The value of disk description is blank by
|
||||
default. [2, 256] characters. The disk description will appear on the
|
||||
console. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `disk_delete_with_instance` (bool) - Whether or not the disk is
|
||||
released along with the instance:
|
||||
|
||||
- `disk_device` (string) - Device information of the related instance:
|
||||
such as /dev/xvdb It is null unless the Status is In_use.
|
||||
|
||||
- `disk_encrypted` (boolean) - Whether or not to encrypt the data disk.
|
||||
If this option is set to true, the data disk will be encryped and corresponding snapshot in the target image will also be encrypted. By
|
||||
default, if this is an extra data disk, Packer will not encrypt the
|
||||
data disk. Otherwise, Packer will keep the encryption setting to what
|
||||
it was in the source image. Please refer to Introduction of ECS disk encryption
|
||||
for more details.
|
||||
|
||||
- `disk_name` (string) - The value of disk name is blank by default. [2,
|
||||
128] English or Chinese characters, must begin with an
|
||||
uppercase/lowercase letter or Chinese character. Can contain numbers,
|
||||
., _ and -. The disk name will appear on the console. It cannot
|
||||
begin with `http://` or `https://`.
|
||||
|
||||
- `disk_category` (string) - Category of the system disk. Optional values
|
||||
are:
|
||||
- cloud - general cloud disk
|
||||
- cloud_efficiency - efficiency cloud disk
|
||||
- cloud_ssd - cloud SSD
|
||||
|
||||
- `disk_size` (int) - Size of the system disk, measured in GiB. Value
|
||||
range: [20, 500]. The specified value must be equal to or greater
|
||||
than max{20, ImageSize}. Default value: max{40, ImageSize}.
|
||||
|
||||
- `disk_snapshot_id` (string) - Snapshots are used to create the data
|
||||
disk After this parameter is specified, Size is ignored. The actual
|
||||
size of the created disk is the size of the specified snapshot.
|
||||
|
||||
- `disk_description` (string) - The value of disk description is blank by
|
||||
default. [2, 256] characters. The disk description will appear on the
|
||||
console. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `disk_delete_with_instance` (bool) - Whether or not the disk is
|
||||
released along with the instance:
|
||||
|
||||
- `disk_device` (string) - Device information of the related instance:
|
||||
such as /dev/xvdb It is null unless the Status is In_use.
|
||||
|
||||
- `disk_encrypted` (boolean) - Whether or not to encrypt the data disk.
|
||||
If this option is set to true, the data disk will be encryped and corresponding snapshot in the target image will also be encrypted. By
|
||||
default, if this is an extra data disk, Packer will not encrypt the
|
||||
data disk. Otherwise, Packer will keep the encryption setting to what
|
||||
it was in the source image. Please refer to Introduction of ECS disk encryption
|
||||
for more details.
|
||||
|
|
|
@ -1,80 +1,79 @@
|
|||
<!-- Code generated from the comments of the AlicloudDiskDevices struct in builder/alicloud/ecs/image_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `system_disk_mapping` (AlicloudDiskDevice) - Image disk mapping for system
|
||||
disk.
|
||||
- `disk_category` (string) - Category of the system disk. Optional values
|
||||
are:
|
||||
- `cloud` - general cloud disk
|
||||
- `cloud_efficiency` - efficiency cloud disk
|
||||
- `cloud_ssd` - cloud SSD
|
||||
|
||||
For phased-out instance types and non-I/O optimized instances, the
|
||||
default value is cloud. Otherwise, the default value is
|
||||
cloud\_efficiency.
|
||||
|
||||
- `disk_description` (string) - The value of disk description is blank by
|
||||
default. \[2, 256\] characters. The disk description will appear on the
|
||||
console. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `disk_name` (string) - The value of disk name is blank by default. \[2,
|
||||
128\] English or Chinese characters, must begin with an
|
||||
uppercase/lowercase letter or Chinese character. Can contain numbers,
|
||||
`.`, `_` and `-`. The disk name will appear on the console. It cannot
|
||||
begin with `http://` or `https://`.
|
||||
|
||||
- `disk_size` (number) - Size of the system disk, measured in GiB. Value
|
||||
range: \[20, 500\]. The specified value must be equal to or greater
|
||||
than max{20, ImageSize}. Default value: max{40, ImageSize}.
|
||||
|
||||
- `image_disk_mappings` ([]AlicloudDiskDevice) - Add one or more data
|
||||
disks to the image.
|
||||
|
||||
- `disk_category` (string) - Category of the data disk. Optional values
|
||||
are:
|
||||
- `cloud` - general cloud disk
|
||||
- `cloud_efficiency` - efficiency cloud disk
|
||||
- `cloud_ssd` - cloud SSD
|
||||
|
||||
Default value: cloud.
|
||||
|
||||
- `disk_delete_with_instance` (boolean) - Whether or not the disk is
|
||||
released along with the instance:
|
||||
- True indicates that when the instance is released, this disk will
|
||||
be released with it
|
||||
- False indicates that when the instance is released, this disk will
|
||||
be retained.
|
||||
- `disk_description` (string) - The value of disk description is blank by
|
||||
default. \[2, 256\] characters. The disk description will appear on the
|
||||
console. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `disk_device` (string) - Device information of the related instance:
|
||||
such as `/dev/xvdb` It is null unless the Status is In\_use.
|
||||
|
||||
- `disk_name` (string) - The value of disk name is blank by default. \[2,
|
||||
128\] English or Chinese characters, must begin with an
|
||||
uppercase/lowercase letter or Chinese character. Can contain numbers,
|
||||
`.`, `_` and `-`. The disk name will appear on the console. It cannot
|
||||
begin with `http://` or `https://`.
|
||||
|
||||
- `disk_size` (number) - Size of the data disk, in GB, values range:
|
||||
- `cloud` - 5 \~ 2000
|
||||
- `cloud_efficiency` - 20 \~ 2048
|
||||
- `cloud_ssd` - 20 \~ 2048
|
||||
|
||||
The value should be equal to or greater than the size of the specific
|
||||
SnapshotId.
|
||||
|
||||
- `disk_snapshot_id` (string) - Snapshots are used to create the data
|
||||
disk After this parameter is specified, Size is ignored. The actual
|
||||
size of the created disk is the size of the specified snapshot.
|
||||
|
||||
Snapshots from on or before July 15, 2013 cannot be used to create a
|
||||
disk.
|
||||
|
||||
- `disk_encrypted` (boolean) - Whether or not to encrypt the data disk.
|
||||
If this option is set to true, the data disk will be encryped and corresponding snapshot in the target image will also be encrypted. By
|
||||
default, if this is an extra data disk, Packer will not encrypt the
|
||||
data disk. Otherwise, Packer will keep the encryption setting to what
|
||||
it was in the source image. Please refer to Introduction of [ECS disk encryption](https://www.alibabacloud.com/help/doc-detail/59643.htm)
|
||||
for more details.
|
||||
|
||||
- `system_disk_mapping` (AlicloudDiskDevice) - Image disk mapping for system
|
||||
disk.
|
||||
- `disk_category` (string) - Category of the system disk. Optional values
|
||||
are:
|
||||
- `cloud` - general cloud disk
|
||||
- `cloud_efficiency` - efficiency cloud disk
|
||||
- `cloud_ssd` - cloud SSD
|
||||
|
||||
For phased-out instance types and non-I/O optimized instances, the
|
||||
default value is cloud. Otherwise, the default value is
|
||||
cloud\_efficiency.
|
||||
|
||||
- `disk_description` (string) - The value of disk description is blank by
|
||||
default. \[2, 256\] characters. The disk description will appear on the
|
||||
console. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `disk_name` (string) - The value of disk name is blank by default. \[2,
|
||||
128\] English or Chinese characters, must begin with an
|
||||
uppercase/lowercase letter or Chinese character. Can contain numbers,
|
||||
`.`, `_` and `-`. The disk name will appear on the console. It cannot
|
||||
begin with `http://` or `https://`.
|
||||
|
||||
- `disk_size` (number) - Size of the system disk, measured in GiB. Value
|
||||
range: \[20, 500\]. The specified value must be equal to or greater
|
||||
than max{20, ImageSize}. Default value: max{40, ImageSize}.
|
||||
|
||||
- `image_disk_mappings` ([]AlicloudDiskDevice) - Add one or more data
|
||||
disks to the image.
|
||||
|
||||
- `disk_category` (string) - Category of the data disk. Optional values
|
||||
are:
|
||||
- `cloud` - general cloud disk
|
||||
- `cloud_efficiency` - efficiency cloud disk
|
||||
- `cloud_ssd` - cloud SSD
|
||||
|
||||
Default value: cloud.
|
||||
|
||||
- `disk_delete_with_instance` (boolean) - Whether or not the disk is
|
||||
released along with the instance:
|
||||
- True indicates that when the instance is released, this disk will
|
||||
be released with it
|
||||
- False indicates that when the instance is released, this disk will
|
||||
be retained.
|
||||
- `disk_description` (string) - The value of disk description is blank by
|
||||
default. \[2, 256\] characters. The disk description will appear on the
|
||||
console. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `disk_device` (string) - Device information of the related instance:
|
||||
such as `/dev/xvdb` It is null unless the Status is In\_use.
|
||||
|
||||
- `disk_name` (string) - The value of disk name is blank by default. \[2,
|
||||
128\] English or Chinese characters, must begin with an
|
||||
uppercase/lowercase letter or Chinese character. Can contain numbers,
|
||||
`.`, `_` and `-`. The disk name will appear on the console. It cannot
|
||||
begin with `http://` or `https://`.
|
||||
|
||||
- `disk_size` (number) - Size of the data disk, in GB, values range:
|
||||
- `cloud` - 5 \~ 2000
|
||||
- `cloud_efficiency` - 20 \~ 2048
|
||||
- `cloud_ssd` - 20 \~ 2048
|
||||
|
||||
The value should be equal to or greater than the size of the specific
|
||||
SnapshotId.
|
||||
|
||||
- `disk_snapshot_id` (string) - Snapshots are used to create the data
|
||||
disk After this parameter is specified, Size is ignored. The actual
|
||||
size of the created disk is the size of the specified snapshot.
|
||||
|
||||
Snapshots from on or before July 15, 2013 cannot be used to create a
|
||||
disk.
|
||||
|
||||
- `disk_encrypted` (boolean) - Whether or not to encrypt the data disk.
|
||||
If this option is set to true, the data disk will be encryped and corresponding snapshot in the target image will also be encrypted. By
|
||||
default, if this is an extra data disk, Packer will not encrypt the
|
||||
data disk. Otherwise, Packer will keep the encryption setting to what
|
||||
it was in the source image. Please refer to Introduction of [ECS disk encryption](https://www.alibabacloud.com/help/doc-detail/59643.htm)
|
||||
for more details.
|
||||
|
|
|
@ -1,58 +1,59 @@
|
|||
<!-- 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_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_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_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.
|
||||
|
||||
- `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.
|
||||
|
||||
- `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.
|
||||
|
||||
- `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.
|
||||
|
||||
- `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
|
||||
containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `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_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_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.
|
||||
|
||||
- `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.
|
||||
|
||||
- `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.
|
||||
|
||||
- `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.
|
||||
|
||||
- `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
|
||||
containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<!-- 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://`.
|
||||
|
|
|
@ -1,94 +1,95 @@
|
|||
<!-- Code generated from the comments of the RunConfig struct in builder/alicloud/ecs/run_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `associate_public_ip_address` (bool) - Associate Public Ip Address
|
||||
- `zone_id` (string) - ID of the zone to which the disk belongs.
|
||||
|
||||
- `io_optimized` (boolean) - Whether an ECS instance is I/O optimized or not. If this option is not
|
||||
provided, the value will be determined by product API according to what
|
||||
`instance_type` is used.
|
||||
|
||||
- `description` (string) - Description
|
||||
- `force_stop_instance` (bool) - Whether to force shutdown upon device
|
||||
restart. The default value is `false`.
|
||||
|
||||
If it is set to `false`, the system is shut down normally; if it is set to
|
||||
`true`, the system is forced to shut down.
|
||||
|
||||
- `disable_stop_instance` (bool) - If this option is set to true, Packer
|
||||
will not stop the instance for you, and you need to make sure the instance
|
||||
will be stopped in the final provisioner command. Otherwise, Packer will
|
||||
timeout while waiting the instance to be stopped. This option is provided
|
||||
for some specific scenarios that you want to stop the instance by yourself.
|
||||
E.g., Sysprep a windows which may shutdown the instance within its command.
|
||||
The default value is false.
|
||||
|
||||
- `security_group_id` (string) - ID of the security group to which a newly
|
||||
created instance belongs. Mutual access is allowed between instances in one
|
||||
security group. If not specified, the newly created instance will be added
|
||||
to the default security group. If the default group doesn’t exist, or the
|
||||
number of instances in it has reached the maximum limit, a new security
|
||||
group will be created automatically.
|
||||
|
||||
- `security_group_name` (string) - The security group name. The default value
|
||||
is blank. [2, 128] English or Chinese characters, must begin with an
|
||||
uppercase/lowercase letter or Chinese character. Can contain numbers, .,
|
||||
_ or -. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `user_data` (string) - User data to apply when launching the instance. Note
|
||||
that you need to be careful about escaping characters due to the templates
|
||||
being JSON. It is often more convenient to use user_data_file, instead.
|
||||
Packer will not automatically wait for a user script to finish before
|
||||
shutting down the instance this must be handled in a provisioner.
|
||||
|
||||
- `user_data_file` (string) - Path to a file that will be used for the user
|
||||
data when launching the instance.
|
||||
|
||||
- `vpc_id` (string) - VPC ID allocated by the system.
|
||||
|
||||
- `vpc_name` (string) - The VPC name. The default value is blank. [2, 128]
|
||||
English or Chinese characters, must begin with an uppercase/lowercase
|
||||
letter or Chinese character. Can contain numbers, _ and -. The disk
|
||||
description will appear on the console. Cannot begin with `http://` or
|
||||
`https://`.
|
||||
|
||||
- `vpc_cidr_block` (string) - Value options: 192.168.0.0/16 and
|
||||
172.16.0.0/16. When not specified, the default value is 172.16.0.0/16.
|
||||
|
||||
- `vswitch_id` (string) - The ID of the VSwitch to be used.
|
||||
|
||||
- `vswitch_name` (string) - The ID of the VSwitch to be used.
|
||||
|
||||
- `instance_name` (string) - Display name of the instance, which is a string of 2 to 128 Chinese or
|
||||
English characters. It must begin with an uppercase/lowercase letter or
|
||||
a Chinese character and can contain numerals, `.`, `_`, or `-`. The
|
||||
instance name is displayed on the Alibaba Cloud console. If this
|
||||
parameter is not specified, the default value is InstanceId of the
|
||||
instance. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `internet_charge_type` (string) - Internet charge type, which can be
|
||||
`PayByTraffic` or `PayByBandwidth`. Optional values:
|
||||
- `PayByBandwidth`
|
||||
- `PayByTraffic`
|
||||
|
||||
If this parameter is not specified, the default value is `PayByBandwidth`.
|
||||
For the regions out of China, currently only support `PayByTraffic`, you
|
||||
must set it manfully.
|
||||
|
||||
- `internet_max_bandwidth_out` (int) - Maximum outgoing bandwidth to the
|
||||
public network, measured in Mbps (Mega bits per second).
|
||||
|
||||
Value range:
|
||||
- `PayByBandwidth`: \[0, 100\]. If this parameter is not specified, API
|
||||
automatically sets it to 0 Mbps.
|
||||
- `PayByTraffic`: \[1, 100\]. If this parameter is not specified, an
|
||||
error is returned.
|
||||
|
||||
- `wait_snapshot_ready_timeout` (int) - Timeout of creating snapshot(s).
|
||||
The default timeout is 3600 seconds if this option is not set or is set
|
||||
to 0. For those disks containing lots of data, it may require a higher
|
||||
timeout value.
|
||||
|
||||
- `ssh_private_ip` (bool) - If this value is true, packer will connect to
|
||||
the ECS created through private ip instead of allocating a public ip or an
|
||||
EIP. The default value is false.
|
||||
|
||||
- `associate_public_ip_address` (bool) - Associate Public Ip Address
|
||||
|
||||
- `zone_id` (string) - ID of the zone to which the disk belongs.
|
||||
|
||||
- `io_optimized` (boolean) - Whether an ECS instance is I/O optimized or not. If this option is not
|
||||
provided, the value will be determined by product API according to what
|
||||
`instance_type` is used.
|
||||
|
||||
- `description` (string) - Description
|
||||
|
||||
- `force_stop_instance` (bool) - Whether to force shutdown upon device
|
||||
restart. The default value is `false`.
|
||||
|
||||
If it is set to `false`, the system is shut down normally; if it is set to
|
||||
`true`, the system is forced to shut down.
|
||||
|
||||
- `disable_stop_instance` (bool) - If this option is set to true, Packer
|
||||
will not stop the instance for you, and you need to make sure the instance
|
||||
will be stopped in the final provisioner command. Otherwise, Packer will
|
||||
timeout while waiting the instance to be stopped. This option is provided
|
||||
for some specific scenarios that you want to stop the instance by yourself.
|
||||
E.g., Sysprep a windows which may shutdown the instance within its command.
|
||||
The default value is false.
|
||||
|
||||
- `security_group_id` (string) - ID of the security group to which a newly
|
||||
created instance belongs. Mutual access is allowed between instances in one
|
||||
security group. If not specified, the newly created instance will be added
|
||||
to the default security group. If the default group doesn’t exist, or the
|
||||
number of instances in it has reached the maximum limit, a new security
|
||||
group will be created automatically.
|
||||
|
||||
- `security_group_name` (string) - The security group name. The default value
|
||||
is blank. [2, 128] English or Chinese characters, must begin with an
|
||||
uppercase/lowercase letter or Chinese character. Can contain numbers, .,
|
||||
_ or -. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `user_data` (string) - User data to apply when launching the instance. Note
|
||||
that you need to be careful about escaping characters due to the templates
|
||||
being JSON. It is often more convenient to use user_data_file, instead.
|
||||
Packer will not automatically wait for a user script to finish before
|
||||
shutting down the instance this must be handled in a provisioner.
|
||||
|
||||
- `user_data_file` (string) - Path to a file that will be used for the user
|
||||
data when launching the instance.
|
||||
|
||||
- `vpc_id` (string) - VPC ID allocated by the system.
|
||||
|
||||
- `vpc_name` (string) - The VPC name. The default value is blank. [2, 128]
|
||||
English or Chinese characters, must begin with an uppercase/lowercase
|
||||
letter or Chinese character. Can contain numbers, _ and -. The disk
|
||||
description will appear on the console. Cannot begin with `http://` or
|
||||
`https://`.
|
||||
|
||||
- `vpc_cidr_block` (string) - Value options: 192.168.0.0/16 and
|
||||
172.16.0.0/16. When not specified, the default value is 172.16.0.0/16.
|
||||
|
||||
- `vswitch_id` (string) - The ID of the VSwitch to be used.
|
||||
|
||||
- `vswitch_name` (string) - The ID of the VSwitch to be used.
|
||||
|
||||
- `instance_name` (string) - Display name of the instance, which is a string of 2 to 128 Chinese or
|
||||
English characters. It must begin with an uppercase/lowercase letter or
|
||||
a Chinese character and can contain numerals, `.`, `_`, or `-`. The
|
||||
instance name is displayed on the Alibaba Cloud console. If this
|
||||
parameter is not specified, the default value is InstanceId of the
|
||||
instance. It cannot begin with `http://` or `https://`.
|
||||
|
||||
- `internet_charge_type` (string) - Internet charge type, which can be
|
||||
`PayByTraffic` or `PayByBandwidth`. Optional values:
|
||||
- `PayByBandwidth`
|
||||
- `PayByTraffic`
|
||||
|
||||
If this parameter is not specified, the default value is `PayByBandwidth`.
|
||||
For the regions out of China, currently only support `PayByTraffic`, you
|
||||
must set it manfully.
|
||||
|
||||
- `internet_max_bandwidth_out` (int) - Maximum outgoing bandwidth to the
|
||||
public network, measured in Mbps (Mega bits per second).
|
||||
|
||||
Value range:
|
||||
- `PayByBandwidth`: \[0, 100\]. If this parameter is not specified, API
|
||||
automatically sets it to 0 Mbps.
|
||||
- `PayByTraffic`: \[1, 100\]. If this parameter is not specified, an
|
||||
error is returned.
|
||||
|
||||
- `wait_snapshot_ready_timeout` (int) - Timeout of creating snapshot(s).
|
||||
The default timeout is 3600 seconds if this option is not set or is set
|
||||
to 0. For those disks containing lots of data, it may require a higher
|
||||
timeout value.
|
||||
|
||||
- `ssh_private_ip` (bool) - If this value is true, packer will connect to
|
||||
the ECS created through private ip instead of allocating a public ip or an
|
||||
EIP. The default value is false.
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<!-- Code generated from the comments of the RunConfig struct in builder/alicloud/ecs/run_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `instance_type` (string) - Type of the instance. For values, see [Instance Type
|
||||
Table](https://www.alibabacloud.com/help/doc-detail/25378.htm?spm=a3c0i.o25499en.a3.9.14a36ac8iYqKRA).
|
||||
You can also obtain the latest instance type table by invoking the
|
||||
[Querying Instance Type
|
||||
Table](https://intl.aliyun.com/help/doc-detail/25620.htm?spm=a3c0i.o25499en.a3.6.Dr1bik)
|
||||
interface.
|
||||
|
||||
- `source_image` (string) - This is the base image id which you want to
|
||||
create your customized images.
|
||||
|
||||
- `instance_type` (string) - Type of the instance. For values, see [Instance Type
|
||||
Table](https://www.alibabacloud.com/help/doc-detail/25378.htm?spm=a3c0i.o25499en.a3.9.14a36ac8iYqKRA).
|
||||
You can also obtain the latest instance type table by invoking the
|
||||
[Querying Instance Type
|
||||
Table](https://intl.aliyun.com/help/doc-detail/25620.htm?spm=a3c0i.o25499en.a3.6.Dr1bik)
|
||||
interface.
|
||||
|
||||
- `source_image` (string) - This is the base image id which you want to
|
||||
create your customized images.
|
||||
|
|
|
@ -1,135 +1,134 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/chroot/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more [block device
|
||||
mappings](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
|
||||
to the AMI. If this field is populated, and you are building from an
|
||||
existing source image, the block device mappings in the source image
|
||||
will be overwritten. This means you must have a block device mapping
|
||||
entry for your root volume, `root_volume_size` and `root_device_name`.
|
||||
See the [BlockDevices](#block-devices-configuration) documentation for
|
||||
fields.
|
||||
|
||||
- `chroot_mounts` ([][]string) - This is a list of devices to mount into the chroot environment. This
|
||||
configuration parameter requires some additional documentation which is
|
||||
in the Chroot Mounts section. Please read that section for more
|
||||
information on how to use this.
|
||||
|
||||
- `command_wrapper` (string) - How to run shell commands. This defaults to `{{.Command}}`. This may be
|
||||
useful to set if you want to set environmental variables or perhaps run
|
||||
it with sudo or so on. This is a configuration template where the
|
||||
.Command variable is replaced with the command to be run. Defaults to
|
||||
`{{.Command}}`.
|
||||
|
||||
- `copy_files` ([]string) - Paths to files on the running EC2 instance that will be copied into the
|
||||
chroot environment prior to provisioning. Defaults to /etc/resolv.conf
|
||||
so that DNS lookups work. Pass an empty list to skip copying
|
||||
/etc/resolv.conf. You may need to do this if you're building an image
|
||||
that uses systemd.
|
||||
|
||||
- `device_path` (string) - The path to the device where the root volume of the source AMI will be
|
||||
attached. This defaults to "" (empty string), which forces Packer to
|
||||
find an open device automatically.
|
||||
|
||||
- `nvme_device_path` (string) - When we call the mount command (by default mount -o device dir), the
|
||||
string provided in nvme_mount_path will replace device in that command.
|
||||
When this option is not set, device in that command will be something
|
||||
like /dev/sdf1, mirroring the attached device name. This assumption
|
||||
works for most instances but will fail with c5 and m5 instances. In
|
||||
order to use the chroot builder with c5 and m5 instances, you must
|
||||
manually set nvme_device_path and device_path.
|
||||
|
||||
- `from_scratch` (bool) - Build a new volume instead of starting from an existing AMI root volume
|
||||
snapshot. Default false. If true, source_ami/source_ami_filter are no
|
||||
longer used and the following options become required:
|
||||
ami_virtualization_type, pre_mount_commands and root_volume_size.
|
||||
|
||||
- `mount_options` ([]string) - Options to supply the mount command when mounting devices. Each option
|
||||
will be prefixed with -o and supplied to the mount command ran by
|
||||
Packer. Because this command is ran in a shell, user discretion is
|
||||
advised. See this manual page for the mount command for valid file
|
||||
system specific options.
|
||||
|
||||
- `mount_partition` (string) - The partition number containing the / partition. By default this is the
|
||||
first partition of the volume, (for example, xvda1) but you can
|
||||
designate the entire block device by setting "mount_partition": "0" in
|
||||
your config, which will mount xvda instead.
|
||||
|
||||
- `mount_path` (string) - The path where the volume will be mounted. This is where the chroot
|
||||
environment will be. This defaults to
|
||||
`/mnt/packer-amazon-chroot-volumes/{{.Device}}`. This is a configuration
|
||||
template where the .Device variable is replaced with the name of the
|
||||
device where the volume is attached.
|
||||
|
||||
- `post_mount_commands` ([]string) - As pre_mount_commands, but the commands are executed after mounting the
|
||||
root device and before the extra mount and copy steps. The device and
|
||||
mount path are provided by `{{.Device}}` and `{{.MountPath}}`.
|
||||
|
||||
- `pre_mount_commands` ([]string) - A series of commands to execute after attaching the root volume and
|
||||
before mounting the chroot. This is not required unless using
|
||||
from_scratch. If so, this should include any partitioning and filesystem
|
||||
creation commands. The path to the device is provided by `{{.Device}}`.
|
||||
|
||||
- `root_device_name` (string) - The root device name. For example, xvda.
|
||||
|
||||
- `root_volume_size` (int64) - The size of the root volume in GB for the chroot environment and the
|
||||
resulting AMI. Default size is the snapshot size of the source_ami
|
||||
unless from_scratch is true, in which case this field must be defined.
|
||||
|
||||
- `root_volume_type` (string) - The type of EBS volume for the chroot environment and resulting AMI. The
|
||||
default value is the type of the source_ami, unless from_scratch is
|
||||
true, in which case the default value is gp2. You can only specify io1
|
||||
if building based on top of a source_ami which is also io1.
|
||||
|
||||
- `source_ami_filter` (awscommon.AmiFilterOptions) - Filters used to populate the source_ami field. Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"source_ami_filter": {
|
||||
"filters": {
|
||||
"virtualization-type": "hvm",
|
||||
"name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
|
||||
"root-device-type": "ebs"
|
||||
},
|
||||
"owners": ["099720109477"],
|
||||
"most_recent": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. NOTE:
|
||||
This will fail unless *exactly* one AMI is returned. In the above example,
|
||||
`most_recent` will cause this to succeed by selecting the newest image.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a `source_ami`.
|
||||
NOTE: This will fail unless *exactly* one AMI is returned. Any filter
|
||||
described in the docs for
|
||||
[DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html)
|
||||
is valid.
|
||||
|
||||
- `owners` (array of strings) - Filters the images by their owner. You
|
||||
may specify one or more AWS account IDs, "self" (which will use the
|
||||
account whose credentials you are using to run Packer), or an AWS owner
|
||||
alias: for example, "amazon", "aws-marketplace", or "microsoft". This
|
||||
option is required for security reasons.
|
||||
|
||||
- `most_recent` (boolean) - Selects the newest created image when true.
|
||||
This is most useful for selecting a daily distro build.
|
||||
|
||||
You may set this in place of `source_ami` or in conjunction with it. If you
|
||||
set this in conjunction with `source_ami`, the `source_ami` will be added
|
||||
to the filter. The provided `source_ami` must meet all of the filtering
|
||||
criteria provided in `source_ami_filter`; this pins the AMI returned by the
|
||||
filter, but will cause Packer to fail if the `source_ami` does not exist.
|
||||
|
||||
- `root_volume_tags` (map[string]string) - Key/value pair tags to apply to the volumes that are *launched*. This is
|
||||
a [template engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `root_volume_tag` ([]{key string, value string}) - Same as [`root_volume_tags`](#root_volume_tags) but defined as a
|
||||
singular block containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `ami_architecture` (string) - what architecture to use when registering the final AMI; valid options
|
||||
are "x86_64" or "arm64". Defaults to "x86_64".
|
||||
|
||||
- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more [block device
|
||||
mappings](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
|
||||
to the AMI. If this field is populated, and you are building from an
|
||||
existing source image, the block device mappings in the source image
|
||||
will be overwritten. This means you must have a block device mapping
|
||||
entry for your root volume, `root_volume_size` and `root_device_name`.
|
||||
See the [BlockDevices](#block-devices-configuration) documentation for
|
||||
fields.
|
||||
|
||||
- `chroot_mounts` ([][]string) - This is a list of devices to mount into the chroot environment. This
|
||||
configuration parameter requires some additional documentation which is
|
||||
in the Chroot Mounts section. Please read that section for more
|
||||
information on how to use this.
|
||||
|
||||
- `command_wrapper` (string) - How to run shell commands. This defaults to `{{.Command}}`. This may be
|
||||
useful to set if you want to set environmental variables or perhaps run
|
||||
it with sudo or so on. This is a configuration template where the
|
||||
.Command variable is replaced with the command to be run. Defaults to
|
||||
`{{.Command}}`.
|
||||
|
||||
- `copy_files` ([]string) - Paths to files on the running EC2 instance that will be copied into the
|
||||
chroot environment prior to provisioning. Defaults to /etc/resolv.conf
|
||||
so that DNS lookups work. Pass an empty list to skip copying
|
||||
/etc/resolv.conf. You may need to do this if you're building an image
|
||||
that uses systemd.
|
||||
|
||||
- `device_path` (string) - The path to the device where the root volume of the source AMI will be
|
||||
attached. This defaults to "" (empty string), which forces Packer to
|
||||
find an open device automatically.
|
||||
|
||||
- `nvme_device_path` (string) - When we call the mount command (by default mount -o device dir), the
|
||||
string provided in nvme_mount_path will replace device in that command.
|
||||
When this option is not set, device in that command will be something
|
||||
like /dev/sdf1, mirroring the attached device name. This assumption
|
||||
works for most instances but will fail with c5 and m5 instances. In
|
||||
order to use the chroot builder with c5 and m5 instances, you must
|
||||
manually set nvme_device_path and device_path.
|
||||
|
||||
- `from_scratch` (bool) - Build a new volume instead of starting from an existing AMI root volume
|
||||
snapshot. Default false. If true, source_ami/source_ami_filter are no
|
||||
longer used and the following options become required:
|
||||
ami_virtualization_type, pre_mount_commands and root_volume_size.
|
||||
|
||||
- `mount_options` ([]string) - Options to supply the mount command when mounting devices. Each option
|
||||
will be prefixed with -o and supplied to the mount command ran by
|
||||
Packer. Because this command is ran in a shell, user discretion is
|
||||
advised. See this manual page for the mount command for valid file
|
||||
system specific options.
|
||||
|
||||
- `mount_partition` (string) - The partition number containing the / partition. By default this is the
|
||||
first partition of the volume, (for example, xvda1) but you can
|
||||
designate the entire block device by setting "mount_partition": "0" in
|
||||
your config, which will mount xvda instead.
|
||||
|
||||
- `mount_path` (string) - The path where the volume will be mounted. This is where the chroot
|
||||
environment will be. This defaults to
|
||||
`/mnt/packer-amazon-chroot-volumes/{{.Device}}`. This is a configuration
|
||||
template where the .Device variable is replaced with the name of the
|
||||
device where the volume is attached.
|
||||
|
||||
- `post_mount_commands` ([]string) - As pre_mount_commands, but the commands are executed after mounting the
|
||||
root device and before the extra mount and copy steps. The device and
|
||||
mount path are provided by `{{.Device}}` and `{{.MountPath}}`.
|
||||
|
||||
- `pre_mount_commands` ([]string) - A series of commands to execute after attaching the root volume and
|
||||
before mounting the chroot. This is not required unless using
|
||||
from_scratch. If so, this should include any partitioning and filesystem
|
||||
creation commands. The path to the device is provided by `{{.Device}}`.
|
||||
|
||||
- `root_device_name` (string) - The root device name. For example, xvda.
|
||||
|
||||
- `root_volume_size` (int64) - The size of the root volume in GB for the chroot environment and the
|
||||
resulting AMI. Default size is the snapshot size of the source_ami
|
||||
unless from_scratch is true, in which case this field must be defined.
|
||||
|
||||
- `root_volume_type` (string) - The type of EBS volume for the chroot environment and resulting AMI. The
|
||||
default value is the type of the source_ami, unless from_scratch is
|
||||
true, in which case the default value is gp2. You can only specify io1
|
||||
if building based on top of a source_ami which is also io1.
|
||||
|
||||
- `source_ami_filter` (awscommon.AmiFilterOptions) - Filters used to populate the source_ami field. Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"source_ami_filter": {
|
||||
"filters": {
|
||||
"virtualization-type": "hvm",
|
||||
"name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*",
|
||||
"root-device-type": "ebs"
|
||||
},
|
||||
"owners": ["099720109477"],
|
||||
"most_recent": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. NOTE:
|
||||
This will fail unless *exactly* one AMI is returned. In the above example,
|
||||
`most_recent` will cause this to succeed by selecting the newest image.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a `source_ami`.
|
||||
NOTE: This will fail unless *exactly* one AMI is returned. Any filter
|
||||
described in the docs for
|
||||
[DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html)
|
||||
is valid.
|
||||
|
||||
- `owners` (array of strings) - Filters the images by their owner. You
|
||||
may specify one or more AWS account IDs, "self" (which will use the
|
||||
account whose credentials you are using to run Packer), or an AWS owner
|
||||
alias: for example, "amazon", "aws-marketplace", or "microsoft". This
|
||||
option is required for security reasons.
|
||||
|
||||
- `most_recent` (boolean) - Selects the newest created image when true.
|
||||
This is most useful for selecting a daily distro build.
|
||||
|
||||
You may set this in place of `source_ami` or in conjunction with it. If you
|
||||
set this in conjunction with `source_ami`, the `source_ami` will be added
|
||||
to the filter. The provided `source_ami` must meet all of the filtering
|
||||
criteria provided in `source_ami_filter`; this pins the AMI returned by the
|
||||
filter, but will cause Packer to fail if the `source_ami` does not exist.
|
||||
|
||||
- `root_volume_tags` (map[string]string) - Key/value pair tags to apply to the volumes that are *launched*. This is
|
||||
a [template engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `root_volume_tag` ([]{key string, value string}) - Same as [`root_volume_tags`](#root_volume_tags) but defined as a
|
||||
singular block containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `ami_architecture` (string) - what architecture to use when registering the final AMI; valid options
|
||||
are "x86_64" or "arm64". Defaults to "x86_64".
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/chroot/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `source_ami` (string) - The source AMI whose root volume will be copied and provisioned on the
|
||||
currently running instance. This must be an EBS-backed AMI with a root
|
||||
volume snapshot that you have access to. Note: this is not used when
|
||||
from_scratch is set to true.
|
||||
|
||||
- `source_ami` (string) - The source AMI whose root volume will be copied and provisioned on the
|
||||
currently running instance. This must be an EBS-backed AMI with a root
|
||||
volume snapshot that you have access to. Note: this is not used when
|
||||
from_scratch is set to true.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/chroot/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
Config is the configuration that is chained through the steps and settable
|
||||
from the template.
|
||||
|
|
|
@ -1,120 +1,119 @@
|
|||
<!-- Code generated from the comments of the AMIConfig struct in builder/amazon/common/ami_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `ami_description` (string) - The description to set for the resulting
|
||||
AMI(s). By default this description is empty. This is a
|
||||
[template engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `ami_virtualization_type` (string) - The type of virtualization for the AMI
|
||||
you are building. This option is required to register HVM images. Can be
|
||||
paravirtual (default) or hvm.
|
||||
|
||||
- `ami_users` ([]string) - A list of account IDs that have access to
|
||||
launch the resulting AMI(s). By default no additional users other than the
|
||||
user creating the AMI has permissions to launch it.
|
||||
|
||||
- `ami_groups` ([]string) - A list of groups that have access to
|
||||
launch the resulting AMI(s). By default no groups have permission to launch
|
||||
the AMI. all will make the AMI publicly accessible.
|
||||
|
||||
- `ami_product_codes` ([]string) - A list of product codes to
|
||||
associate with the AMI. By default no product codes are associated with the
|
||||
AMI.
|
||||
|
||||
- `ami_regions` ([]string) - A list of regions to copy the AMI to.
|
||||
Tags and attributes are copied along with the AMI. AMI copying takes time
|
||||
depending on the size of the AMI, but will generally take many minutes.
|
||||
|
||||
- `skip_region_validation` (bool) - Set to true if you want to skip
|
||||
validation of the ami_regions configuration option. Default false.
|
||||
|
||||
- `tags` (map[string]string) - Key/value pair tags applied to the AMI. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
|
||||
containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on
|
||||
HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your
|
||||
AWS IAM policy.
|
||||
|
||||
Note: you must make sure enhanced networking is enabled on your
|
||||
instance. See [Amazon's documentation on enabling enhanced
|
||||
networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
|
||||
|
||||
- `sriov_support` (bool) - Enable enhanced networking (SriovNetSupport but not ENA) on
|
||||
HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your
|
||||
AWS IAM policy. Note: you must make sure enhanced networking is enabled
|
||||
on your instance. See [Amazon's documentation on enabling enhanced
|
||||
networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
|
||||
Default `false`.
|
||||
|
||||
- `force_deregister` (bool) - Force Packer to first deregister an existing
|
||||
AMI if one with the same name already exists. Default false.
|
||||
|
||||
- `force_delete_snapshot` (bool) - Force Packer to delete snapshots
|
||||
associated with AMIs, which have been deregistered by force_deregister.
|
||||
Default false.
|
||||
|
||||
- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when
|
||||
copying a provisioned instance to an AMI. By default, Packer will keep the
|
||||
encryption setting to what it was in the source image. Setting false will
|
||||
result in an unencrypted image, and true will result in an encrypted one.
|
||||
If you have used the `launch_block_device_mappings` to set an encryption
|
||||
key and that key is the same as the one you want the image encrypted with
|
||||
at the end, then you don't need to set this field; leaving it empty will
|
||||
prevent an unnecessary extra copy step and save you some time.
|
||||
|
||||
- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption. This
|
||||
only applies to the main `region`, other regions where the AMI will be
|
||||
copied will be encrypted by the default EBS KMS key. For valid formats
|
||||
see *KmsKeyId* in the [AWS API docs -
|
||||
CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html).
|
||||
This field is validated by Packer, when using an alias, you will have to
|
||||
prefix `kms_key_id` with `alias/`.
|
||||
|
||||
- `region_kms_key_ids` (map[string]string) - regions to copy the ami to, along with the custom kms key id (alias or
|
||||
arn) to use for encryption for that region. Keys must match the regions
|
||||
provided in `ami_regions`. If you just want to encrypt using a default
|
||||
ID, you can stick with `kms_key_id` and `ami_regions`. If you want a
|
||||
region to be encrypted with that region's default key ID, you can use an
|
||||
empty string `""` instead of a key id in this map. (e.g. `"us-east-1":
|
||||
""`) However, you cannot use default key IDs if you are using this in
|
||||
conjunction with `snapshot_users` -- in that situation you must use
|
||||
custom keys. For valid formats see *KmsKeyId* in the [AWS API docs -
|
||||
CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html).
|
||||
|
||||
This option supercedes the `kms_key_id` option -- if you set both, and
|
||||
they are different, Packer will respect the value in
|
||||
`region_kms_key_ids` for your build region and silently disregard the
|
||||
value provided in `kms_key_id`.
|
||||
|
||||
- `skip_save_build_region` (bool) - If true, Packer will not check whether an AMI with the `ami_name` exists
|
||||
in the region it is building in. It will use an intermediary AMI name,
|
||||
which it will not convert to an AMI in the build region. It will copy
|
||||
the intermediary AMI into any regions provided in `ami_regions`, then
|
||||
delete the intermediary AMI. Default `false`.
|
||||
|
||||
- `snapshot_tags` (map[string]string) - Key/value pair tags to apply to snapshot. They will override AMI tags if
|
||||
already applied to snapshot. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `snapshot_tag` ([]{key string, value string}) - Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular
|
||||
repeatable block containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `snapshot_users` ([]string) - A list of account IDs that have
|
||||
access to create volumes from the snapshot(s). By default no additional
|
||||
users other than the user creating the AMI has permissions to create
|
||||
volumes from the backing snapshot(s).
|
||||
|
||||
- `snapshot_groups` ([]string) - A list of groups that have access to
|
||||
create volumes from the snapshot(s). By default no groups have permission
|
||||
to create volumes from the snapshot(s). all will make the snapshot
|
||||
publicly accessible.
|
||||
|
||||
- `ami_description` (string) - The description to set for the resulting
|
||||
AMI(s). By default this description is empty. This is a
|
||||
[template engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `ami_virtualization_type` (string) - The type of virtualization for the AMI
|
||||
you are building. This option is required to register HVM images. Can be
|
||||
paravirtual (default) or hvm.
|
||||
|
||||
- `ami_users` ([]string) - A list of account IDs that have access to
|
||||
launch the resulting AMI(s). By default no additional users other than the
|
||||
user creating the AMI has permissions to launch it.
|
||||
|
||||
- `ami_groups` ([]string) - A list of groups that have access to
|
||||
launch the resulting AMI(s). By default no groups have permission to launch
|
||||
the AMI. all will make the AMI publicly accessible.
|
||||
|
||||
- `ami_product_codes` ([]string) - A list of product codes to
|
||||
associate with the AMI. By default no product codes are associated with the
|
||||
AMI.
|
||||
|
||||
- `ami_regions` ([]string) - A list of regions to copy the AMI to.
|
||||
Tags and attributes are copied along with the AMI. AMI copying takes time
|
||||
depending on the size of the AMI, but will generally take many minutes.
|
||||
|
||||
- `skip_region_validation` (bool) - Set to true if you want to skip
|
||||
validation of the ami_regions configuration option. Default false.
|
||||
|
||||
- `tags` (map[string]string) - Key/value pair tags applied to the AMI. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
|
||||
containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on
|
||||
HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your
|
||||
AWS IAM policy.
|
||||
|
||||
Note: you must make sure enhanced networking is enabled on your
|
||||
instance. See [Amazon's documentation on enabling enhanced
|
||||
networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
|
||||
|
||||
- `sriov_support` (bool) - Enable enhanced networking (SriovNetSupport but not ENA) on
|
||||
HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your
|
||||
AWS IAM policy. Note: you must make sure enhanced networking is enabled
|
||||
on your instance. See [Amazon's documentation on enabling enhanced
|
||||
networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
|
||||
Default `false`.
|
||||
|
||||
- `force_deregister` (bool) - Force Packer to first deregister an existing
|
||||
AMI if one with the same name already exists. Default false.
|
||||
|
||||
- `force_delete_snapshot` (bool) - Force Packer to delete snapshots
|
||||
associated with AMIs, which have been deregistered by force_deregister.
|
||||
Default false.
|
||||
|
||||
- `encrypt_boot` (boolean) - Whether or not to encrypt the resulting AMI when
|
||||
copying a provisioned instance to an AMI. By default, Packer will keep the
|
||||
encryption setting to what it was in the source image. Setting false will
|
||||
result in an unencrypted image, and true will result in an encrypted one.
|
||||
If you have used the `launch_block_device_mappings` to set an encryption
|
||||
key and that key is the same as the one you want the image encrypted with
|
||||
at the end, then you don't need to set this field; leaving it empty will
|
||||
prevent an unnecessary extra copy step and save you some time.
|
||||
|
||||
- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption. This
|
||||
only applies to the main `region`, other regions where the AMI will be
|
||||
copied will be encrypted by the default EBS KMS key. For valid formats
|
||||
see *KmsKeyId* in the [AWS API docs -
|
||||
CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html).
|
||||
This field is validated by Packer, when using an alias, you will have to
|
||||
prefix `kms_key_id` with `alias/`.
|
||||
|
||||
- `region_kms_key_ids` (map[string]string) - regions to copy the ami to, along with the custom kms key id (alias or
|
||||
arn) to use for encryption for that region. Keys must match the regions
|
||||
provided in `ami_regions`. If you just want to encrypt using a default
|
||||
ID, you can stick with `kms_key_id` and `ami_regions`. If you want a
|
||||
region to be encrypted with that region's default key ID, you can use an
|
||||
empty string `""` instead of a key id in this map. (e.g. `"us-east-1":
|
||||
""`) However, you cannot use default key IDs if you are using this in
|
||||
conjunction with `snapshot_users` -- in that situation you must use
|
||||
custom keys. For valid formats see *KmsKeyId* in the [AWS API docs -
|
||||
CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html).
|
||||
|
||||
This option supercedes the `kms_key_id` option -- if you set both, and
|
||||
they are different, Packer will respect the value in
|
||||
`region_kms_key_ids` for your build region and silently disregard the
|
||||
value provided in `kms_key_id`.
|
||||
|
||||
- `skip_save_build_region` (bool) - If true, Packer will not check whether an AMI with the `ami_name` exists
|
||||
in the region it is building in. It will use an intermediary AMI name,
|
||||
which it will not convert to an AMI in the build region. It will copy
|
||||
the intermediary AMI into any regions provided in `ami_regions`, then
|
||||
delete the intermediary AMI. Default `false`.
|
||||
|
||||
- `snapshot_tags` (map[string]string) - Key/value pair tags to apply to snapshot. They will override AMI tags if
|
||||
already applied to snapshot. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `snapshot_tag` ([]{key string, value string}) - Same as [`snapshot_tags`](#snapshot_tags) but defined as a singular
|
||||
repeatable block containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `snapshot_users` ([]string) - A list of account IDs that have
|
||||
access to create volumes from the snapshot(s). By default no additional
|
||||
users other than the user creating the AMI has permissions to create
|
||||
volumes from the backing snapshot(s).
|
||||
|
||||
- `snapshot_groups` ([]string) - A list of groups that have access to
|
||||
create volumes from the snapshot(s). By default no groups have permission
|
||||
to create volumes from the snapshot(s). all will make the snapshot
|
||||
publicly accessible.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<!-- Code generated from the comments of the AMIConfig struct in builder/amazon/common/ami_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `ami_name` (string) - The name of the resulting AMI that will appear when managing AMIs in the
|
||||
AWS console or via APIs. This must be unique. To help make this unique,
|
||||
use a function like timestamp (see [template
|
||||
engine](/docs/templates/engine) for more info).
|
||||
|
||||
- `ami_name` (string) - The name of the resulting AMI that will appear when managing AMIs in the
|
||||
AWS console or via APIs. This must be unique. To help make this unique,
|
||||
use a function like timestamp (see [template
|
||||
engine](/docs/templates/engine) for more info).
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
<!-- Code generated from the comments of the AMIConfig struct in builder/amazon/common/ami_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
AMIConfig is for common configuration related to creating AMIs.
|
||||
|
|
|
@ -1,71 +1,71 @@
|
|||
<!-- Code generated from the comments of the AccessConfig struct in builder/amazon/common/access_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `custom_endpoint_ec2` (string) - This option is useful if you use a cloud
|
||||
provider whose API is compatible with aws EC2. Specify another endpoint
|
||||
like this https://ec2.custom.endpoint.com.
|
||||
|
||||
- `decode_authorization_messages` (bool) - Enable automatic decoding of any encoded authorization (error) messages
|
||||
using the `sts:DecodeAuthorizationMessage` API. Note: requires that the
|
||||
effective user/role have permissions to `sts:DecodeAuthorizationMessage`
|
||||
on resource `*`. Default `false`.
|
||||
|
||||
- `insecure_skip_tls_verify` (bool) - This allows skipping TLS
|
||||
verification of the AWS EC2 endpoint. The default is false.
|
||||
|
||||
- `max_retries` (int) - This is the maximum number of times an API call is retried, in the case
|
||||
where requests are being throttled or experiencing transient failures.
|
||||
The delay between the subsequent API calls increases exponentially.
|
||||
|
||||
- `mfa_code` (string) - The MFA
|
||||
[TOTP](https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm)
|
||||
code. This should probably be a user variable since it changes all the
|
||||
time.
|
||||
|
||||
- `profile` (string) - The profile to use in the shared credentials file for
|
||||
AWS. See Amazon's documentation on [specifying
|
||||
profiles](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-profiles)
|
||||
for more details.
|
||||
|
||||
- `skip_region_validation` (bool) - Set to true if you want to skip
|
||||
validation of the ami_regions configuration option. Default false.
|
||||
|
||||
- `skip_metadata_api_check` (bool) - Skip Metadata Api Check
|
||||
- `token` (string) - The access token to use. This is different from the
|
||||
access key and secret key. If you're not sure what this is, then you
|
||||
probably don't need it. This will also be read from the AWS_SESSION_TOKEN
|
||||
environmental variable.
|
||||
|
||||
- `vault_aws_engine` (VaultAWSEngineOptions) - Get credentials from Hashicorp Vault's aws secrets engine. You must
|
||||
already have created a role to use. For more information about
|
||||
generating credentials via the Vault engine, see the [Vault
|
||||
docs.](https://www.vaultproject.io/api/secret/aws#generate-credentials)
|
||||
If you set this flag, you must also set the below options:
|
||||
- `name` (string) - Required. Specifies the name of the role to generate
|
||||
credentials against. This is part of the request URL.
|
||||
- `engine_name` (string) - The name of the aws secrets engine. In the
|
||||
Vault docs, this is normally referred to as "aws", and Packer will
|
||||
default to "aws" if `engine_name` is not set.
|
||||
- `role_arn` (string)- The ARN of the role to assume if credential\_type
|
||||
on the Vault role is assumed\_role. Must match one of the allowed role
|
||||
ARNs in the Vault role. Optional if the Vault role only allows a single
|
||||
AWS role ARN; required otherwise.
|
||||
- `ttl` (string) - Specifies the TTL for the use of the STS token. This
|
||||
is specified as a string with a duration suffix. Valid only when
|
||||
credential\_type is assumed\_role or federation\_token. When not
|
||||
specified, the default\_sts\_ttl set for the role will be used. If that
|
||||
is also not set, then the default value of 3600s will be used. AWS
|
||||
places limits on the maximum TTL allowed. See the AWS documentation on
|
||||
the DurationSeconds parameter for AssumeRole (for assumed\_role
|
||||
credential types) and GetFederationToken (for federation\_token
|
||||
credential types) for more details.
|
||||
|
||||
```json
|
||||
{
|
||||
"vault_aws_engine": {
|
||||
"name": "myrole",
|
||||
"role_arn": "myarn",
|
||||
"ttl": "3600s"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `custom_endpoint_ec2` (string) - This option is useful if you use a cloud
|
||||
provider whose API is compatible with aws EC2. Specify another endpoint
|
||||
like this https://ec2.custom.endpoint.com.
|
||||
|
||||
- `decode_authorization_messages` (bool) - Enable automatic decoding of any encoded authorization (error) messages
|
||||
using the `sts:DecodeAuthorizationMessage` API. Note: requires that the
|
||||
effective user/role have permissions to `sts:DecodeAuthorizationMessage`
|
||||
on resource `*`. Default `false`.
|
||||
|
||||
- `insecure_skip_tls_verify` (bool) - This allows skipping TLS
|
||||
verification of the AWS EC2 endpoint. The default is false.
|
||||
|
||||
- `max_retries` (int) - This is the maximum number of times an API call is retried, in the case
|
||||
where requests are being throttled or experiencing transient failures.
|
||||
The delay between the subsequent API calls increases exponentially.
|
||||
|
||||
- `mfa_code` (string) - The MFA
|
||||
[TOTP](https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm)
|
||||
code. This should probably be a user variable since it changes all the
|
||||
time.
|
||||
|
||||
- `profile` (string) - The profile to use in the shared credentials file for
|
||||
AWS. See Amazon's documentation on [specifying
|
||||
profiles](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-profiles)
|
||||
for more details.
|
||||
|
||||
- `skip_region_validation` (bool) - Set to true if you want to skip
|
||||
validation of the ami_regions configuration option. Default false.
|
||||
|
||||
- `skip_metadata_api_check` (bool) - Skip Metadata Api Check
|
||||
|
||||
- `token` (string) - The access token to use. This is different from the
|
||||
access key and secret key. If you're not sure what this is, then you
|
||||
probably don't need it. This will also be read from the AWS_SESSION_TOKEN
|
||||
environmental variable.
|
||||
|
||||
- `vault_aws_engine` (VaultAWSEngineOptions) - Get credentials from Hashicorp Vault's aws secrets engine. You must
|
||||
already have created a role to use. For more information about
|
||||
generating credentials via the Vault engine, see the [Vault
|
||||
docs.](https://www.vaultproject.io/api/secret/aws#generate-credentials)
|
||||
If you set this flag, you must also set the below options:
|
||||
- `name` (string) - Required. Specifies the name of the role to generate
|
||||
credentials against. This is part of the request URL.
|
||||
- `engine_name` (string) - The name of the aws secrets engine. In the
|
||||
Vault docs, this is normally referred to as "aws", and Packer will
|
||||
default to "aws" if `engine_name` is not set.
|
||||
- `role_arn` (string)- The ARN of the role to assume if credential\_type
|
||||
on the Vault role is assumed\_role. Must match one of the allowed role
|
||||
ARNs in the Vault role. Optional if the Vault role only allows a single
|
||||
AWS role ARN; required otherwise.
|
||||
- `ttl` (string) - Specifies the TTL for the use of the STS token. This
|
||||
is specified as a string with a duration suffix. Valid only when
|
||||
credential\_type is assumed\_role or federation\_token. When not
|
||||
specified, the default\_sts\_ttl set for the role will be used. If that
|
||||
is also not set, then the default value of 3600s will be used. AWS
|
||||
places limits on the maximum TTL allowed. See the AWS documentation on
|
||||
the DurationSeconds parameter for AssumeRole (for assumed\_role
|
||||
credential types) and GetFederationToken (for federation\_token
|
||||
credential types) for more details.
|
||||
|
||||
```json
|
||||
{
|
||||
"vault_aws_engine": {
|
||||
"name": "myrole",
|
||||
"role_arn": "myarn",
|
||||
"ttl": "3600s"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
<!-- Code generated from the comments of the AccessConfig struct in builder/amazon/common/access_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `access_key` (string) - The access key used to communicate with AWS. [Learn how to set this]
|
||||
(/docs/builders/amazon#specifying-amazon-credentials). On EBS, this
|
||||
is not required if you are using `use_vault_aws_engine` for
|
||||
authentication instead.
|
||||
|
||||
- `region` (string) - The name of the region, such as `us-east-1`, in which
|
||||
to launch the EC2 instance to create the AMI.
|
||||
When chroot building, this value is guessed from environment.
|
||||
|
||||
- `secret_key` (string) - The secret key used to communicate with AWS. [Learn how to set
|
||||
this](/docs/builders/amazon#specifying-amazon-credentials). This is not required
|
||||
if you are using `use_vault_aws_engine` for authentication instead.
|
||||
|
||||
- `access_key` (string) - The access key used to communicate with AWS. [Learn how to set this]
|
||||
(/docs/builders/amazon#specifying-amazon-credentials). On EBS, this
|
||||
is not required if you are using `use_vault_aws_engine` for
|
||||
authentication instead.
|
||||
|
||||
- `region` (string) - The name of the region, such as `us-east-1`, in which
|
||||
to launch the EC2 instance to create the AMI.
|
||||
When chroot building, this value is guessed from environment.
|
||||
|
||||
- `secret_key` (string) - The secret key used to communicate with AWS. [Learn how to set
|
||||
this](/docs/builders/amazon#specifying-amazon-credentials). This is not required
|
||||
if you are using `use_vault_aws_engine` for authentication instead.
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
<!-- Code generated from the comments of the AccessConfig struct in builder/amazon/common/access_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
AccessConfig is for common configuration related to AWS access
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<!-- Code generated from the comments of the AmiFilterOptions struct in builder/amazon/common/run_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `most_recent` (bool) - Most Recent
|
||||
- `most_recent` (bool) - Most Recent
|
||||
|
|
|
@ -1,43 +1,42 @@
|
|||
<!-- Code generated from the comments of the BlockDevice struct in builder/amazon/common/block_device.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `delete_on_termination` (bool) - Indicates whether the EBS volume is deleted on instance termination.
|
||||
Default false. NOTE: If this value is not explicitly set to true and
|
||||
volumes are not cleaned up by an alternative method, additional volumes
|
||||
will accumulate after every build.
|
||||
|
||||
- `device_name` (string) - The device name exposed to the instance (for example, /dev/sdh or xvdh).
|
||||
Required for every device in the block device mapping.
|
||||
|
||||
- `encrypted` (boolean) - Indicates whether or not to encrypt the volume. By default, Packer will
|
||||
keep the encryption setting to what it was in the source image. Setting
|
||||
false will result in an unencrypted device, and true will result in an
|
||||
encrypted one.
|
||||
|
||||
- `iops` (int64) - The number of I/O operations per second (IOPS) that the volume supports.
|
||||
See the documentation on
|
||||
[IOPs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
|
||||
for more information
|
||||
|
||||
- `no_device` (bool) - Suppresses the specified device included in the block device mapping of
|
||||
the AMI.
|
||||
|
||||
- `snapshot_id` (string) - The ID of the snapshot.
|
||||
|
||||
- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping
|
||||
for more information.
|
||||
|
||||
- `volume_type` (string) - The volume type. gp2 for General Purpose (SSD) volumes, io1 for
|
||||
Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD, sc1
|
||||
for Cold HDD, and standard for Magnetic volumes.
|
||||
|
||||
- `volume_size` (int64) - The size of the volume, in GiB. Required if not specifying a
|
||||
snapshot_id.
|
||||
|
||||
- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption. This
|
||||
only applies to the main region, other regions where the AMI will be
|
||||
copied will be encrypted by the default EBS KMS key. For valid formats
|
||||
see KmsKeyId in the [AWS API docs -
|
||||
CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html)
|
||||
This field is validated by Packer, when using an alias, you will have to
|
||||
prefix kms_key_id with alias/.
|
||||
|
||||
- `delete_on_termination` (bool) - Indicates whether the EBS volume is deleted on instance termination.
|
||||
Default false. NOTE: If this value is not explicitly set to true and
|
||||
volumes are not cleaned up by an alternative method, additional volumes
|
||||
will accumulate after every build.
|
||||
|
||||
- `device_name` (string) - The device name exposed to the instance (for example, /dev/sdh or xvdh).
|
||||
Required for every device in the block device mapping.
|
||||
|
||||
- `encrypted` (boolean) - Indicates whether or not to encrypt the volume. By default, Packer will
|
||||
keep the encryption setting to what it was in the source image. Setting
|
||||
false will result in an unencrypted device, and true will result in an
|
||||
encrypted one.
|
||||
|
||||
- `iops` (int64) - The number of I/O operations per second (IOPS) that the volume supports.
|
||||
See the documentation on
|
||||
[IOPs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html)
|
||||
for more information
|
||||
|
||||
- `no_device` (bool) - Suppresses the specified device included in the block device mapping of
|
||||
the AMI.
|
||||
|
||||
- `snapshot_id` (string) - The ID of the snapshot.
|
||||
|
||||
- `virtual_name` (string) - The virtual device name. See the documentation on Block Device Mapping
|
||||
for more information.
|
||||
|
||||
- `volume_type` (string) - The volume type. gp2 for General Purpose (SSD) volumes, io1 for
|
||||
Provisioned IOPS (SSD) volumes, st1 for Throughput Optimized HDD, sc1
|
||||
for Cold HDD, and standard for Magnetic volumes.
|
||||
|
||||
- `volume_size` (int64) - The size of the volume, in GiB. Required if not specifying a
|
||||
snapshot_id.
|
||||
|
||||
- `kms_key_id` (string) - ID, alias or ARN of the KMS key to use for boot volume encryption. This
|
||||
only applies to the main region, other regions where the AMI will be
|
||||
copied will be encrypted by the default EBS KMS key. For valid formats
|
||||
see KmsKeyId in the [AWS API docs -
|
||||
CopyImage](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CopyImage.html)
|
||||
This field is validated by Packer, when using an alias, you will have to
|
||||
prefix kms_key_id with alias/.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<!-- Code generated from the comments of the BlockDevice struct in builder/amazon/common/block_device.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
These will be attached when booting a new instance from your AMI. Your
|
||||
options here may vary depending on the type of VM you use.
|
||||
|
||||
|
|
|
@ -1,325 +1,324 @@
|
|||
<!-- Code generated from the comments of the RunConfig struct in builder/amazon/common/run_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `associate_public_ip_address` (bool) - If using a non-default VPC,
|
||||
public IP addresses are not provided by default. If this is true, your
|
||||
new instance will get a Public IP. default: false
|
||||
|
||||
- `availability_zone` (string) - Destination availability zone to launch
|
||||
instance in. Leave this empty to allow Amazon to auto-assign.
|
||||
|
||||
- `block_duration_minutes` (int64) - Requires spot_price to be set. The
|
||||
required duration for the Spot Instances (also known as Spot blocks). This
|
||||
value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). You can't
|
||||
specify an Availability Zone group or a launch group if you specify a
|
||||
duration.
|
||||
|
||||
- `disable_stop_instance` (bool) - Packer normally stops the build instance after all provisioners have
|
||||
run. For Windows instances, it is sometimes desirable to [run
|
||||
Sysprep](http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ami-create-standard.html)
|
||||
which will stop the instance for you. If this is set to `true`, Packer
|
||||
*will not* stop the instance but will assume that you will send the stop
|
||||
signal yourself through your final provisioner. You can do this with a
|
||||
[windows-shell
|
||||
provisioner](/docs/provisioners/windows-shell).
|
||||
Note that Packer will still wait for the instance to be stopped, and
|
||||
failing to send the stop signal yourself, when you have set this flag to
|
||||
`true`, will cause a timeout.
|
||||
Example of a valid shutdown command:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "windows-shell",
|
||||
"inline": ["\"c:\\Program Files\\Amazon\\Ec2ConfigService\\ec2config.exe\" -sysprep"]
|
||||
- `associate_public_ip_address` (bool) - If using a non-default VPC,
|
||||
public IP addresses are not provided by default. If this is true, your
|
||||
new instance will get a Public IP. default: false
|
||||
|
||||
- `availability_zone` (string) - Destination availability zone to launch
|
||||
instance in. Leave this empty to allow Amazon to auto-assign.
|
||||
|
||||
- `block_duration_minutes` (int64) - Requires spot_price to be set. The
|
||||
required duration for the Spot Instances (also known as Spot blocks). This
|
||||
value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). You can't
|
||||
specify an Availability Zone group or a launch group if you specify a
|
||||
duration.
|
||||
|
||||
- `disable_stop_instance` (bool) - Packer normally stops the build instance after all provisioners have
|
||||
run. For Windows instances, it is sometimes desirable to [run
|
||||
Sysprep](http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ami-create-standard.html)
|
||||
which will stop the instance for you. If this is set to `true`, Packer
|
||||
*will not* stop the instance but will assume that you will send the stop
|
||||
signal yourself through your final provisioner. You can do this with a
|
||||
[windows-shell
|
||||
provisioner](/docs/provisioners/windows-shell).
|
||||
Note that Packer will still wait for the instance to be stopped, and
|
||||
failing to send the stop signal yourself, when you have set this flag to
|
||||
`true`, will cause a timeout.
|
||||
Example of a valid shutdown command:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "windows-shell",
|
||||
"inline": ["\"c:\\Program Files\\Amazon\\Ec2ConfigService\\ec2config.exe\" -sysprep"]
|
||||
}
|
||||
```
|
||||
|
||||
- `ebs_optimized` (bool) - Mark instance as [EBS
|
||||
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
|
||||
Default `false`.
|
||||
|
||||
- `enable_t2_unlimited` (bool) - Enabling T2 Unlimited allows the source instance to burst additional CPU
|
||||
beyond its available [CPU
|
||||
Credits](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-credits-baseline-concepts.html)
|
||||
for as long as the demand exists. This is in contrast to the standard
|
||||
configuration that only allows an instance to consume up to its
|
||||
available CPU Credits. See the AWS documentation for [T2
|
||||
Unlimited](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-unlimited.html)
|
||||
and the **T2 Unlimited Pricing** section of the [Amazon EC2 On-Demand
|
||||
Pricing](https://aws.amazon.com/ec2/pricing/on-demand/) document for
|
||||
more information. By default this option is disabled and Packer will set
|
||||
up a [T2
|
||||
Standard](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-std.html)
|
||||
instance instead.
|
||||
|
||||
To use T2 Unlimited you must use a T2 instance type, e.g. `t2.micro`.
|
||||
Additionally, T2 Unlimited cannot be used in conjunction with Spot
|
||||
Instances, e.g. when the `spot_price` option has been configured.
|
||||
Attempting to do so will cause an error.
|
||||
|
||||
!> **Warning!** Additional costs may be incurred by enabling T2
|
||||
Unlimited - even for instances that would usually qualify for the
|
||||
[AWS Free Tier](https://aws.amazon.com/free/).
|
||||
|
||||
- `iam_instance_profile` (string) - The name of an [IAM instance
|
||||
profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
|
||||
to launch the EC2 instance with.
|
||||
|
||||
- `skip_profile_validation` (bool) - Whether or not to check if the IAM instance profile exists. Defaults to false
|
||||
|
||||
- `temporary_iam_instance_profile_policy_document` (\*PolicyDocument) - Temporary IAM instance profile policy document
|
||||
If IamInstanceProfile is specified it will be used instead. Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Action": [
|
||||
"logs:*"
|
||||
],
|
||||
"Effect": "Allow",
|
||||
"Resource": "*"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
- `shutdown_behavior` (string) - Automatically terminate instances on
|
||||
shutdown in case Packer exits ungracefully. Possible values are stop and
|
||||
terminate. Defaults to stop.
|
||||
|
||||
- `security_group_filter` (SecurityGroupFilterOptions) - Filters used to populate the `security_group_ids` field. Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"security_group_filter": {
|
||||
"filters": {
|
||||
"tag:Class": "packer"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `ebs_optimized` (bool) - Mark instance as [EBS
|
||||
Optimized](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).
|
||||
Default `false`.
|
||||
|
||||
- `enable_t2_unlimited` (bool) - Enabling T2 Unlimited allows the source instance to burst additional CPU
|
||||
beyond its available [CPU
|
||||
Credits](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-credits-baseline-concepts.html)
|
||||
for as long as the demand exists. This is in contrast to the standard
|
||||
configuration that only allows an instance to consume up to its
|
||||
available CPU Credits. See the AWS documentation for [T2
|
||||
Unlimited](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-unlimited.html)
|
||||
and the **T2 Unlimited Pricing** section of the [Amazon EC2 On-Demand
|
||||
Pricing](https://aws.amazon.com/ec2/pricing/on-demand/) document for
|
||||
more information. By default this option is disabled and Packer will set
|
||||
up a [T2
|
||||
Standard](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-std.html)
|
||||
instance instead.
|
||||
|
||||
To use T2 Unlimited you must use a T2 instance type, e.g. `t2.micro`.
|
||||
Additionally, T2 Unlimited cannot be used in conjunction with Spot
|
||||
Instances, e.g. when the `spot_price` option has been configured.
|
||||
Attempting to do so will cause an error.
|
||||
|
||||
!> **Warning!** Additional costs may be incurred by enabling T2
|
||||
Unlimited - even for instances that would usually qualify for the
|
||||
[AWS Free Tier](https://aws.amazon.com/free/).
|
||||
|
||||
- `iam_instance_profile` (string) - The name of an [IAM instance
|
||||
profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html)
|
||||
to launch the EC2 instance with.
|
||||
|
||||
- `skip_profile_validation` (bool) - Whether or not to check if the IAM instance profile exists. Defaults to false
|
||||
|
||||
- `temporary_iam_instance_profile_policy_document` (\*PolicyDocument) - Temporary IAM instance profile policy document
|
||||
If IamInstanceProfile is specified it will be used instead. Example:
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
This selects the SG's with tag `Class` with the value `packer`.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a
|
||||
`security_group_ids`. Any filter described in the docs for
|
||||
[DescribeSecurityGroups](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
|
||||
is valid.
|
||||
|
||||
`security_group_ids` take precedence over this.
|
||||
|
||||
- `run_tags` (map[string]string) - Key/value pair tags to apply to the instance that is that is *launched*
|
||||
to create the EBS volumes. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `run_tag` ([]{key string, value string}) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable
|
||||
block containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `security_group_id` (string) - The ID (not the name) of the security
|
||||
group to assign to the instance. By default this is not set and Packer will
|
||||
automatically create a new temporary security group to allow SSH access.
|
||||
Note that if this is specified, you must be sure the security group allows
|
||||
access to the ssh_port given below.
|
||||
|
||||
- `security_group_ids` ([]string) - A list of security groups as
|
||||
described above. Note that if this is specified, you must omit the
|
||||
security_group_id.
|
||||
|
||||
- `source_ami_filter` (AmiFilterOptions) - Filters used to populate the `source_ami`
|
||||
field. Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Action": [
|
||||
"logs:*"
|
||||
],
|
||||
"Effect": "Allow",
|
||||
"Resource": "*"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
- `shutdown_behavior` (string) - Automatically terminate instances on
|
||||
shutdown in case Packer exits ungracefully. Possible values are stop and
|
||||
terminate. Defaults to stop.
|
||||
|
||||
- `security_group_filter` (SecurityGroupFilterOptions) - Filters used to populate the `security_group_ids` field. Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"security_group_filter": {
|
||||
"source_ami_filter": {
|
||||
"filters": {
|
||||
"tag:Class": "packer"
|
||||
}
|
||||
"virtualization-type": "hvm",
|
||||
"name": "ubuntu/images/\*ubuntu-xenial-16.04-amd64-server-\*",
|
||||
"root-device-type": "ebs"
|
||||
},
|
||||
"owners": ["099720109477"],
|
||||
"most_recent": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This selects the SG's with tag `Class` with the value `packer`.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a
|
||||
`security_group_ids`. Any filter described in the docs for
|
||||
[DescribeSecurityGroups](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
|
||||
is valid.
|
||||
|
||||
`security_group_ids` take precedence over this.
|
||||
|
||||
- `run_tags` (map[string]string) - Key/value pair tags to apply to the instance that is that is *launched*
|
||||
to create the EBS volumes. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `run_tag` ([]{key string, value string}) - Same as [`run_tags`](#run_tags) but defined as a singular repeatable
|
||||
block containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `security_group_id` (string) - The ID (not the name) of the security
|
||||
group to assign to the instance. By default this is not set and Packer will
|
||||
automatically create a new temporary security group to allow SSH access.
|
||||
Note that if this is specified, you must be sure the security group allows
|
||||
access to the ssh_port given below.
|
||||
|
||||
- `security_group_ids` ([]string) - A list of security groups as
|
||||
described above. Note that if this is specified, you must omit the
|
||||
security_group_id.
|
||||
|
||||
- `source_ami_filter` (AmiFilterOptions) - Filters used to populate the `source_ami`
|
||||
field. Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"source_ami_filter": {
|
||||
"filters": {
|
||||
"virtualization-type": "hvm",
|
||||
"name": "ubuntu/images/\*ubuntu-xenial-16.04-amd64-server-\*",
|
||||
"root-device-type": "ebs"
|
||||
},
|
||||
"owners": ["099720109477"],
|
||||
"most_recent": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. NOTE:
|
||||
This will fail unless *exactly* one AMI is returned. In the above example,
|
||||
`most_recent` will cause this to succeed by selecting the newest image.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a `source_ami`.
|
||||
NOTE: This will fail unless *exactly* one AMI is returned. Any filter
|
||||
described in the docs for
|
||||
[DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html)
|
||||
is valid.
|
||||
|
||||
- `owners` (array of strings) - Filters the images by their owner. You
|
||||
may specify one or more AWS account IDs, "self" (which will use the
|
||||
account whose credentials you are using to run Packer), or an AWS owner
|
||||
alias: for example, `amazon`, `aws-marketplace`, or `microsoft`. This
|
||||
option is required for security reasons.
|
||||
|
||||
- `most_recent` (boolean) - Selects the newest created image when true.
|
||||
This is most useful for selecting a daily distro build.
|
||||
|
||||
You may set this in place of `source_ami` or in conjunction with it. If you
|
||||
set this in conjunction with `source_ami`, the `source_ami` will be added
|
||||
to the filter. The provided `source_ami` must meet all of the filtering
|
||||
criteria provided in `source_ami_filter`; this pins the AMI returned by the
|
||||
filter, but will cause Packer to fail if the `source_ami` does not exist.
|
||||
|
||||
- `spot_instance_types` ([]string) - a list of acceptable instance
|
||||
types to run your build on. We will request a spot instance using the max
|
||||
price of spot_price and the allocation strategy of "lowest price".
|
||||
Your instance will be launched on an instance type of the lowest available
|
||||
price that you have in your list. This is used in place of instance_type.
|
||||
You may only set either spot_instance_types or instance_type, not both.
|
||||
This feature exists to help prevent situations where a Packer build fails
|
||||
because a particular availability zone does not have capacity for the
|
||||
specific instance_type requested in instance_type.
|
||||
|
||||
- `spot_price` (string) - With Spot Instances, you pay the Spot price that's in effect for the
|
||||
time period your instances are running. Spot Instance prices are set by
|
||||
Amazon EC2 and adjust gradually based on long-term trends in supply and
|
||||
demand for Spot Instance capacity.
|
||||
|
||||
When this field is set, it represents the maximum hourly price you are
|
||||
willing to pay for a spot instance. If you do not set this value, it
|
||||
defaults to a maximum price equal to the on demand price of the
|
||||
instance. In the situation where the current Amazon-set spot price
|
||||
exceeds the value set in this field, Packer will not launch an instance
|
||||
and the build will error. In the situation where the Amazon-set spot
|
||||
price is less than the value set in this field, Packer will launch and
|
||||
you will pay the Amazon-set spot price, not this maximum value.
|
||||
For more information, see the Amazon docs on
|
||||
[spot pricing](https://aws.amazon.com/ec2/spot/pricing/).
|
||||
|
||||
- `spot_tags` (map[string]string) - Requires spot_price to be set. Key/value pair tags to apply tags to the
|
||||
spot request that is issued.
|
||||
|
||||
- `spot_tag` ([]{key string, value string}) - Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block
|
||||
containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `subnet_filter` (SubnetFilterOptions) - Filters used to populate the `subnet_id` field.
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"subnet_filter": {
|
||||
"filters": {
|
||||
"tag:Class": "build"
|
||||
},
|
||||
"most_free": true,
|
||||
"random": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This selects the Subnet with tag `Class` with the value `build`, which has
|
||||
the most free IP addresses. NOTE: This will fail unless *exactly* one
|
||||
Subnet is returned. By using `most_free` or `random` one will be selected
|
||||
from those matching the filter.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a `subnet_id`.
|
||||
NOTE: This will fail unless *exactly* one Subnet is returned. Any
|
||||
filter described in the docs for
|
||||
[DescribeSubnets](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html)
|
||||
is valid.
|
||||
|
||||
- `most_free` (boolean) - The Subnet with the most free IPv4 addresses
|
||||
will be used if multiple Subnets matches the filter.
|
||||
|
||||
- `random` (boolean) - A random Subnet will be used if multiple Subnets
|
||||
matches the filter. `most_free` have precendence over this.
|
||||
|
||||
`subnet_id` take precedence over this.
|
||||
|
||||
- `subnet_id` (string) - If using VPC, the ID of the subnet, such as
|
||||
subnet-12345def, where Packer will launch the EC2 instance. This field is
|
||||
required if you are using an non-default VPC.
|
||||
|
||||
- `temporary_key_pair_name` (string) - The name of the temporary key pair to
|
||||
generate. By default, Packer generates a name that looks like
|
||||
`packer_<UUID>`, where <UUID> is a 36 character unique identifier.
|
||||
|
||||
- `temporary_security_group_source_cidrs` ([]string) - A list of IPv4 CIDR blocks to be authorized access to the instance, when
|
||||
packer is creating a temporary security group.
|
||||
|
||||
The default is [`0.0.0.0/0`] (i.e., allow any IPv4 source). This is only
|
||||
used when `security_group_id` or `security_group_ids` is not specified.
|
||||
|
||||
- `user_data` (string) - User data to apply when launching the instance. Note
|
||||
that you need to be careful about escaping characters due to the templates
|
||||
being JSON. It is often more convenient to use user_data_file, instead.
|
||||
Packer will not automatically wait for a user script to finish before
|
||||
shutting down the instance this must be handled in a provisioner.
|
||||
|
||||
- `user_data_file` (string) - Path to a file that will be used for the user
|
||||
data when launching the instance.
|
||||
|
||||
- `vpc_filter` (VpcFilterOptions) - Filters used to populate the `vpc_id` field.
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"vpc_filter": {
|
||||
"filters": {
|
||||
"tag:Class": "build",
|
||||
"isDefault": "false",
|
||||
"cidr": "/24"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This selects the VPC with tag `Class` with the value `build`, which is not
|
||||
the default VPC, and have a IPv4 CIDR block of `/24`. NOTE: This will fail
|
||||
unless *exactly* one VPC is returned.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a `vpc_id`. NOTE:
|
||||
This will fail unless *exactly* one VPC is returned. Any filter
|
||||
|
||||
This selects the most recent Ubuntu 16.04 HVM EBS AMI from Canonical. NOTE:
|
||||
This will fail unless *exactly* one AMI is returned. In the above example,
|
||||
`most_recent` will cause this to succeed by selecting the newest image.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a `source_ami`.
|
||||
NOTE: This will fail unless *exactly* one AMI is returned. Any filter
|
||||
described in the docs for
|
||||
[DescribeVpcs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html)
|
||||
[DescribeImages](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html)
|
||||
is valid.
|
||||
|
||||
`vpc_id` take precedence over this.
|
||||
|
||||
- `vpc_id` (string) - If launching into a VPC subnet, Packer needs the VPC ID
|
||||
in order to create a temporary security group within the VPC. Requires
|
||||
subnet_id to be set. If this field is left blank, Packer will try to get
|
||||
the VPC ID from the subnet_id.
|
||||
|
||||
- `windows_password_timeout` (duration string | ex: "1h5m2s") - The timeout for waiting for a Windows
|
||||
password for Windows instances. Defaults to 20 minutes. Example value:
|
||||
10m
|
||||
|
||||
- `ssh_interface` (string) - One of `public_ip`, `private_ip`, `public_dns`, `private_dns` or `session_manager`.
|
||||
If set, either the public IP address, private IP address, public DNS name
|
||||
or private DNS name will be used as the host for SSH. The default behaviour
|
||||
if inside a VPC is to use the public IP address if available, otherwise
|
||||
the private IP address will be used. If not in a VPC the public DNS name
|
||||
will be used. Also works for WinRM.
|
||||
|
||||
Where Packer is configured for an outbound proxy but WinRM traffic
|
||||
should be direct, `ssh_interface` must be set to `private_dns` and
|
||||
`<region>.compute.internal` included in the `NO_PROXY` environment
|
||||
variable.
|
||||
|
||||
When using `session_manager` the machine running Packer must have
|
||||
the AWS Session Manager Plugin installed and within the users' system path.
|
||||
Connectivity via the `session_manager` interface establishes a secure tunnel
|
||||
between the local host and the remote host on an available local port to the specified `ssh_port`.
|
||||
See [Session Manager Connections](#session-manager-connections) for more information.
|
||||
- Session manager connectivity is currently only implemented for the SSH communicator, not the WinRM communicator.
|
||||
- Upon termination the secure tunnel will be terminated automatically, if however there is a failure in
|
||||
terminating the tunnel it will automatically terminate itself after 20 minutes of inactivity.
|
||||
|
||||
- `session_manager_port` (int) - Which port to connect the local end of the session tunnel to. If
|
||||
left blank, Packer will choose a port for you from available ports.
|
||||
This option is only used when `ssh_interface` is set `session_manager`.
|
||||
|
||||
|
||||
- `owners` (array of strings) - Filters the images by their owner. You
|
||||
may specify one or more AWS account IDs, "self" (which will use the
|
||||
account whose credentials you are using to run Packer), or an AWS owner
|
||||
alias: for example, `amazon`, `aws-marketplace`, or `microsoft`. This
|
||||
option is required for security reasons.
|
||||
|
||||
- `most_recent` (boolean) - Selects the newest created image when true.
|
||||
This is most useful for selecting a daily distro build.
|
||||
|
||||
You may set this in place of `source_ami` or in conjunction with it. If you
|
||||
set this in conjunction with `source_ami`, the `source_ami` will be added
|
||||
to the filter. The provided `source_ami` must meet all of the filtering
|
||||
criteria provided in `source_ami_filter`; this pins the AMI returned by the
|
||||
filter, but will cause Packer to fail if the `source_ami` does not exist.
|
||||
|
||||
- `spot_instance_types` ([]string) - a list of acceptable instance
|
||||
types to run your build on. We will request a spot instance using the max
|
||||
price of spot_price and the allocation strategy of "lowest price".
|
||||
Your instance will be launched on an instance type of the lowest available
|
||||
price that you have in your list. This is used in place of instance_type.
|
||||
You may only set either spot_instance_types or instance_type, not both.
|
||||
This feature exists to help prevent situations where a Packer build fails
|
||||
because a particular availability zone does not have capacity for the
|
||||
specific instance_type requested in instance_type.
|
||||
|
||||
- `spot_price` (string) - With Spot Instances, you pay the Spot price that's in effect for the
|
||||
time period your instances are running. Spot Instance prices are set by
|
||||
Amazon EC2 and adjust gradually based on long-term trends in supply and
|
||||
demand for Spot Instance capacity.
|
||||
|
||||
When this field is set, it represents the maximum hourly price you are
|
||||
willing to pay for a spot instance. If you do not set this value, it
|
||||
defaults to a maximum price equal to the on demand price of the
|
||||
instance. In the situation where the current Amazon-set spot price
|
||||
exceeds the value set in this field, Packer will not launch an instance
|
||||
and the build will error. In the situation where the Amazon-set spot
|
||||
price is less than the value set in this field, Packer will launch and
|
||||
you will pay the Amazon-set spot price, not this maximum value.
|
||||
For more information, see the Amazon docs on
|
||||
[spot pricing](https://aws.amazon.com/ec2/spot/pricing/).
|
||||
|
||||
- `spot_tags` (map[string]string) - Requires spot_price to be set. Key/value pair tags to apply tags to the
|
||||
spot request that is issued.
|
||||
|
||||
- `spot_tag` ([]{key string, value string}) - Same as [`spot_tags`](#spot_tags) but defined as a singular repeatable block
|
||||
containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `subnet_filter` (SubnetFilterOptions) - Filters used to populate the `subnet_id` field.
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"subnet_filter": {
|
||||
"filters": {
|
||||
"tag:Class": "build"
|
||||
},
|
||||
"most_free": true,
|
||||
"random": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This selects the Subnet with tag `Class` with the value `build`, which has
|
||||
the most free IP addresses. NOTE: This will fail unless *exactly* one
|
||||
Subnet is returned. By using `most_free` or `random` one will be selected
|
||||
from those matching the filter.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a `subnet_id`.
|
||||
NOTE: This will fail unless *exactly* one Subnet is returned. Any
|
||||
filter described in the docs for
|
||||
[DescribeSubnets](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html)
|
||||
is valid.
|
||||
|
||||
- `most_free` (boolean) - The Subnet with the most free IPv4 addresses
|
||||
will be used if multiple Subnets matches the filter.
|
||||
|
||||
- `random` (boolean) - A random Subnet will be used if multiple Subnets
|
||||
matches the filter. `most_free` have precendence over this.
|
||||
|
||||
`subnet_id` take precedence over this.
|
||||
|
||||
- `subnet_id` (string) - If using VPC, the ID of the subnet, such as
|
||||
subnet-12345def, where Packer will launch the EC2 instance. This field is
|
||||
required if you are using an non-default VPC.
|
||||
|
||||
- `temporary_key_pair_name` (string) - The name of the temporary key pair to
|
||||
generate. By default, Packer generates a name that looks like
|
||||
`packer_<UUID>`, where <UUID> is a 36 character unique identifier.
|
||||
|
||||
- `temporary_security_group_source_cidrs` ([]string) - A list of IPv4 CIDR blocks to be authorized access to the instance, when
|
||||
packer is creating a temporary security group.
|
||||
|
||||
The default is [`0.0.0.0/0`] (i.e., allow any IPv4 source). This is only
|
||||
used when `security_group_id` or `security_group_ids` is not specified.
|
||||
|
||||
- `user_data` (string) - User data to apply when launching the instance. Note
|
||||
that you need to be careful about escaping characters due to the templates
|
||||
being JSON. It is often more convenient to use user_data_file, instead.
|
||||
Packer will not automatically wait for a user script to finish before
|
||||
shutting down the instance this must be handled in a provisioner.
|
||||
|
||||
- `user_data_file` (string) - Path to a file that will be used for the user
|
||||
data when launching the instance.
|
||||
|
||||
- `vpc_filter` (VpcFilterOptions) - Filters used to populate the `vpc_id` field.
|
||||
Example:
|
||||
|
||||
```json
|
||||
{
|
||||
"vpc_filter": {
|
||||
"filters": {
|
||||
"tag:Class": "build",
|
||||
"isDefault": "false",
|
||||
"cidr": "/24"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This selects the VPC with tag `Class` with the value `build`, which is not
|
||||
the default VPC, and have a IPv4 CIDR block of `/24`. NOTE: This will fail
|
||||
unless *exactly* one VPC is returned.
|
||||
|
||||
- `filters` (map of strings) - filters used to select a `vpc_id`. NOTE:
|
||||
This will fail unless *exactly* one VPC is returned. Any filter
|
||||
described in the docs for
|
||||
[DescribeVpcs](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html)
|
||||
is valid.
|
||||
|
||||
`vpc_id` take precedence over this.
|
||||
|
||||
- `vpc_id` (string) - If launching into a VPC subnet, Packer needs the VPC ID
|
||||
in order to create a temporary security group within the VPC. Requires
|
||||
subnet_id to be set. If this field is left blank, Packer will try to get
|
||||
the VPC ID from the subnet_id.
|
||||
|
||||
- `windows_password_timeout` (duration string | ex: "1h5m2s") - The timeout for waiting for a Windows
|
||||
password for Windows instances. Defaults to 20 minutes. Example value:
|
||||
10m
|
||||
|
||||
- `ssh_interface` (string) - One of `public_ip`, `private_ip`, `public_dns`, `private_dns` or `session_manager`.
|
||||
If set, either the public IP address, private IP address, public DNS name
|
||||
or private DNS name will be used as the host for SSH. The default behaviour
|
||||
if inside a VPC is to use the public IP address if available, otherwise
|
||||
the private IP address will be used. If not in a VPC the public DNS name
|
||||
will be used. Also works for WinRM.
|
||||
|
||||
Where Packer is configured for an outbound proxy but WinRM traffic
|
||||
should be direct, `ssh_interface` must be set to `private_dns` and
|
||||
`<region>.compute.internal` included in the `NO_PROXY` environment
|
||||
variable.
|
||||
|
||||
When using `session_manager` the machine running Packer must have
|
||||
the AWS Session Manager Plugin installed and within the users' system path.
|
||||
Connectivity via the `session_manager` interface establishes a secure tunnel
|
||||
between the local host and the remote host on an available local port to the specified `ssh_port`.
|
||||
See [Session Manager Connections](#session-manager-connections) for more information.
|
||||
- Session manager connectivity is currently only implemented for the SSH communicator, not the WinRM communicator.
|
||||
- Upon termination the secure tunnel will be terminated automatically, if however there is a failure in
|
||||
terminating the tunnel it will automatically terminate itself after 20 minutes of inactivity.
|
||||
|
||||
- `session_manager_port` (int) - Which port to connect the local end of the session tunnel to. If
|
||||
left blank, Packer will choose a port for you from available ports.
|
||||
This option is only used when `ssh_interface` is set `session_manager`.
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<!-- Code generated from the comments of the RunConfig struct in builder/amazon/common/run_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `instance_type` (string) - The EC2 instance type to use while building the
|
||||
AMI, such as t2.small.
|
||||
|
||||
- `source_ami` (string) - The source AMI whose root volume will be copied and
|
||||
provisioned on the currently running instance. This must be an EBS-backed
|
||||
AMI with a root volume snapshot that you have access to. Note: this is not
|
||||
used when from_scratch is set to true.
|
||||
|
||||
- `instance_type` (string) - The EC2 instance type to use while building the
|
||||
AMI, such as t2.small.
|
||||
|
||||
- `source_ami` (string) - The source AMI whose root volume will be copied and
|
||||
provisioned on the currently running instance. This must be an EBS-backed
|
||||
AMI with a root volume snapshot that you have access to. Note: this is not
|
||||
used when from_scratch is set to true.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- Code generated from the comments of the RunConfig struct in builder/amazon/common/run_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
RunConfig contains configuration for running an instance from a source
|
||||
AMI and details on how to access that launched image.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<!-- Code generated from the comments of the SubnetFilterOptions struct in builder/amazon/common/run_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `most_free` (bool) - Most Free
|
||||
- `random` (bool) - Random
|
||||
- `most_free` (bool) - Most Free
|
||||
|
||||
- `random` (bool) - Random
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
<!-- Code generated from the comments of the VaultAWSEngineOptions struct in builder/amazon/common/access_config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `name` (string) - Name
|
||||
- `role_arn` (string) - Role ARN
|
||||
- `ttl` (string) - Specifies the TTL for the use of the STS token. This
|
||||
is specified as a string with a duration suffix. Valid only when
|
||||
credential_type is assumed_role or federation_token. When not
|
||||
specified, the default_sts_ttl set for the role will be used. If that
|
||||
is also not set, then the default value of 3600s will be used. AWS
|
||||
places limits on the maximum TTL allowed. See the AWS documentation on
|
||||
the DurationSeconds parameter for AssumeRole (for assumed_role
|
||||
credential types) and GetFederationToken (for federation_token
|
||||
credential types) for more details.
|
||||
|
||||
- `engine_name` (string) - Engine Name
|
||||
- `name` (string) - Name
|
||||
|
||||
- `role_arn` (string) - Role ARN
|
||||
|
||||
- `ttl` (string) - Specifies the TTL for the use of the STS token. This
|
||||
is specified as a string with a duration suffix. Valid only when
|
||||
credential_type is assumed_role or federation_token. When not
|
||||
specified, the default_sts_ttl set for the role will be used. If that
|
||||
is also not set, then the default value of 3600s will be used. AWS
|
||||
places limits on the maximum TTL allowed. See the AWS documentation on
|
||||
the DurationSeconds parameter for AssumeRole (for assumed_role
|
||||
credential types) and GetFederationToken (for federation_token
|
||||
credential types) for more details.
|
||||
|
||||
- `engine_name` (string) - Engine Name
|
||||
|
|
|
@ -1,39 +1,38 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/ebs/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached
|
||||
when booting a new instance from your AMI. To add a block device during
|
||||
the Packer build see `launch_block_device_mappings` below. Your options
|
||||
here may vary depending on the type of VM you use. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `launch_block_device_mappings` (awscommon.BlockDevices) - Add one or more block devices before the Packer build starts. If you add
|
||||
instance store volumes or EBS volumes in addition to the root device
|
||||
volume, the created AMI will contain block device mapping information
|
||||
for those volumes. Amazon creates snapshots of the source instance's
|
||||
root volume and any other EBS volumes described here. When you launch an
|
||||
instance from this new AMI, the instance automatically launches with
|
||||
these additional volumes, and will restore them from snapshots taken
|
||||
from the source instance. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `run_volume_tags` (map[string]string) - Tags to apply to the volumes that are *launched* to create the AMI.
|
||||
These tags are *not* applied to the resulting AMI unless they're
|
||||
duplicated in `tags`. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `run_volume_tag` ([]{name string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
|
||||
block containing a `name` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `no_ephemeral` (bool) - Relevant only to Windows guests: If you set this flag, we'll add clauses
|
||||
to the launch_block_device_mappings that make sure ephemeral drives
|
||||
don't show up in the EC2 console. If you launched from the EC2 console,
|
||||
you'd get this automatically, but the SDK does not provide this service.
|
||||
For more information, see
|
||||
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/InstanceStorage.html.
|
||||
Because we don't validate the OS type of your guest, it is up to you to
|
||||
make sure you don't set this for *nix guests; behavior may be
|
||||
unpredictable.
|
||||
|
||||
- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached
|
||||
when booting a new instance from your AMI. To add a block device during
|
||||
the Packer build see `launch_block_device_mappings` below. Your options
|
||||
here may vary depending on the type of VM you use. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `launch_block_device_mappings` (awscommon.BlockDevices) - Add one or more block devices before the Packer build starts. If you add
|
||||
instance store volumes or EBS volumes in addition to the root device
|
||||
volume, the created AMI will contain block device mapping information
|
||||
for those volumes. Amazon creates snapshots of the source instance's
|
||||
root volume and any other EBS volumes described here. When you launch an
|
||||
instance from this new AMI, the instance automatically launches with
|
||||
these additional volumes, and will restore them from snapshots taken
|
||||
from the source instance. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `run_volume_tags` (map[string]string) - Tags to apply to the volumes that are *launched* to create the AMI.
|
||||
These tags are *not* applied to the resulting AMI unless they're
|
||||
duplicated in `tags`. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `run_volume_tag` ([]{name string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
|
||||
block containing a `name` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `no_ephemeral` (bool) - Relevant only to Windows guests: If you set this flag, we'll add clauses
|
||||
to the launch_block_device_mappings that make sure ephemeral drives
|
||||
don't show up in the EC2 console. If you launched from the EC2 console,
|
||||
you'd get this automatically, but the SDK does not provide this service.
|
||||
For more information, see
|
||||
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/InstanceStorage.html.
|
||||
Because we don't validate the OS type of your guest, it is up to you to
|
||||
make sure you don't set this for *nix guests; behavior may be
|
||||
unpredictable.
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<!-- Code generated from the comments of the BlockDevice struct in builder/amazon/ebssurrogate/block_device.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `omit_from_artifact` (bool) - If true, this block device will not be snapshotted and the created AMI
|
||||
will not contain block device mapping information for this volume. If
|
||||
false, the block device will be mapped into the final created AMI. Set
|
||||
this option to true if you need a block device mounted in the surrogate
|
||||
AMI but not in the final created AMI.
|
||||
|
||||
- `omit_from_artifact` (bool) - If true, this block device will not be snapshotted and the created AMI
|
||||
will not contain block device mapping information for this volume. If
|
||||
false, the block device will be mapped into the final created AMI. Set
|
||||
this option to true if you need a block device mounted in the surrogate
|
||||
AMI but not in the final created AMI.
|
||||
|
|
|
@ -1,32 +1,31 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/ebssurrogate/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached
|
||||
when booting a new instance from your AMI. To add a block device during
|
||||
the Packer build see `launch_block_device_mappings` below. Your options
|
||||
here may vary depending on the type of VM you use. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `launch_block_device_mappings` (BlockDevices) - Add one or more block devices before the Packer build starts. If you add
|
||||
instance store volumes or EBS volumes in addition to the root device
|
||||
volume, the created AMI will contain block device mapping information
|
||||
for those volumes. Amazon creates snapshots of the source instance's
|
||||
root volume and any other EBS volumes described here. When you launch an
|
||||
instance from this new AMI, the instance automatically launches with
|
||||
these additional volumes, and will restore them from snapshots taken
|
||||
from the source instance. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `run_volume_tags` (map[string]string) - Tags to apply to the volumes that are *launched* to create the AMI.
|
||||
These tags are *not* applied to the resulting AMI unless they're
|
||||
duplicated in `tags`. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `run_volume_tag` ([]{name string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
|
||||
block containing a `name` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `ami_architecture` (string) - what architecture to use when registering the
|
||||
final AMI; valid options are "x86_64" or "arm64". Defaults to "x86_64".
|
||||
|
||||
- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached
|
||||
when booting a new instance from your AMI. To add a block device during
|
||||
the Packer build see `launch_block_device_mappings` below. Your options
|
||||
here may vary depending on the type of VM you use. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `launch_block_device_mappings` (BlockDevices) - Add one or more block devices before the Packer build starts. If you add
|
||||
instance store volumes or EBS volumes in addition to the root device
|
||||
volume, the created AMI will contain block device mapping information
|
||||
for those volumes. Amazon creates snapshots of the source instance's
|
||||
root volume and any other EBS volumes described here. When you launch an
|
||||
instance from this new AMI, the instance automatically launches with
|
||||
these additional volumes, and will restore them from snapshots taken
|
||||
from the source instance. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `run_volume_tags` (map[string]string) - Tags to apply to the volumes that are *launched* to create the AMI.
|
||||
These tags are *not* applied to the resulting AMI unless they're
|
||||
duplicated in `tags`. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
- `run_volume_tag` ([]{name string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
|
||||
block containing a `name` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](https://packer.io/docs/configuration/from-1.5/expressions.html#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `ami_architecture` (string) - what architecture to use when registering the
|
||||
final AMI; valid options are "x86_64" or "arm64". Defaults to "x86_64".
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/ebssurrogate/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `ami_root_device` (RootBlockDevice) - A block device mapping describing the root device of the AMI. This looks
|
||||
like the mappings in `ami_block_device_mapping`, except with an
|
||||
additional field:
|
||||
|
||||
- `source_device_name` (string) - The device name of the block device on
|
||||
the source instance to be used as the root device for the AMI. This
|
||||
must correspond to a block device in `launch_block_device_mapping`.
|
||||
|
||||
- `ami_root_device` (RootBlockDevice) - A block device mapping describing the root device of the AMI. This looks
|
||||
like the mappings in `ami_block_device_mapping`, except with an
|
||||
additional field:
|
||||
|
||||
- `source_device_name` (string) - The device name of the block device on
|
||||
the source instance to be used as the root device for the AMI. This
|
||||
must correspond to a block device in `launch_block_device_mapping`.
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
<!-- Code generated from the comments of the RootBlockDevice struct in builder/amazon/ebssurrogate/root_block_device.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `source_device_name` (string) - Source Device Name
|
||||
- `device_name` (string) - The device name exposed to the instance (for
|
||||
example, /dev/sdh or xvdh). Required for every device in the block
|
||||
device mapping.
|
||||
|
||||
- `delete_on_termination` (bool) - Indicates whether the EBS volume is
|
||||
deleted on instance termination. Default false. NOTE: If this
|
||||
value is not explicitly set to true and volumes are not cleaned up by
|
||||
an alternative method, additional volumes will accumulate after every
|
||||
build.
|
||||
|
||||
- `iops` (int64) - The number of I/O operations per second (IOPS) that
|
||||
the volume supports. See the documentation on
|
||||
IOPs
|
||||
for more information
|
||||
|
||||
- `volume_type` (string) - The volume type. gp2 for General Purpose
|
||||
(SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for
|
||||
Throughput Optimized HDD, sc1 for Cold HDD, and standard for
|
||||
Magnetic volumes.
|
||||
|
||||
- `volume_size` (int64) - The size of the volume, in GiB. Required if
|
||||
not specifying a snapshot_id.
|
||||
|
||||
- `source_device_name` (string) - Source Device Name
|
||||
|
||||
- `device_name` (string) - The device name exposed to the instance (for
|
||||
example, /dev/sdh or xvdh). Required for every device in the block
|
||||
device mapping.
|
||||
|
||||
- `delete_on_termination` (bool) - Indicates whether the EBS volume is
|
||||
deleted on instance termination. Default false. NOTE: If this
|
||||
value is not explicitly set to true and volumes are not cleaned up by
|
||||
an alternative method, additional volumes will accumulate after every
|
||||
build.
|
||||
|
||||
- `iops` (int64) - The number of I/O operations per second (IOPS) that
|
||||
the volume supports. See the documentation on
|
||||
IOPs
|
||||
for more information
|
||||
|
||||
- `volume_type` (string) - The volume type. gp2 for General Purpose
|
||||
(SSD) volumes, io1 for Provisioned IOPS (SSD) volumes, st1 for
|
||||
Throughput Optimized HDD, sc1 for Cold HDD, and standard for
|
||||
Magnetic volumes.
|
||||
|
||||
- `volume_size` (int64) - The size of the volume, in GiB. Required if
|
||||
not specifying a snapshot_id.
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
<!-- Code generated from the comments of the BlockDevice struct in builder/amazon/ebsvolume/block_device.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `tags` (map[string]string) - Key/value pair tags to apply to the volume. These are retained after the builder
|
||||
completes. This is a [template engine](/docs/templates/engine), see
|
||||
[Build template data](#build-template-data) for more information.
|
||||
|
||||
- `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
|
||||
containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `tags` (map[string]string) - Key/value pair tags to apply to the volume. These are retained after the builder
|
||||
completes. This is a [template engine](/docs/templates/engine), see
|
||||
[Build template data](#build-template-data) for more information.
|
||||
|
||||
- `tag` ([]{key string, value string}) - Same as [`tags`](#tags) but defined as a singular repeatable block
|
||||
containing a `key` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
|
|
@ -1,44 +1,43 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/ebsvolume/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on
|
||||
HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your
|
||||
AWS IAM policy. Note: you must make sure enhanced networking is enabled
|
||||
on your instance. See [Amazon's documentation on enabling enhanced
|
||||
networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
|
||||
|
||||
- `sriov_support` (bool) - Enable enhanced networking (SriovNetSupport but not ENA) on
|
||||
HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your
|
||||
AWS IAM policy. Note: you must make sure enhanced networking is enabled
|
||||
on your instance. See [Amazon's documentation on enabling enhanced
|
||||
networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
|
||||
Default `false`.
|
||||
|
||||
- `ebs_volumes` (BlockDevices) - Add the block device mappings to the AMI. If you add instance store
|
||||
volumes or EBS volumes in addition to the root device volume, the
|
||||
created AMI will contain block device mapping information for those
|
||||
volumes. Amazon creates snapshots of the source instance's root volume
|
||||
and any other EBS volumes described here. When you launch an instance
|
||||
from this new AMI, the instance automatically launches with these
|
||||
additional volumes, and will restore them from snapshots taken from the
|
||||
source instance. See the [BlockDevices](#block-devices-configuration)
|
||||
documentation for fields.
|
||||
|
||||
- `run_volume_tags` (map[string]string) - Key/value pair tags to apply to the volumes of the instance that is
|
||||
*launched* to create EBS Volumes. These tags will *not* appear in the
|
||||
tags of the resulting EBS volumes unless they're duplicated under `tags`
|
||||
in the `ebs_volumes` setting. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
Note: The tags specified here will be *temporarily* applied to volumes
|
||||
specified in `ebs_volumes` - but only while the instance is being
|
||||
created. Packer will replace all tags on the volume with the tags
|
||||
configured in the `ebs_volumes` section as soon as the instance is
|
||||
reported as 'ready'.
|
||||
|
||||
- `run_volume_tag` ([]{key string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
|
||||
repeatable block containing a `key` and a `value` field. In HCL2 mode
|
||||
the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `ena_support` (boolean) - Enable enhanced networking (ENA but not SriovNetSupport) on
|
||||
HVM-compatible AMIs. If set, add `ec2:ModifyInstanceAttribute` to your
|
||||
AWS IAM policy. Note: you must make sure enhanced networking is enabled
|
||||
on your instance. See [Amazon's documentation on enabling enhanced
|
||||
networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
|
||||
|
||||
- `sriov_support` (bool) - Enable enhanced networking (SriovNetSupport but not ENA) on
|
||||
HVM-compatible AMIs. If true, add `ec2:ModifyInstanceAttribute` to your
|
||||
AWS IAM policy. Note: you must make sure enhanced networking is enabled
|
||||
on your instance. See [Amazon's documentation on enabling enhanced
|
||||
networking](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enabling_enhanced_networking).
|
||||
Default `false`.
|
||||
|
||||
- `ebs_volumes` (BlockDevices) - Add the block device mappings to the AMI. If you add instance store
|
||||
volumes or EBS volumes in addition to the root device volume, the
|
||||
created AMI will contain block device mapping information for those
|
||||
volumes. Amazon creates snapshots of the source instance's root volume
|
||||
and any other EBS volumes described here. When you launch an instance
|
||||
from this new AMI, the instance automatically launches with these
|
||||
additional volumes, and will restore them from snapshots taken from the
|
||||
source instance. See the [BlockDevices](#block-devices-configuration)
|
||||
documentation for fields.
|
||||
|
||||
- `run_volume_tags` (map[string]string) - Key/value pair tags to apply to the volumes of the instance that is
|
||||
*launched* to create EBS Volumes. These tags will *not* appear in the
|
||||
tags of the resulting EBS volumes unless they're duplicated under `tags`
|
||||
in the `ebs_volumes` setting. This is a [template
|
||||
engine](/docs/templates/engine), see [Build template
|
||||
data](#build-template-data) for more information.
|
||||
|
||||
Note: The tags specified here will be *temporarily* applied to volumes
|
||||
specified in `ebs_volumes` - but only while the instance is being
|
||||
created. Packer will replace all tags on the volume with the tags
|
||||
configured in the `ebs_volumes` section as soon as the instance is
|
||||
reported as 'ready'.
|
||||
|
||||
- `run_volume_tag` ([]{key string, value string}) - Same as [`run_volume_tags`](#run_volume_tags) but defined as a singular
|
||||
repeatable block containing a `key` and a `value` field. In HCL2 mode
|
||||
the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
|
|
@ -1,39 +1,38 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/instance/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached
|
||||
when booting a new instance from your AMI. To add a block device during
|
||||
the Packer build see `launch_block_device_mappings` below. Your options
|
||||
here may vary depending on the type of VM you use. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `launch_block_device_mappings` (awscommon.BlockDevices) - Add one or more block devices before the Packer build starts. If you add
|
||||
instance store volumes or EBS volumes in addition to the root device
|
||||
volume, the created AMI will contain block device mapping information
|
||||
for those volumes. Amazon creates snapshots of the source instance's
|
||||
root volume and any other EBS volumes described here. When you launch an
|
||||
instance from this new AMI, the instance automatically launches with
|
||||
these additional volumes, and will restore them from snapshots taken
|
||||
from the source instance. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `bundle_destination` (string) - The directory on the running instance where the bundled AMI will be
|
||||
saved prior to uploading. By default this is /tmp. This directory must
|
||||
exist and be writable.
|
||||
|
||||
- `bundle_prefix` (string) - The prefix for files created from bundling the root volume. By default
|
||||
this is `image-{{timestamp}}`. The timestamp variable should be used to
|
||||
make sure this is unique, otherwise it can collide with other created
|
||||
AMIs by Packer in your account.
|
||||
|
||||
- `bundle_upload_command` (string) - The command to use to upload the bundled volume. See the "custom bundle
|
||||
commands" section below for more information.
|
||||
|
||||
- `bundle_vol_command` (string) - The command to use to bundle the volume. See the "custom bundle
|
||||
commands" section below for more information.
|
||||
|
||||
- `x509_upload_path` (string) - The path on the remote machine where the X509 certificate will be
|
||||
uploaded. This path must already exist and be writable. X509
|
||||
certificates are uploaded after provisioning is run, so it is perfectly
|
||||
okay to create this directory as part of the provisioning process.
|
||||
Defaults to /tmp.
|
||||
|
||||
- `ami_block_device_mappings` (awscommon.BlockDevices) - Add one or more block device mappings to the AMI. These will be attached
|
||||
when booting a new instance from your AMI. To add a block device during
|
||||
the Packer build see `launch_block_device_mappings` below. Your options
|
||||
here may vary depending on the type of VM you use. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `launch_block_device_mappings` (awscommon.BlockDevices) - Add one or more block devices before the Packer build starts. If you add
|
||||
instance store volumes or EBS volumes in addition to the root device
|
||||
volume, the created AMI will contain block device mapping information
|
||||
for those volumes. Amazon creates snapshots of the source instance's
|
||||
root volume and any other EBS volumes described here. When you launch an
|
||||
instance from this new AMI, the instance automatically launches with
|
||||
these additional volumes, and will restore them from snapshots taken
|
||||
from the source instance. See the
|
||||
[BlockDevices](#block-devices-configuration) documentation for fields.
|
||||
|
||||
- `bundle_destination` (string) - The directory on the running instance where the bundled AMI will be
|
||||
saved prior to uploading. By default this is /tmp. This directory must
|
||||
exist and be writable.
|
||||
|
||||
- `bundle_prefix` (string) - The prefix for files created from bundling the root volume. By default
|
||||
this is `image-{{timestamp}}`. The timestamp variable should be used to
|
||||
make sure this is unique, otherwise it can collide with other created
|
||||
AMIs by Packer in your account.
|
||||
|
||||
- `bundle_upload_command` (string) - The command to use to upload the bundled volume. See the "custom bundle
|
||||
commands" section below for more information.
|
||||
|
||||
- `bundle_vol_command` (string) - The command to use to bundle the volume. See the "custom bundle
|
||||
commands" section below for more information.
|
||||
|
||||
- `x509_upload_path` (string) - The path on the remote machine where the X509 certificate will be
|
||||
uploaded. This path must already exist and be writable. X509
|
||||
certificates are uploaded after provisioning is run, so it is perfectly
|
||||
okay to create this directory as part of the provisioning process.
|
||||
Defaults to /tmp.
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/instance/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `account_id` (string) - Your AWS account ID. This is required for bundling the AMI. This is not
|
||||
the same as the access key. You can find your account ID in the security
|
||||
credentials page of your AWS account.
|
||||
|
||||
- `s3_bucket` (string) - The name of the S3 bucket to upload the AMI. This bucket will be created
|
||||
if it doesn't exist.
|
||||
|
||||
- `x509_cert_path` (string) - The local path to a valid X509 certificate for your AWS account. This is
|
||||
used for bundling the AMI. This X509 certificate must be registered with
|
||||
your account from the security credentials page in the AWS console.
|
||||
|
||||
- `x509_key_path` (string) - The local path to the private key for the X509 certificate specified by
|
||||
x509_cert_path. This is used for bundling the AMI.
|
||||
|
||||
- `account_id` (string) - Your AWS account ID. This is required for bundling the AMI. This is not
|
||||
the same as the access key. You can find your account ID in the security
|
||||
credentials page of your AWS account.
|
||||
|
||||
- `s3_bucket` (string) - The name of the S3 bucket to upload the AMI. This bucket will be created
|
||||
if it doesn't exist.
|
||||
|
||||
- `x509_cert_path` (string) - The local path to a valid X509 certificate for your AWS account. This is
|
||||
used for bundling the AMI. This X509 certificate must be registered with
|
||||
your account from the security credentials page in the AWS console.
|
||||
|
||||
- `x509_key_path` (string) - The local path to the private key for the X509 certificate specified by
|
||||
x509_cert_path. This is used for bundling the AMI.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/amazon/instance/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
Config is the configuration that is chained through the steps and settable
|
||||
from the template.
|
||||
|
|
|
@ -1,260 +1,259 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/azure/arm/config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `user_assigned_managed_identities` ([]string) - If set with one or more resource ids of user assigned managed identities, they will be configured on the VM.
|
||||
See [documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token)
|
||||
for how to acquire tokens within the VM.
|
||||
To assign a user assigned managed identity to a VM, the provided account or service principal must have [Managed Identity Operator](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#managed-identity-operator)
|
||||
and [Virtual Machine Contributor](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-contributor) role assignments.
|
||||
|
||||
- `capture_name_prefix` (string) - VHD prefix.
|
||||
|
||||
- `capture_container_name` (string) - Destination container name.
|
||||
|
||||
- `shared_image_gallery` (SharedImageGallery) - Use a [Shared Gallery
|
||||
image](https://azure.microsoft.com/en-us/blog/announcing-the-public-preview-of-shared-image-gallery/)
|
||||
as the source for this build. *VHD targets are incompatible with this
|
||||
build type* - the target must be a *Managed Image*.
|
||||
|
||||
"shared_image_gallery": {
|
||||
"subscription": "00000000-0000-0000-0000-00000000000",
|
||||
"resource_group": "ResourceGroup",
|
||||
"gallery_name": "GalleryName",
|
||||
"image_name": "ImageName",
|
||||
"image_version": "1.0.0"
|
||||
}
|
||||
"managed_image_name": "TargetImageName",
|
||||
"managed_image_resource_group_name": "TargetResourceGroup"
|
||||
|
||||
- `shared_image_gallery_destination` (SharedImageGalleryDestination) - The name of the Shared Image Gallery under which the managed image will be published as Shared Gallery Image version.
|
||||
|
||||
Following is an example.
|
||||
|
||||
"shared_image_gallery_destination": {
|
||||
"resource_group": "ResourceGroup",
|
||||
"gallery_name": "GalleryName",
|
||||
"image_name": "ImageName",
|
||||
"image_version": "1.0.0",
|
||||
"replication_regions": ["regionA", "regionB", "regionC"]
|
||||
}
|
||||
"managed_image_name": "TargetImageName",
|
||||
"managed_image_resource_group_name": "TargetResourceGroup"
|
||||
|
||||
- `shared_image_gallery_timeout` (duration string | ex: "1h5m2s") - How long to wait for an image to be published to the shared image
|
||||
gallery before timing out. If your Packer build is failing on the
|
||||
Publishing to Shared Image Gallery step with the error `Original Error:
|
||||
context deadline exceeded`, but the image is present when you check your
|
||||
Azure dashboard, then you probably need to increase this timeout from
|
||||
its default of "60m" (valid time units include `s` for seconds, `m` for
|
||||
minutes, and `h` for hours.)
|
||||
|
||||
- `shared_gallery_image_version_end_of_life_date` (string) - The end of life date (2006-01-02T15:04:05.99Z) of the gallery Image Version. This property
|
||||
can be used for decommissioning purposes.
|
||||
|
||||
- `shared_image_gallery_replica_count` (int32) - The number of replicas of the Image Version to be created per region. This
|
||||
property would take effect for a region when regionalReplicaCount is not specified.
|
||||
Replica count must be between 1 and 10.
|
||||
|
||||
- `shared_gallery_image_version_exclude_from_latest` (bool) - If set to true, Virtual Machines deployed from the latest version of the
|
||||
Image Definition won't use this Image Version.
|
||||
|
||||
- `image_version` (string) - Specify a specific version of an OS to boot from.
|
||||
Defaults to `latest`. There may be a difference in versions available
|
||||
across regions due to image synchronization latency. To ensure a consistent
|
||||
version across regions set this value to one that is available in all
|
||||
regions where you are deploying.
|
||||
|
||||
CLI example
|
||||
`az vm image list --location westus --publisher Canonical --offer UbuntuServer --sku 16.04.0-LTS --all`
|
||||
|
||||
- `location` (string) - Azure datacenter in which your VM will build.
|
||||
|
||||
- `vm_size` (string) - Size of the VM used for building. This can be changed when you deploy a
|
||||
VM from your VHD. See
|
||||
[pricing](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/)
|
||||
information. Defaults to `Standard_A1`.
|
||||
|
||||
CLI example `az vm list-sizes --location westus`
|
||||
|
||||
- `managed_image_resource_group_name` (string) - Specify the managed image resource group name where the result of the
|
||||
Packer build will be saved. The resource group must already exist. If
|
||||
this value is set, the value managed_image_name must also be set. See
|
||||
documentation to learn more about managed images.
|
||||
|
||||
- `managed_image_name` (string) - Specify the managed image name where the result of the Packer build will
|
||||
be saved. The image name must not exist ahead of time, and will not be
|
||||
overwritten. If this value is set, the value
|
||||
managed_image_resource_group_name must also be set. See documentation to
|
||||
learn more about managed images.
|
||||
|
||||
- `managed_image_storage_account_type` (string) - Specify the storage account
|
||||
type for a managed image. Valid values are Standard_LRS and Premium_LRS.
|
||||
The default is Standard_LRS.
|
||||
|
||||
- `managed_image_os_disk_snapshot_name` (string) - If
|
||||
managed_image_os_disk_snapshot_name is set, a snapshot of the OS disk
|
||||
is created with the same name as this value before the VM is captured.
|
||||
|
||||
- `managed_image_data_disk_snapshot_prefix` (string) - If
|
||||
managed_image_data_disk_snapshot_prefix is set, snapshot of the data
|
||||
disk(s) is created with the same prefix as this value before the VM is
|
||||
captured.
|
||||
|
||||
- `managed_image_zone_resilient` (bool) - Store the image in zone-resilient storage. You need to create it in a
|
||||
region that supports [availability
|
||||
zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview).
|
||||
|
||||
- `azure_tags` (map[string]\*string) - Name/value pair tags to apply to every resource deployed i.e. Resource
|
||||
Group, VM, NIC, VNET, Public IP, KeyVault, etc. The user can define up
|
||||
to 15 tags. Tag names cannot exceed 512 characters, and tag values
|
||||
cannot exceed 256 characters.
|
||||
|
||||
- `azure_tag` ([]{name string, value string}) - Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block
|
||||
containing a `name` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `resource_group_name` (string) - Resource group under which the final artifact will be stored.
|
||||
|
||||
- `storage_account` (string) - Storage account under which the final artifact will be stored.
|
||||
|
||||
- `temp_compute_name` (string) - temporary name assigned to the VM. If this
|
||||
value is not set, a random value will be assigned. Knowing the resource
|
||||
group and VM name allows one to execute commands to update the VM during a
|
||||
Packer build, e.g. attach a resource disk to the VM.
|
||||
|
||||
- `temp_resource_group_name` (string) - name assigned to the temporary resource group created during the build.
|
||||
If this value is not set, a random value will be assigned. This resource
|
||||
group is deleted at the end of the build.
|
||||
|
||||
- `build_resource_group_name` (string) - Specify an existing resource group to run the build in.
|
||||
|
||||
- `build_key_vault_name` (string) - Specify an existing key vault to use for uploading certificates to the
|
||||
instance to connect.
|
||||
|
||||
- `build_key_vault_sku` (string) - Specify the KeyVault SKU to create during the build. Valid values are
|
||||
standard or premium. The default value is standard.
|
||||
|
||||
- `private_virtual_network_with_public_ip` (bool) - This value allows you to
|
||||
set a virtual_network_name and obtain a public IP. If this value is not
|
||||
set and virtual_network_name is defined Packer is only allowed to be
|
||||
executed from a host on the same subnet / virtual network.
|
||||
|
||||
- `virtual_network_name` (string) - Use a pre-existing virtual network for the
|
||||
VM. This option enables private communication with the VM, no public IP
|
||||
address is used or provisioned (unless you set
|
||||
private_virtual_network_with_public_ip).
|
||||
|
||||
- `virtual_network_subnet_name` (string) - If virtual_network_name is set,
|
||||
this value may also be set. If virtual_network_name is set, and this
|
||||
value is not set the builder attempts to determine the subnet to use with
|
||||
the virtual network. If the subnet cannot be found, or it cannot be
|
||||
disambiguated, this value should be set.
|
||||
|
||||
- `virtual_network_resource_group_name` (string) - If virtual_network_name is
|
||||
set, this value may also be set. If virtual_network_name is set, and
|
||||
this value is not set the builder attempts to determine the resource group
|
||||
containing the virtual network. If the resource group cannot be found, or
|
||||
it cannot be disambiguated, this value should be set.
|
||||
|
||||
- `custom_data_file` (string) - Specify a file containing custom data to inject into the cloud-init
|
||||
process. The contents of the file are read and injected into the ARM
|
||||
template. The custom data will be passed to cloud-init for processing at
|
||||
the time of provisioning. See
|
||||
[documentation](http://cloudinit.readthedocs.io/en/latest/topics/examples.html)
|
||||
to learn more about custom data, and how it can be used to influence the
|
||||
provisioning process.
|
||||
|
||||
- `plan_info` (PlanInformation) - Used for creating images from Marketplace images. Please refer to
|
||||
[Deploy an image with Marketplace
|
||||
terms](https://aka.ms/azuremarketplaceapideployment) for more details.
|
||||
Not all Marketplace images support programmatic deployment, and support
|
||||
is controlled by the image publisher.
|
||||
|
||||
An example plan\_info object is defined below.
|
||||
|
||||
```json
|
||||
{
|
||||
"plan_info": {
|
||||
"plan_name": "rabbitmq",
|
||||
"plan_product": "rabbitmq",
|
||||
"plan_publisher": "bitnami"
|
||||
- `user_assigned_managed_identities` ([]string) - If set with one or more resource ids of user assigned managed identities, they will be configured on the VM.
|
||||
See [documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token)
|
||||
for how to acquire tokens within the VM.
|
||||
To assign a user assigned managed identity to a VM, the provided account or service principal must have [Managed Identity Operator](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#managed-identity-operator)
|
||||
and [Virtual Machine Contributor](https://docs.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#virtual-machine-contributor) role assignments.
|
||||
|
||||
- `capture_name_prefix` (string) - VHD prefix.
|
||||
|
||||
- `capture_container_name` (string) - Destination container name.
|
||||
|
||||
- `shared_image_gallery` (SharedImageGallery) - Use a [Shared Gallery
|
||||
image](https://azure.microsoft.com/en-us/blog/announcing-the-public-preview-of-shared-image-gallery/)
|
||||
as the source for this build. *VHD targets are incompatible with this
|
||||
build type* - the target must be a *Managed Image*.
|
||||
|
||||
"shared_image_gallery": {
|
||||
"subscription": "00000000-0000-0000-0000-00000000000",
|
||||
"resource_group": "ResourceGroup",
|
||||
"gallery_name": "GalleryName",
|
||||
"image_name": "ImageName",
|
||||
"image_version": "1.0.0"
|
||||
}
|
||||
"managed_image_name": "TargetImageName",
|
||||
"managed_image_resource_group_name": "TargetResourceGroup"
|
||||
|
||||
- `shared_image_gallery_destination` (SharedImageGalleryDestination) - The name of the Shared Image Gallery under which the managed image will be published as Shared Gallery Image version.
|
||||
|
||||
Following is an example.
|
||||
|
||||
"shared_image_gallery_destination": {
|
||||
"resource_group": "ResourceGroup",
|
||||
"gallery_name": "GalleryName",
|
||||
"image_name": "ImageName",
|
||||
"image_version": "1.0.0",
|
||||
"replication_regions": ["regionA", "regionB", "regionC"]
|
||||
}
|
||||
"managed_image_name": "TargetImageName",
|
||||
"managed_image_resource_group_name": "TargetResourceGroup"
|
||||
|
||||
- `shared_image_gallery_timeout` (duration string | ex: "1h5m2s") - How long to wait for an image to be published to the shared image
|
||||
gallery before timing out. If your Packer build is failing on the
|
||||
Publishing to Shared Image Gallery step with the error `Original Error:
|
||||
context deadline exceeded`, but the image is present when you check your
|
||||
Azure dashboard, then you probably need to increase this timeout from
|
||||
its default of "60m" (valid time units include `s` for seconds, `m` for
|
||||
minutes, and `h` for hours.)
|
||||
|
||||
- `shared_gallery_image_version_end_of_life_date` (string) - The end of life date (2006-01-02T15:04:05.99Z) of the gallery Image Version. This property
|
||||
can be used for decommissioning purposes.
|
||||
|
||||
- `shared_image_gallery_replica_count` (int32) - The number of replicas of the Image Version to be created per region. This
|
||||
property would take effect for a region when regionalReplicaCount is not specified.
|
||||
Replica count must be between 1 and 10.
|
||||
|
||||
- `shared_gallery_image_version_exclude_from_latest` (bool) - If set to true, Virtual Machines deployed from the latest version of the
|
||||
Image Definition won't use this Image Version.
|
||||
|
||||
- `image_version` (string) - Specify a specific version of an OS to boot from.
|
||||
Defaults to `latest`. There may be a difference in versions available
|
||||
across regions due to image synchronization latency. To ensure a consistent
|
||||
version across regions set this value to one that is available in all
|
||||
regions where you are deploying.
|
||||
|
||||
CLI example
|
||||
`az vm image list --location westus --publisher Canonical --offer UbuntuServer --sku 16.04.0-LTS --all`
|
||||
|
||||
- `location` (string) - Azure datacenter in which your VM will build.
|
||||
|
||||
- `vm_size` (string) - Size of the VM used for building. This can be changed when you deploy a
|
||||
VM from your VHD. See
|
||||
[pricing](https://azure.microsoft.com/en-us/pricing/details/virtual-machines/)
|
||||
information. Defaults to `Standard_A1`.
|
||||
|
||||
CLI example `az vm list-sizes --location westus`
|
||||
|
||||
- `managed_image_resource_group_name` (string) - Specify the managed image resource group name where the result of the
|
||||
Packer build will be saved. The resource group must already exist. If
|
||||
this value is set, the value managed_image_name must also be set. See
|
||||
documentation to learn more about managed images.
|
||||
|
||||
- `managed_image_name` (string) - Specify the managed image name where the result of the Packer build will
|
||||
be saved. The image name must not exist ahead of time, and will not be
|
||||
overwritten. If this value is set, the value
|
||||
managed_image_resource_group_name must also be set. See documentation to
|
||||
learn more about managed images.
|
||||
|
||||
- `managed_image_storage_account_type` (string) - Specify the storage account
|
||||
type for a managed image. Valid values are Standard_LRS and Premium_LRS.
|
||||
The default is Standard_LRS.
|
||||
|
||||
- `managed_image_os_disk_snapshot_name` (string) - If
|
||||
managed_image_os_disk_snapshot_name is set, a snapshot of the OS disk
|
||||
is created with the same name as this value before the VM is captured.
|
||||
|
||||
- `managed_image_data_disk_snapshot_prefix` (string) - If
|
||||
managed_image_data_disk_snapshot_prefix is set, snapshot of the data
|
||||
disk(s) is created with the same prefix as this value before the VM is
|
||||
captured.
|
||||
|
||||
- `managed_image_zone_resilient` (bool) - Store the image in zone-resilient storage. You need to create it in a
|
||||
region that supports [availability
|
||||
zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-overview).
|
||||
|
||||
- `azure_tags` (map[string]\*string) - Name/value pair tags to apply to every resource deployed i.e. Resource
|
||||
Group, VM, NIC, VNET, Public IP, KeyVault, etc. The user can define up
|
||||
to 15 tags. Tag names cannot exceed 512 characters, and tag values
|
||||
cannot exceed 256 characters.
|
||||
|
||||
- `azure_tag` ([]{name string, value string}) - Same as [`azure_tags`](#azure_tags) but defined as a singular repeatable block
|
||||
containing a `name` and a `value` field. In HCL2 mode the
|
||||
[`dynamic_block`](/docs/configuration/from-1.5/expressions#dynamic-blocks)
|
||||
will allow you to create those programatically.
|
||||
|
||||
- `resource_group_name` (string) - Resource group under which the final artifact will be stored.
|
||||
|
||||
- `storage_account` (string) - Storage account under which the final artifact will be stored.
|
||||
|
||||
- `temp_compute_name` (string) - temporary name assigned to the VM. If this
|
||||
value is not set, a random value will be assigned. Knowing the resource
|
||||
group and VM name allows one to execute commands to update the VM during a
|
||||
Packer build, e.g. attach a resource disk to the VM.
|
||||
|
||||
- `temp_resource_group_name` (string) - name assigned to the temporary resource group created during the build.
|
||||
If this value is not set, a random value will be assigned. This resource
|
||||
group is deleted at the end of the build.
|
||||
|
||||
- `build_resource_group_name` (string) - Specify an existing resource group to run the build in.
|
||||
|
||||
- `build_key_vault_name` (string) - Specify an existing key vault to use for uploading certificates to the
|
||||
instance to connect.
|
||||
|
||||
- `build_key_vault_sku` (string) - Specify the KeyVault SKU to create during the build. Valid values are
|
||||
standard or premium. The default value is standard.
|
||||
|
||||
- `private_virtual_network_with_public_ip` (bool) - This value allows you to
|
||||
set a virtual_network_name and obtain a public IP. If this value is not
|
||||
set and virtual_network_name is defined Packer is only allowed to be
|
||||
executed from a host on the same subnet / virtual network.
|
||||
|
||||
- `virtual_network_name` (string) - Use a pre-existing virtual network for the
|
||||
VM. This option enables private communication with the VM, no public IP
|
||||
address is used or provisioned (unless you set
|
||||
private_virtual_network_with_public_ip).
|
||||
|
||||
- `virtual_network_subnet_name` (string) - If virtual_network_name is set,
|
||||
this value may also be set. If virtual_network_name is set, and this
|
||||
value is not set the builder attempts to determine the subnet to use with
|
||||
the virtual network. If the subnet cannot be found, or it cannot be
|
||||
disambiguated, this value should be set.
|
||||
|
||||
- `virtual_network_resource_group_name` (string) - If virtual_network_name is
|
||||
set, this value may also be set. If virtual_network_name is set, and
|
||||
this value is not set the builder attempts to determine the resource group
|
||||
containing the virtual network. If the resource group cannot be found, or
|
||||
it cannot be disambiguated, this value should be set.
|
||||
|
||||
- `custom_data_file` (string) - Specify a file containing custom data to inject into the cloud-init
|
||||
process. The contents of the file are read and injected into the ARM
|
||||
template. The custom data will be passed to cloud-init for processing at
|
||||
the time of provisioning. See
|
||||
[documentation](http://cloudinit.readthedocs.io/en/latest/topics/examples.html)
|
||||
to learn more about custom data, and how it can be used to influence the
|
||||
provisioning process.
|
||||
|
||||
- `plan_info` (PlanInformation) - Used for creating images from Marketplace images. Please refer to
|
||||
[Deploy an image with Marketplace
|
||||
terms](https://aka.ms/azuremarketplaceapideployment) for more details.
|
||||
Not all Marketplace images support programmatic deployment, and support
|
||||
is controlled by the image publisher.
|
||||
|
||||
An example plan\_info object is defined below.
|
||||
|
||||
```json
|
||||
{
|
||||
"plan_info": {
|
||||
"plan_name": "rabbitmq",
|
||||
"plan_product": "rabbitmq",
|
||||
"plan_publisher": "bitnami"
|
||||
}
|
||||
```
|
||||
|
||||
`plan_name` (string) - The plan name, required. `plan_product` (string) -
|
||||
The plan product, required. `plan_publisher` (string) - The plan publisher,
|
||||
required. `plan_promotion_code` (string) - Some images accept a promotion
|
||||
code, optional.
|
||||
|
||||
Images created from the Marketplace with `plan_info` **must** specify
|
||||
`plan_info` whenever the image is deployed. The builder automatically adds
|
||||
tags to the image to ensure this information is not lost. The following
|
||||
tags are added.
|
||||
|
||||
```text
|
||||
1. PlanName
|
||||
2. PlanProduct
|
||||
3. PlanPublisher
|
||||
4. PlanPromotionCode
|
||||
```
|
||||
|
||||
- `polling_duration_timeout` (duration string | ex: "1h5m2s") - The default PollingDuration for azure is 15mins, this property will override
|
||||
that value. See [Azure DefaultPollingDuration](https://godoc.org/github.com/Azure/go-autorest/autorest#pkg-constants)
|
||||
If your Packer build is failing on the
|
||||
ARM deployment step with the error `Original Error:
|
||||
context deadline exceeded`, then you probably need to increase this timeout from
|
||||
its default of "15m" (valid time units include `s` for seconds, `m` for
|
||||
minutes, and `h` for hours.)
|
||||
|
||||
- `os_type` (string) - If either Linux or Windows is specified Packer will
|
||||
automatically configure authentication credentials for the provisioned
|
||||
machine. For Linux this configures an SSH authorized key. For Windows
|
||||
this configures a WinRM certificate.
|
||||
|
||||
- `os_disk_size_gb` (int32) - Specify the size of the OS disk in GB
|
||||
(gigabytes). Values of zero or less than zero are ignored.
|
||||
|
||||
- `disk_additional_size` ([]int32) - The size(s) of any additional hard disks for the VM in gigabytes. If
|
||||
this is not specified then the VM will only contain an OS disk. The
|
||||
number of additional disks and maximum size of a disk depends on the
|
||||
configuration of your VM. See
|
||||
[Windows](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds)
|
||||
or
|
||||
[Linux](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds)
|
||||
for more information.
|
||||
|
||||
For VHD builds the final artifacts will be named
|
||||
`PREFIX-dataDisk-<n>.UUID.vhd` and stored in the specified capture
|
||||
container along side the OS disk. The additional disks are included in
|
||||
the deployment template `PREFIX-vmTemplate.UUID`.
|
||||
|
||||
For Managed build the final artifacts are included in the managed image.
|
||||
The additional disk will have the same storage account type as the OS
|
||||
disk, as specified with the `managed_image_storage_account_type`
|
||||
setting.
|
||||
|
||||
- `disk_caching_type` (string) - Specify the disk caching type. Valid values
|
||||
are None, ReadOnly, and ReadWrite. The default value is ReadWrite.
|
||||
|
||||
- `allowed_inbound_ip_addresses` ([]string) - Specify the list of IP addresses and CIDR blocks that should be
|
||||
allowed access to the VM. If provided, an Azure Network Security
|
||||
Group will be created with corresponding rules and be bound to
|
||||
the subnet of the VM.
|
||||
Providing `allowed_inbound_ip_addresses` in combination with
|
||||
`virtual_network_name` is not allowed.
|
||||
|
||||
- `boot_diag_storage_account` (string) - Specify storage to store Boot Diagnostics -- Enabling this option
|
||||
will create 2 Files in the specified storage account. (serial console log & screehshot file)
|
||||
once the build is completed, it has to be removed manually.
|
||||
see [here](https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/boot-diagnostics) for more info
|
||||
|
||||
- `custom_resource_build_prefix` (string) - specify custom azure resource names during build limited to max 10 characters
|
||||
this will set the prefix for the resources. The actuall resource names will be
|
||||
`custom_resource_build_prefix` + resourcetype + 5 character random alphanumeric string
|
||||
|
||||
- `async_resourcegroup_delete` (bool) - If you want packer to delete the
|
||||
temporary resource group asynchronously set this value. It's a boolean
|
||||
value and defaults to false. Important Setting this true means that
|
||||
your builds are faster, however any failed deletes are not reported.
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
`plan_name` (string) - The plan name, required. `plan_product` (string) -
|
||||
The plan product, required. `plan_publisher` (string) - The plan publisher,
|
||||
required. `plan_promotion_code` (string) - Some images accept a promotion
|
||||
code, optional.
|
||||
|
||||
Images created from the Marketplace with `plan_info` **must** specify
|
||||
`plan_info` whenever the image is deployed. The builder automatically adds
|
||||
tags to the image to ensure this information is not lost. The following
|
||||
tags are added.
|
||||
|
||||
```text
|
||||
1. PlanName
|
||||
2. PlanProduct
|
||||
3. PlanPublisher
|
||||
4. PlanPromotionCode
|
||||
```
|
||||
|
||||
- `polling_duration_timeout` (duration string | ex: "1h5m2s") - The default PollingDuration for azure is 15mins, this property will override
|
||||
that value. See [Azure DefaultPollingDuration](https://godoc.org/github.com/Azure/go-autorest/autorest#pkg-constants)
|
||||
If your Packer build is failing on the
|
||||
ARM deployment step with the error `Original Error:
|
||||
context deadline exceeded`, then you probably need to increase this timeout from
|
||||
its default of "15m" (valid time units include `s` for seconds, `m` for
|
||||
minutes, and `h` for hours.)
|
||||
|
||||
- `os_type` (string) - If either Linux or Windows is specified Packer will
|
||||
automatically configure authentication credentials for the provisioned
|
||||
machine. For Linux this configures an SSH authorized key. For Windows
|
||||
this configures a WinRM certificate.
|
||||
|
||||
- `os_disk_size_gb` (int32) - Specify the size of the OS disk in GB
|
||||
(gigabytes). Values of zero or less than zero are ignored.
|
||||
|
||||
- `disk_additional_size` ([]int32) - The size(s) of any additional hard disks for the VM in gigabytes. If
|
||||
this is not specified then the VM will only contain an OS disk. The
|
||||
number of additional disks and maximum size of a disk depends on the
|
||||
configuration of your VM. See
|
||||
[Windows](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds)
|
||||
or
|
||||
[Linux](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds)
|
||||
for more information.
|
||||
|
||||
For VHD builds the final artifacts will be named
|
||||
`PREFIX-dataDisk-<n>.UUID.vhd` and stored in the specified capture
|
||||
container along side the OS disk. The additional disks are included in
|
||||
the deployment template `PREFIX-vmTemplate.UUID`.
|
||||
|
||||
For Managed build the final artifacts are included in the managed image.
|
||||
The additional disk will have the same storage account type as the OS
|
||||
disk, as specified with the `managed_image_storage_account_type`
|
||||
setting.
|
||||
|
||||
- `disk_caching_type` (string) - Specify the disk caching type. Valid values
|
||||
are None, ReadOnly, and ReadWrite. The default value is ReadWrite.
|
||||
|
||||
- `allowed_inbound_ip_addresses` ([]string) - Specify the list of IP addresses and CIDR blocks that should be
|
||||
allowed access to the VM. If provided, an Azure Network Security
|
||||
Group will be created with corresponding rules and be bound to
|
||||
the subnet of the VM.
|
||||
Providing `allowed_inbound_ip_addresses` in combination with
|
||||
`virtual_network_name` is not allowed.
|
||||
|
||||
- `boot_diag_storage_account` (string) - Specify storage to store Boot Diagnostics -- Enabling this option
|
||||
will create 2 Files in the specified storage account. (serial console log & screehshot file)
|
||||
once the build is completed, it has to be removed manually.
|
||||
see [here](https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/boot-diagnostics) for more info
|
||||
|
||||
- `custom_resource_build_prefix` (string) - specify custom azure resource names during build limited to max 10 characters
|
||||
this will set the prefix for the resources. The actuall resource names will be
|
||||
`custom_resource_build_prefix` + resourcetype + 5 character random alphanumeric string
|
||||
|
||||
- `async_resourcegroup_delete` (bool) - If you want packer to delete the
|
||||
temporary resource group asynchronously set this value. It's a boolean
|
||||
value and defaults to false. Important Setting this true means that
|
||||
your builds are faster, however any failed deletes are not reported.
|
||||
|
|
|
@ -1,39 +1,38 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/azure/arm/config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `image_publisher` (string) - Name of the publisher to use for your base image (Azure Marketplace Images only). See
|
||||
[documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/)
|
||||
for details.
|
||||
|
||||
CLI example `az vm image list-publishers --location westus`
|
||||
|
||||
- `image_offer` (string) - Name of the publisher's offer to use for your base image (Azure Marketplace Images only). See
|
||||
[documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/)
|
||||
for details.
|
||||
|
||||
CLI example
|
||||
`az vm image list-offers --location westus --publisher Canonical`
|
||||
|
||||
- `image_sku` (string) - SKU of the image offer to use for your base image (Azure Marketplace Images only). See
|
||||
[documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/)
|
||||
for details.
|
||||
|
||||
CLI example
|
||||
`az vm image list-skus --location westus --publisher Canonical --offer UbuntuServer`
|
||||
|
||||
- `image_url` (string) - URL to a custom VHD to use for your base image. If this value is set,
|
||||
image_publisher, image_offer, image_sku, or image_version should not be set.
|
||||
|
||||
- `custom_managed_image_name` (string) - Name of a custom managed image to use for your base image. If this value is set, do
|
||||
not set image_publisher, image_offer, image_sku, or image_version.
|
||||
If this value is set, the option
|
||||
`custom_managed_image_resource_group_name` must also be set. See
|
||||
[documentation](https://docs.microsoft.com/en-us/azure/storage/storage-managed-disks-overview#images)
|
||||
to learn more about managed images.
|
||||
|
||||
- `custom_managed_image_resource_group_name` (string) - Name of a custom managed image's resource group to use for your base image. If this
|
||||
value is set, image_publisher, image_offer, image_sku, or image_version should not be set.
|
||||
If this value is set, the option
|
||||
`custom_managed_image_name` must also be set. See
|
||||
[documentation](https://docs.microsoft.com/en-us/azure/storage/storage-managed-disks-overview#images)
|
||||
to learn more about managed images.
|
||||
|
||||
- `image_publisher` (string) - Name of the publisher to use for your base image (Azure Marketplace Images only). See
|
||||
[documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/)
|
||||
for details.
|
||||
|
||||
CLI example `az vm image list-publishers --location westus`
|
||||
|
||||
- `image_offer` (string) - Name of the publisher's offer to use for your base image (Azure Marketplace Images only). See
|
||||
[documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/)
|
||||
for details.
|
||||
|
||||
CLI example
|
||||
`az vm image list-offers --location westus --publisher Canonical`
|
||||
|
||||
- `image_sku` (string) - SKU of the image offer to use for your base image (Azure Marketplace Images only). See
|
||||
[documentation](https://azure.microsoft.com/en-us/documentation/articles/resource-groups-vm-searching/)
|
||||
for details.
|
||||
|
||||
CLI example
|
||||
`az vm image list-skus --location westus --publisher Canonical --offer UbuntuServer`
|
||||
|
||||
- `image_url` (string) - URL to a custom VHD to use for your base image. If this value is set,
|
||||
image_publisher, image_offer, image_sku, or image_version should not be set.
|
||||
|
||||
- `custom_managed_image_name` (string) - Name of a custom managed image to use for your base image. If this value is set, do
|
||||
not set image_publisher, image_offer, image_sku, or image_version.
|
||||
If this value is set, the option
|
||||
`custom_managed_image_resource_group_name` must also be set. See
|
||||
[documentation](https://docs.microsoft.com/en-us/azure/storage/storage-managed-disks-overview#images)
|
||||
to learn more about managed images.
|
||||
|
||||
- `custom_managed_image_resource_group_name` (string) - Name of a custom managed image's resource group to use for your base image. If this
|
||||
value is set, image_publisher, image_offer, image_sku, or image_version should not be set.
|
||||
If this value is set, the option
|
||||
`custom_managed_image_name` must also be set. See
|
||||
[documentation](https://docs.microsoft.com/en-us/azure/storage/storage-managed-disks-overview#images)
|
||||
to learn more about managed images.
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<!-- Code generated from the comments of the PlanInformation struct in builder/azure/arm/config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `plan_name` (string) - Plan Name
|
||||
- `plan_product` (string) - Plan Product
|
||||
- `plan_publisher` (string) - Plan Publisher
|
||||
- `plan_promotion_code` (string) - Plan Promotion Code
|
||||
- `plan_name` (string) - Plan Name
|
||||
|
||||
- `plan_product` (string) - Plan Product
|
||||
|
||||
- `plan_publisher` (string) - Plan Publisher
|
||||
|
||||
- `plan_promotion_code` (string) - Plan Promotion Code
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
<!-- Code generated from the comments of the SharedImageGallery struct in builder/azure/arm/config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `subscription` (string) - Subscription
|
||||
- `resource_group` (string) - Resource Group
|
||||
- `gallery_name` (string) - Gallery Name
|
||||
- `image_name` (string) - Image Name
|
||||
- `image_version` (string) - Specify a specific version of an OS to boot from.
|
||||
Defaults to latest. There may be a difference in versions available
|
||||
across regions due to image synchronization latency. To ensure a consistent
|
||||
version across regions set this value to one that is available in all
|
||||
regions where you are deploying.
|
||||
|
||||
- `subscription` (string) - Subscription
|
||||
|
||||
- `resource_group` (string) - Resource Group
|
||||
|
||||
- `gallery_name` (string) - Gallery Name
|
||||
|
||||
- `image_name` (string) - Image Name
|
||||
|
||||
- `image_version` (string) - Specify a specific version of an OS to boot from.
|
||||
Defaults to latest. There may be a difference in versions available
|
||||
across regions due to image synchronization latency. To ensure a consistent
|
||||
version across regions set this value to one that is available in all
|
||||
regions where you are deploying.
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
<!-- Code generated from the comments of the SharedImageGalleryDestination struct in builder/azure/arm/config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `resource_group` (string) - Sig Destination Resource Group
|
||||
- `gallery_name` (string) - Sig Destination Gallery Name
|
||||
- `image_name` (string) - Sig Destination Image Name
|
||||
- `image_version` (string) - Sig Destination Image Version
|
||||
- `replication_regions` ([]string) - Sig Destination Replication Regions
|
||||
- `resource_group` (string) - Sig Destination Resource Group
|
||||
|
||||
- `gallery_name` (string) - Sig Destination Gallery Name
|
||||
|
||||
- `image_name` (string) - Sig Destination Image Name
|
||||
|
||||
- `image_version` (string) - Sig Destination Image Version
|
||||
|
||||
- `replication_regions` ([]string) - Sig Destination Replication Regions
|
||||
|
|
|
@ -1,65 +1,64 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/azure/chroot/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `from_scratch` (bool) - When set to `true`, starts with an empty, unpartitioned disk. Defaults to `false`.
|
||||
|
||||
- `command_wrapper` (string) - How to run shell commands. This may be useful to set environment variables or perhaps run
|
||||
a command with sudo or so on. This is a configuration template where the `.Command` variable
|
||||
is replaced with the command to be run. Defaults to `{{.Command}}`.
|
||||
|
||||
- `pre_mount_commands` ([]string) - A series of commands to execute after attaching the root volume and before mounting the chroot.
|
||||
This is not required unless using `from_scratch`. If so, this should include any partitioning
|
||||
and filesystem creation commands. The path to the device is provided by `{{.Device}}`.
|
||||
|
||||
- `mount_options` ([]string) - Options to supply the `mount` command when mounting devices. Each option will be prefixed with
|
||||
`-o` and supplied to the `mount` command ran by Packer. Because this command is ran in a shell,
|
||||
user discretion is advised. See this manual page for the `mount` command for valid file system specific options.
|
||||
|
||||
- `mount_partition` (string) - The partition number containing the / partition. By default this is the first partition of the volume.
|
||||
|
||||
- `mount_path` (string) - The path where the volume will be mounted. This is where the chroot environment will be. This defaults
|
||||
to `/mnt/packer-amazon-chroot-volumes/{{.Device}}`. This is a configuration template where the `.Device`
|
||||
variable is replaced with the name of the device where the volume is attached.
|
||||
|
||||
- `post_mount_commands` ([]string) - As `pre_mount_commands`, but the commands are executed after mounting the root device and before the
|
||||
extra mount and copy steps. The device and mount path are provided by `{{.Device}}` and `{{.MountPath}}`.
|
||||
|
||||
- `chroot_mounts` ([][]string) - This is a list of devices to mount into the chroot environment. This configuration parameter requires
|
||||
some additional documentation which is in the "Chroot Mounts" section below. Please read that section
|
||||
for more information on how to use this.
|
||||
|
||||
- `copy_files` ([]string) - Paths to files on the running Azure instance that will be copied into the chroot environment prior to
|
||||
provisioning. Defaults to `/etc/resolv.conf` so that DNS lookups work. Pass an empty list to skip copying
|
||||
`/etc/resolv.conf`. You may need to do this if you're building an image that uses systemd.
|
||||
|
||||
- `os_disk_size_gb` (int32) - Try to resize the OS disk to this size on the first copy. Disks can only be englarged. If not specified,
|
||||
the disk will keep its original size. Required when using `from_scratch`
|
||||
|
||||
- `os_disk_storage_account_type` (string) - The [storage SKU](https://docs.microsoft.com/en-us/rest/api/compute/disks/createorupdate#diskstorageaccounttypes)
|
||||
to use for the OS Disk. Defaults to `Standard_LRS`.
|
||||
|
||||
- `os_disk_cache_type` (string) - The [cache type](https://docs.microsoft.com/en-us/rest/api/compute/images/createorupdate#cachingtypes)
|
||||
specified in the resulting image and for attaching it to the Packer VM. Defaults to `ReadOnly`
|
||||
|
||||
- `data_disk_storage_account_type` (string) - The [storage SKU](https://docs.microsoft.com/en-us/rest/api/compute/disks/createorupdate#diskstorageaccounttypes)
|
||||
to use for datadisks. Defaults to `Standard_LRS`.
|
||||
|
||||
- `data_disk_cache_type` (string) - The [cache type](https://docs.microsoft.com/en-us/rest/api/compute/images/createorupdate#cachingtypes)
|
||||
specified in the resulting image and for attaching it to the Packer VM. Defaults to `ReadOnly`
|
||||
|
||||
- `image_hyperv_generation` (string) - The [Hyper-V generation type](https://docs.microsoft.com/en-us/rest/api/compute/images/createorupdate#hypervgenerationtypes) for Managed Image output.
|
||||
Defaults to `V1`.
|
||||
|
||||
- `temporary_os_disk_id` (string) - The id of the temporary OS disk that will be created. Will be generated if not set.
|
||||
|
||||
- `temporary_os_disk_snapshot_id` (string) - The id of the temporary OS disk snapshot that will be created. Will be generated if not set.
|
||||
|
||||
- `temporary_data_disk_id_prefix` (string) - The prefix for the resource ids of the temporary data disks that will be created. The disks will be suffixed with a number. Will be generated if not set.
|
||||
|
||||
- `temporary_data_disk_snapshot_id` (string) - The prefix for the resource ids of the temporary data disk snapshots that will be created. The snapshots will be suffixed with a number. Will be generated if not set.
|
||||
|
||||
- `skip_cleanup` (bool) - If set to `true`, leaves the temporary disks and snapshots behind in the Packer VM resource group. Defaults to `false`
|
||||
|
||||
- `image_resource_id` (string) - The managed image to create using this build.
|
||||
|
||||
- `shared_image_destination` (SharedImageGalleryDestination) - The shared image to create using this build.
|
||||
|
||||
- `from_scratch` (bool) - When set to `true`, starts with an empty, unpartitioned disk. Defaults to `false`.
|
||||
|
||||
- `command_wrapper` (string) - How to run shell commands. This may be useful to set environment variables or perhaps run
|
||||
a command with sudo or so on. This is a configuration template where the `.Command` variable
|
||||
is replaced with the command to be run. Defaults to `{{.Command}}`.
|
||||
|
||||
- `pre_mount_commands` ([]string) - A series of commands to execute after attaching the root volume and before mounting the chroot.
|
||||
This is not required unless using `from_scratch`. If so, this should include any partitioning
|
||||
and filesystem creation commands. The path to the device is provided by `{{.Device}}`.
|
||||
|
||||
- `mount_options` ([]string) - Options to supply the `mount` command when mounting devices. Each option will be prefixed with
|
||||
`-o` and supplied to the `mount` command ran by Packer. Because this command is ran in a shell,
|
||||
user discretion is advised. See this manual page for the `mount` command for valid file system specific options.
|
||||
|
||||
- `mount_partition` (string) - The partition number containing the / partition. By default this is the first partition of the volume.
|
||||
|
||||
- `mount_path` (string) - The path where the volume will be mounted. This is where the chroot environment will be. This defaults
|
||||
to `/mnt/packer-amazon-chroot-volumes/{{.Device}}`. This is a configuration template where the `.Device`
|
||||
variable is replaced with the name of the device where the volume is attached.
|
||||
|
||||
- `post_mount_commands` ([]string) - As `pre_mount_commands`, but the commands are executed after mounting the root device and before the
|
||||
extra mount and copy steps. The device and mount path are provided by `{{.Device}}` and `{{.MountPath}}`.
|
||||
|
||||
- `chroot_mounts` ([][]string) - This is a list of devices to mount into the chroot environment. This configuration parameter requires
|
||||
some additional documentation which is in the "Chroot Mounts" section below. Please read that section
|
||||
for more information on how to use this.
|
||||
|
||||
- `copy_files` ([]string) - Paths to files on the running Azure instance that will be copied into the chroot environment prior to
|
||||
provisioning. Defaults to `/etc/resolv.conf` so that DNS lookups work. Pass an empty list to skip copying
|
||||
`/etc/resolv.conf`. You may need to do this if you're building an image that uses systemd.
|
||||
|
||||
- `os_disk_size_gb` (int32) - Try to resize the OS disk to this size on the first copy. Disks can only be englarged. If not specified,
|
||||
the disk will keep its original size. Required when using `from_scratch`
|
||||
|
||||
- `os_disk_storage_account_type` (string) - The [storage SKU](https://docs.microsoft.com/en-us/rest/api/compute/disks/createorupdate#diskstorageaccounttypes)
|
||||
to use for the OS Disk. Defaults to `Standard_LRS`.
|
||||
|
||||
- `os_disk_cache_type` (string) - The [cache type](https://docs.microsoft.com/en-us/rest/api/compute/images/createorupdate#cachingtypes)
|
||||
specified in the resulting image and for attaching it to the Packer VM. Defaults to `ReadOnly`
|
||||
|
||||
- `data_disk_storage_account_type` (string) - The [storage SKU](https://docs.microsoft.com/en-us/rest/api/compute/disks/createorupdate#diskstorageaccounttypes)
|
||||
to use for datadisks. Defaults to `Standard_LRS`.
|
||||
|
||||
- `data_disk_cache_type` (string) - The [cache type](https://docs.microsoft.com/en-us/rest/api/compute/images/createorupdate#cachingtypes)
|
||||
specified in the resulting image and for attaching it to the Packer VM. Defaults to `ReadOnly`
|
||||
|
||||
- `image_hyperv_generation` (string) - The [Hyper-V generation type](https://docs.microsoft.com/en-us/rest/api/compute/images/createorupdate#hypervgenerationtypes) for Managed Image output.
|
||||
Defaults to `V1`.
|
||||
|
||||
- `temporary_os_disk_id` (string) - The id of the temporary OS disk that will be created. Will be generated if not set.
|
||||
|
||||
- `temporary_os_disk_snapshot_id` (string) - The id of the temporary OS disk snapshot that will be created. Will be generated if not set.
|
||||
|
||||
- `temporary_data_disk_id_prefix` (string) - The prefix for the resource ids of the temporary data disks that will be created. The disks will be suffixed with a number. Will be generated if not set.
|
||||
|
||||
- `temporary_data_disk_snapshot_id` (string) - The prefix for the resource ids of the temporary data disk snapshots that will be created. The snapshots will be suffixed with a number. Will be generated if not set.
|
||||
|
||||
- `skip_cleanup` (bool) - If set to `true`, leaves the temporary disks and snapshots behind in the Packer VM resource group. Defaults to `false`
|
||||
|
||||
- `image_resource_id` (string) - The managed image to create using this build.
|
||||
|
||||
- `shared_image_destination` (SharedImageGalleryDestination) - The shared image to create using this build.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/azure/chroot/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `source` (string) - One of the following can be used as a source for an image:
|
||||
- a shared image version resource ID
|
||||
- a managed disk resource ID
|
||||
- a publisher:offer:sku:version specifier for plaform image sources.
|
||||
|
||||
- `source` (string) - One of the following can be used as a source for an image:
|
||||
- a shared image version resource ID
|
||||
- a managed disk resource ID
|
||||
- a publisher:offer:sku:version specifier for plaform image sources.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/azure/chroot/builder.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
Config is the configuration that is chained through the steps and settable
|
||||
from the template.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<!-- Code generated from the comments of the SharedImageGalleryDestination struct in builder/azure/chroot/shared_image_gallery_destination.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `target_regions` ([]TargetRegion) - Target Regions
|
||||
- `exlude_from_latest` (bool) - Exclude From Latest
|
||||
- `target_regions` ([]TargetRegion) - Target Regions
|
||||
|
||||
- `exlude_from_latest` (bool) - Exclude From Latest
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<!-- Code generated from the comments of the SharedImageGalleryDestination struct in builder/azure/chroot/shared_image_gallery_destination.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `resource_group` (string) - Resource Group
|
||||
- `gallery_name` (string) - Gallery Name
|
||||
- `image_name` (string) - Image Name
|
||||
- `image_version` (string) - Image Version
|
||||
- `resource_group` (string) - Resource Group
|
||||
|
||||
- `gallery_name` (string) - Gallery Name
|
||||
|
||||
- `image_name` (string) - Image Name
|
||||
|
||||
- `image_version` (string) - Image Version
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<!-- Code generated from the comments of the SharedImageGalleryDestination struct in builder/azure/chroot/shared_image_gallery_destination.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
SharedImageGalleryDestination models an image version in a Shared
|
||||
Image Gallery that can be used as a destination.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!-- Code generated from the comments of the TargetRegion struct in builder/azure/chroot/shared_image_gallery_destination.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `replicas` (int32) - Number of replicas in this region. Default: 1
|
||||
|
||||
- `storage_account_type` (string) - Storage account type: Standard_LRS or Standard_ZRS. Default: Standard_ZRS
|
||||
|
||||
- `replicas` (int32) - Number of replicas in this region. Default: 1
|
||||
|
||||
- `storage_account_type` (string) - Storage account type: Standard_LRS or Standard_ZRS. Default: Standard_ZRS
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<!-- Code generated from the comments of the TargetRegion struct in builder/azure/chroot/shared_image_gallery_destination.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `name` (string) - Name of the Azure region
|
||||
|
||||
- `name` (string) - Name of the Azure region
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
<!-- Code generated from the comments of the TargetRegion struct in builder/azure/chroot/shared_image_gallery_destination.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
TargetRegion describes a region where the shared image should be replicated
|
||||
|
|
|
@ -1,26 +1,25 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/azure/common/client/config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
- `cloud_environment_name` (string) - One of Public, China, Germany, or
|
||||
USGovernment. Defaults to Public. Long forms such as
|
||||
USGovernmentCloud and AzureUSGovernmentCloud are also supported.
|
||||
|
||||
- `client_id` (string) - The application ID of the AAD Service Principal.
|
||||
Requires either `client_secret`, `client_cert_path` or `client_jwt` to be set as well.
|
||||
|
||||
- `client_secret` (string) - A password/secret registered for the AAD SP.
|
||||
|
||||
- `client_cert_path` (string) - The path to a pem-encoded certificate that will be used to authenticate
|
||||
as the specified AAD SP.
|
||||
|
||||
- `client_jwt` (string) - A JWT bearer token for client auth (RFC 7523, Sec. 2.2) that will be used
|
||||
to authenticate the AAD SP. Provides more control over token the expiration
|
||||
when using certificate authentication than when using `client_cert_path`.
|
||||
|
||||
- `object_id` (string) - The object ID for the AAD SP. Optional, will be derived from the oAuth token if left empty.
|
||||
|
||||
- `tenant_id` (string) - The Active Directory tenant identifier with which your `client_id` and
|
||||
`subscription_id` are associated. If not specified, `tenant_id` will be
|
||||
looked up using `subscription_id`.
|
||||
|
||||
- `subscription_id` (string) - The subscription to use.
|
||||
|
||||
- `cloud_environment_name` (string) - One of Public, China, Germany, or
|
||||
USGovernment. Defaults to Public. Long forms such as
|
||||
USGovernmentCloud and AzureUSGovernmentCloud are also supported.
|
||||
|
||||
- `client_id` (string) - The application ID of the AAD Service Principal.
|
||||
Requires either `client_secret`, `client_cert_path` or `client_jwt` to be set as well.
|
||||
|
||||
- `client_secret` (string) - A password/secret registered for the AAD SP.
|
||||
|
||||
- `client_cert_path` (string) - The path to a pem-encoded certificate that will be used to authenticate
|
||||
as the specified AAD SP.
|
||||
|
||||
- `client_jwt` (string) - A JWT bearer token for client auth (RFC 7523, Sec. 2.2) that will be used
|
||||
to authenticate the AAD SP. Provides more control over token the expiration
|
||||
when using certificate authentication than when using `client_cert_path`.
|
||||
|
||||
- `object_id` (string) - The object ID for the AAD SP. Optional, will be derived from the oAuth token if left empty.
|
||||
|
||||
- `tenant_id` (string) - The Active Directory tenant identifier with which your `client_id` and
|
||||
`subscription_id` are associated. If not specified, `tenant_id` will be
|
||||
looked up using `subscription_id`.
|
||||
|
||||
- `subscription_id` (string) - The subscription to use.
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<!-- Code generated from the comments of the Config struct in builder/azure/common/client/config.go; DO NOT EDIT MANUALLY -->
|
||||
|
||||
Config allows for various ways to authenticate Azure clients.
|
||||
When `client_id` and `subscription_id` are specified, Packer will use the
|
||||
specified Azure Active Directory (AAD) Service Principal (SP).
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue