refactor site to move HCL docs next to JSON docs

This commit is contained in:
Megan Marsh 2021-01-14 11:23:39 -08:00
parent 5a61823082
commit cca3109755
128 changed files with 371 additions and 320 deletions

View File

@ -33,7 +33,7 @@ The format of the configuration file is basic JSON.
## Configuration Reference
Below is the list of all available configuration parameters for the core
configuration file. None of these are required, since all have sane defaults.
configuration file. None of these are required, since all have defaults.
- `plugin_min_port` and `plugin_max_port` (number) - These are the minimum
and maximum ports that Packer uses for communication with plugins, since

View File

@ -1,37 +0,0 @@
---
page_title: Blocks - Configuration Language
sidebar_title: Blocks
description: The HCL language has a number of blocks that can be used to configure builds.
---
# Built-in Blocks
`@include 'from-1.5/beta-hcl2-note.mdx'`
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`.
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
list of all of the available built-in HCL2 blocks.
## Config example:
`@include 'from-1.5/variables/foo-block.mdx'`
- [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).
`@include 'from-1.5/sources/example-block.mdx'`
- [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).

View File

@ -0,0 +1,59 @@
---
page_title: Blocks - Configuration Language
sidebar_title: Blocks
description: The HCL language has a number of blocks that can be used to configure builds.
---
# Built-in Blocks
`@include 'from-1.5/beta-hcl2-note.mdx'`
The Packer - HCL2 language includes a number of built-in blocks that you can
use to configure builds. A block is a container for configuration.
The most important blocks can be broken into a couple of major types:
* `build` blocks contain configuration for a specific combination of builders,
provisioners, and post-processors used to create a specific image artifact.
* `source` blocks contain configuration for builder plugins. Once defined,
sources can be used and further configured by the "build" block.
* `provisioner` blocks contain configuration for provisioner plugins. These
blocks are nested inside of a build block.
* `post-processor` and `post-processors` blocks contain configuration for
post-processor plugins and post-processor plugin sequences. They are also
nested within `build` blocks.
* `variable` blocks contain configuration for variables that can either be
defaulted in configuration or set by the user at runtime.
* `locals` blocks contain configuration for variables that can be created using
HCL functions or data sources, or composited from variables created in the
variables blocks.
Use the sidebar to navigate to detailed documentation for each of these blocks.
Other blocks, such as the "packer" block, provide information to the Packer core
about what version it is allowed to run. The "required_plugins" block helps the
Packer core
Blocks can be defined in multiple files and `packer build folder` will build
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
list of all of the available built-in HCL2 blocks.
## Config example:
`@include 'from-1.5/variables/foo-block.mdx'`
- [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).
`@include 'from-1.5/sources/example-block.mdx'`
- [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).

View File

@ -35,6 +35,6 @@ Example of a variable assignment from a file:
# More on variables
- Read the [full variables](/docs/from-1.5/variables) description for a more
- Read the [full variables](/docs/templates/hcl_templates/variables) description for a more
thorough read.
- Read the [variables guide](/guides/hcl/variables) for more examples.

Some files were not shown because too many files have changed in this diff Show More