Giter Club home page Giter Club logo

order-a-pizza's Introduction

Order a Pizza from Dominos using Terraform Cloud

This Terraform code can be linked to a Terraform Cloud workspace, enabling pizzas to be ordered via Terraform Cloud after you set variables with information for yourself, your credit card, and the store you want to order from.

This uses the terraform-provider-dominos provider by Nathan McKinley.

It uses Terraform 0.12 and allows you to order multiple pizzas and multiple drinks.

Variables

Here are some of the key variables:

  • pizza_attributes is a list of lists of words from the names of Dominos specialty pizzas as they appear on their website after selecting a style like "Deluxe", a size ("Small", "Medium", or "Large"), and a crust ("Hand Tossed", "Thin", or "Brooklyn"). So, you could set this to something like:
[
 ["Small", "Hand Tossed", "MeatZZa" ],
 ["Large", "Thin", "Honolulu Hawaiian"]
]
  • drink_attributes is a list of lists of words from the names of Dominos specialty pizzas as they appear on their website after selecting a type like "Coke" or "Diet Coke" and a size like "2-Liter Bottle" or "20oz Bottle". So, you could set this to something like:
[
 ["20oz Bottle Coke"],
 ["20oz Bottle Diet Coke"]
]

Note: it is better to enter the drinks with a single string to avoid multiple matches.

  • The store_street, store_city, store_state, and store_zip_code attributes are required to uniquely specify a store since the Dominos provider determines the store ID from these attributes.

The attributes first_name, last_name, email, and phone are needed in order to do a plan against the provider and run the Sentinel policy checks, but their values don't matter unless you actually do an apply which will actually order a pizza. Please do not do an apply with a real credit card number since it will be charged and since Dominos will try to deliver a pizza to the address you gave.

Sentinel Policies

There are 3 Sentinel policies that can be used to restrict orders placed with the provider:

  1. restrict-order-size.sentinel prevents an order from having more than 2 items in it.
  2. restrict-order-cost.sentinel restricts orders from costing $21 or more.
  3. no-pineapple.sentinel blocks pizzas that have pineapple on them by blocking any pizza that has "Hawaiian" in its name.

order-a-pizza's People

Contributors

rberlind avatar jmccoydev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.