Make template documentation visible from components docs (#10611)
This commit is contained in:
parent
915372c73d
commit
c5fca1f876
|
@ -13,5 +13,8 @@ for various platforms. For example, there are separate builders for EC2,
|
||||||
VMware, VirtualBox, etc. Packer comes with many builders by default, and can
|
VMware, VirtualBox, etc. Packer comes with many builders by default, and can
|
||||||
also be extended to add new builders.
|
also be extended to add new builders.
|
||||||
|
|
||||||
To learn more about an individual builder, choose it from the sidebar. Each
|
See the [`source`](/docs/templates/hcl_templates/blocks/source) block documentation to learn more
|
||||||
|
about configuring builders in the Packer language.
|
||||||
|
For information on an individual builder, choose it from the sidebar. Each
|
||||||
builder has its own configuration options and parameters.
|
builder has its own configuration options and parameters.
|
||||||
|
|
||||||
|
|
|
@ -11,4 +11,8 @@ sidebar_title: Data Sources
|
||||||
Data sources allow data to be fetched for use in Packer configuration. Use of data sources
|
Data sources allow data to be fetched for use in Packer configuration. Use of data sources
|
||||||
allows a build to use information defined outside of Packer.
|
allows a build to use information defined outside of Packer.
|
||||||
|
|
||||||
|
See the [`data`](/docs/templates/hcl_templates/datasources) block documentation to learn more
|
||||||
|
about working with data sources. For information on an individual data source,
|
||||||
|
choose it from the sidebar.
|
||||||
|
|
||||||
-> **Note:** Data sources is a feature exclusively to HCL2 templates included in Packer `v1.7.0`.
|
-> **Note:** Data sources is a feature exclusively to HCL2 templates included in Packer `v1.7.0`.
|
||||||
|
|
|
@ -12,3 +12,7 @@ Post-processors run after the image is built by the builder and provisioned by
|
||||||
the provisioner(s). Post-processors are optional, and they can be used to
|
the provisioner(s). Post-processors are optional, and they can be used to
|
||||||
upload artifacts, re-package, or more. For more information about
|
upload artifacts, re-package, or more. For more information about
|
||||||
post-processors, please choose an option from the sidebar.
|
post-processors, please choose an option from the sidebar.
|
||||||
|
|
||||||
|
See [`post-processor`](/docs/templates/hcl_templates/blocks/build/post-processor) and
|
||||||
|
[`post-processors`](/docs/templates/hcl_templates/blocks/build/post-processors)
|
||||||
|
blocks documentations to learn more about working with post-processors.
|
||||||
|
|
|
@ -17,6 +17,6 @@ use cases for provisioners include:
|
||||||
- creating users
|
- creating users
|
||||||
- downloading application code
|
- downloading application code
|
||||||
|
|
||||||
See [Template Provisioners](/docs/templates/legacy_json_templates/provisioners) to learn more
|
See the [`provisioner`](/docs/templates/hcl_templates/blocks/build/provisioner) block documentation to learn more
|
||||||
about working with provisioners. For information on an individual provisioner,
|
about working with provisioners. For information on an individual provisioner,
|
||||||
choose it from the sidebar.
|
choose it from the sidebar.
|
||||||
|
|
|
@ -23,15 +23,18 @@ also defined an `output_image` field (or if one of the build-level source blocks
|
||||||
redefined and image field), Packer would error.
|
redefined and image field), Packer would error.
|
||||||
|
|
||||||
```hcl
|
```hcl
|
||||||
# builds.pkr.hcl
|
# file: builds.pkr.hcl
|
||||||
source "lxd" "arch" {
|
source "lxd" "arch" {
|
||||||
image = "archlinux"
|
image = "archlinux"
|
||||||
}
|
}
|
||||||
|
|
||||||
build {
|
build {
|
||||||
|
# Use the singular `source` block set specific fields.
|
||||||
|
# Note that fields cannot be overwritten, in other words, you cannot
|
||||||
|
# set the 'image' field from the top-level source block in here, as well as
|
||||||
|
# the 'name' and 'output_image' fields cannot be set in the top-level source block.
|
||||||
source "lxd.arch" {
|
source "lxd.arch" {
|
||||||
// setting the name field allows to rename the source only for this build
|
# Setting the name field allows to rename the source only for this build section.
|
||||||
// section.
|
|
||||||
name = "nomad"
|
name = "nomad"
|
||||||
output_image = "nomad"
|
output_image = "nomad"
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,8 @@ set specific source fields.
|
||||||
build {
|
build {
|
||||||
source "source.amazon-ebs.example" {
|
source "source.amazon-ebs.example" {
|
||||||
# Here Packer will use the provided ami_name instead of defaulting it.
|
# Here Packer will use the provided ami_name instead of defaulting it.
|
||||||
|
# Note that fields cannot be overwritten, in other words, you cannot
|
||||||
|
# set the 'ami_name' field in the top-level source block.
|
||||||
ami_name = "specific"
|
ami_name = "specific"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue