• Infrastructure
    • terraform
    • packer
  • Networking
    • consul
  • Security
    • vault
    • boundary
  • Applications
    • nomad
    • waypoint
    • vagrant
  • HashiCorp Cloud Platform

    A fully managed platform to automate infrastructure on any cloud with HashiCorp products.

    • consul
    • terraform
    • vault
    • packerbeta
    Visit cloud.hashicorp.com
  • Overview
  • Tutorials
  • Docs
  • Plugins
  • Community
GitHubInstall PackerTry HCP Packer
  • About External Plugins

      • 1&1
      • Alicloud ECS
      • Alicloud Import
      • Anka Registry Push
      • VM Clone
      • VM Create
      • Ansible (Remote)
      • Ansible Local
      • Overview
      • Amazon AMI
      • Parameter Store
      • Secrets Manager
      • Overview
      • chroot
      • EBS
      • EBS Surrogate
      • EBS Volume
      • Instance
      • Amazon Import
      • Overview
      • ARM
      • chroot
      • DTL
      • Azure DTL Artifact
      • Chef Client
      • Chef Solo
      • CloudStack
      • Converge
      • digitalocean
      • digitalocean-import
      • Docker
      • Docker Import
      • Docker Push
      • Docker Save
      • Docker Tag
      • Overview
      • Commit
      • Repository
      • Tree
      • Google Cloud Platform
      • googlecompute-export
      • googlecompute-import
      • Overview
      • Receipt
      • Overview
      • Toppings
      • Overview
      • Coffees
      • Ingredients
      • Overview
      • Order
      • Hetzner Cloud
      • HuaweiCloud
      • HyperOne
      • Overview
      • ISO
      • VMCX
      • InSpec
      • JDCloud
      • Kamatera
      • Linode
      • Libvirt
      • LXC
      • LXD
      • Naver Cloud
      • OpenStack
      • Overview
      • Classic
      • OCI
      • Overview
      • BSU
      • BSU Surrogate
      • BSU Volume
      • chroot
      • Overview
      • ISO
      • PVM
      • ProfitBricks
      • Overview
      • Clone
      • ISO
      • Puppet Masterless
      • Puppet Server
      • QEMU
      • Salt Masterless
      • Scaleway
      • SSH Key
      • Tencent Cloud
      • Triton
      • UCloud
      • UCloud Import
      • upcloud
      • upcloud-import
      • Vagrant
      • Vagrant
      • Vagrant Cloud
      • Overview
      • ISO
      • OVF
      • VM
      • Overview
      • Clone
      • ISO
      • vSphere
      • vSphere Template
      • Overview
      • ISO
      • VMX
      • Vultr
      • Yandex
      • yandex-export
      • yandex-import
Type '/' to Search
Official
v1.0.1

Ingredients

Type: hashicups-ingredients

The ingredients data source is used to fetch the ingredients ids for an existent coffee 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.

  • coffee (string) - The coffee id you would like to get the ingredient from. The ID should exist in the HashiCups menu.

Optional

  • host (string) - The Product API host URL. Defaults to localhost:19090

OutPut

  • map (map[string]string) - A map of ingredient name to ingredient id.

Example Usage

data "hashicups-ingredients" "packer-ingredients" {
  username = "education"
  password = "test123"
  coffee = "Packer Spiced Latte"
}

locals {
  semi_skimmed_milk = data.hashicups-ingredients.packer-ingredients.map["Semi Skimmed Milk"]
}

source "hashicups-order" "my-custom-order" {
  username = "education"
  password = "test123"

 item {
    coffee {
      id = 1
      name = "my custom packer spiced latter"
      ingredient {
        id = local.semi_skimmed_milk
        quantity = 200
      }
    }
    quantity = 2
  }
}

build {
  sources = ["sources.hashicups-order.my-custom-order"]
}
data "hashicups-ingredients" "packer-ingredients" {
  username = "education"
  password = "test123"
  coffee = "Packer Spiced Latte"
}
 
locals {
  semi_skimmed_milk = data.hashicups-ingredients.packer-ingredients.map["Semi Skimmed Milk"]
}
 
source "hashicups-order" "my-custom-order" {
  username = "education"
  password = "test123"
 
 item {
    coffee {
      id = 1
      name = "my custom packer spiced latter"
      ingredient {
        id = local.semi_skimmed_milk
        quantity = 200
      }
    }
    quantity = 2
  }
}
 
build {
  sources = ["sources.hashicups-order.my-custom-order"]
}
github logoEdit this page
IntroGuidesDocsCommunityPrivacySecurityPress KitConsent Manager