Packer
HashiCups
@hashicorp
The HashiCups plugin is a reference plugin for learning how to use HashiCorp Packer.
- Official
Updated 2 years ago
- GitHub(opens in new tab)
Coffees
Type: hashicups-coffees
The coffees data source is used to fetch all the coffees ids existent in the HashiCups menu.
Required
username
(string) - The username signed up to the Product API.password
(string) - The password for the username signed up to the Product API.
Optional
host
(string) - The Product API host URL. Defaults tolocalhost:19090
OutPut
map
(map[string]string) - A map of coffee name to coffee id.
Example Usage
data "hashicups-coffees" "coffees" {
username = "education"
password = "test123"
}
locals {
vagrante_espresso = data.hashicups-coffees.coffees.map["Vagrante espresso"]
}
source "hashicups-order" "my-custom-order" {
username = "education"
password = "test123"
item {
coffee {
id = local.vagrante_espresso
name = "my custom vagrante"
ingredient {
id = 1
quantity = 50
}
}
}
}
build {
sources = ["sources.hashicups-order.my-custom-order"]
}