30 lines
630 B
Plaintext
30 lines
630 B
Plaintext
|
---
|
||
|
description: >
|
||
|
Something
|
||
|
|
||
|
Something
|
||
|
layout: docs
|
||
|
page_title: source - build - Blocks
|
||
|
sidebar_title: <tt>source</tt>
|
||
|
---
|
||
|
|
||
|
# The `source` block
|
||
|
|
||
|
`@include 'from-1.5/beta-hcl2-note.mdx'`
|
||
|
|
||
|
The `source` block in a `build` block allows to use an already defined source
|
||
|
and to set build fields of a source.
|
||
|
|
||
|
```hcl
|
||
|
# builds.pkr.hcl
|
||
|
build {
|
||
|
source "amazon-ebs.example" {
|
||
|
output = "specific-value"
|
||
|
}
|
||
|
# ...
|
||
|
}
|
||
|
```
|
||
|
|
||
|
-> **Note:** If any top-level attribute is re-defined with the same name an
|
||
|
error will be displayed. In other words you cannot define the `output` field in
|
||
|
the source declaration **and** in the source usage.
|