Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Data Sources to improve template #88

Closed
outscale-hmi opened this issue Oct 3, 2022 · 1 comment
Closed

Using Data Sources to improve template #88

outscale-hmi opened this issue Oct 3, 2022 · 1 comment

Comments

@outscale-hmi
Copy link
Contributor

Data sources allow data to be fetched or computed for use elsewhere in local and configuration.
Use of data sources allows a Builder to make use of information defined outside of Packer.

A data source can output one or more attributes, which can be used by adding their key name to the data source unique identifier, like data....

Example:
"data.amazon-ami.example" {
id = "ami12345"
name = "MyAMI"
creation_date = "01/01/2021"
owner = "123456789"
owner_name = "Some Name"
tags = {"tag1": "value"}
}

See doc https://www.packer.io/docs/templates/hcl_templates/datasources

@outscale-hmi
Copy link
Contributor Author

PR #128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant