30 lines
624 B
Plaintext
Raw Normal View History

2020-05-26 15:29:47 +02:00
---
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'`
2020-05-28 16:22:07 +02:00
A `source` block nested in a `build` block allows to use an already defined
source and to set specific fields.
2020-05-26 15:29:47 +02:00
```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
2020-05-28 16:22:07 +02:00
error will be displayed. For example: you cannot define the `output` field in
2020-05-26 15:29:47 +02:00
the source declaration **and** in the source usage.