
The Terraform Plugin for the Dominos Pizza Provider - mooreds
https://github.com/ndmckinley/terraform-provider-dominos
======
james_s_tayler
Epic. Now it's got me thinking this is a first step towards declaratively
stating what should be in my fridge at all times and having food automatically
provisioned for me.

~~~
mooreds
Looked around but couldn't find a grocery store API to help deliver the dream.

~~~
james_s_tayler
My local supermarket has an online ordering platform. I could reverse engineer
the API.

------
erik_seaberg
This seems like poor cloud architecture. What I really want is _at least one_
pizza delivered from several kitchens and assurance that drivers will use
different routes.

A good upgrade from the fax API xpizza had to rely on, though.

~~~
evv
We can engineer a solution to the dynamic tradeoffs you see in food delivery..

Sometimes you want at least one pizza, reliably as possible, and you're
willing to pay extra. Other times you may want a pizza as affordable as
possible, even if it is delayed or the order may be cancelled on you. The open
generic API should support this high-level configuration, and the provider
should be auto-selected according to your needs.

I also see an opportunity for this in the ride-sharing space. Sometimes riders
are looking for a cheap and possibly slow option, other times a premium is
expected for a fast trip. In my dreams I could use an open app that
understands these tradeoffs, and automatically requests a driver from Uber,
Lyft, or any other Taxi provider who offers safe/fast/affordable drivers in a
given area.

~~~
james_s_tayler
So maybe it the same pizza could come from multiple providers but they break
it up into slices and attach a pizza-correlation-id to each slice so an entire
pizza can be assembled at the point of delivery.

~~~
erik_seaberg
And a table of pre-sliced pizza would be less prone to philosophers starving
while deadlocked on acquiring utensils.

~~~
cbanek
What if two philosophers grab the same slice and won't let go?

~~~
pbhjpbhj
One eats the pizza first, then the other eats it, problem solved!

~~~
nwmcsween
That just serializes the problem, maybe the philosophers could just atomically
take a slice, but what if its half pinapple and naturally no one likes
pinapple and there arent enough slices?

~~~
pbhjpbhj
Reminds me of mathematical methods for fairly dividing cake, eg
[https://mindyourdecisions.com/blog/2015/12/22/how-to-
split-a...](https://mindyourdecisions.com/blog/2015/12/22/how-to-split-a-cake-
fairly-using-math-game-theory-tuesdays/) (though I don't think that's the
method I'm recalling).

------
daenz
Pretty amusing. If you aren't familiar with Terraform, it is declarative. You
provide the desired state of your system, and if the current state is
different, TF does its best to heal components and their dependencies into
that state.

"Having pizza" would be the state TF is trying to achieve here

~~~
usr1106
So you must not forget to call destroy every time you eat it or how is this
supposed to work? (No Dominos in this country, so I cannot test)

~~~
sethvargo
While it does work, this provider is designed to showcase the power of
Terraform and flexibility. I don’t recommend using this in production :)

~~~
xfitm3
Terraform is buggy. It may be powerful, but only because its easier to learn
vs cloudformation.

~~~
Aeolun
Also, it works outside of AWS.

------
grogenaut
Terrible example, does not encourage best practices. It recommends checking in
your credit card information. A good example would show how to properly
protect this information with Vault or a cloud specific secrets provider.

I can just imagine all of the exploited credit cards of devops engineers due
to this.

~~~
banglaman
Found the infosec person

~~~
lonelappde
"don't blast your private keys to the whole world" isn't infosec people, it's
anyone allowed to get near a business operation.

~~~
grogenaut
Lol this is worse, it's "don't put your credit card info on github including
CVV2".

But This article is pretty silly so my OP is meant to be a bit silly, tho
apparently people are taking teraforming a pizza seriously.

------
aashishkoirala
My favorite part: "terraform destroy is implemented on the client side, by
consuming the pizza."

------
benj111
I was expecting this to 'terraform' some shop into a dominoes, some kind of
recipe for shop fitters to fitout a Dominoes in a standard way.

I assume this is all contained in style guides, and various other tomes. Has
any company tried doing it programmatically though???

------
linux2647
I’ve heard Dominos described as a tech company disguised as a pizza company.
This continues to support that idea.

(I know this provider isn’t from them, but it still applies nonetheless)

~~~
mises
That explains why their pizza isn't that good, especially compared to, say,
Costco.

~~~
lonelappde
Who is better at a cheaper price? Of you count Costco you have to count how
much hassle it is to obtain a pizza from Costco.

~~~
mises
I'm often too cheap to pay for delivery any way. Plus, I can usually add pick-
up (including at Costco) to a list of existing errands.

------
spicyusername
What a time to be alive!

------
Future95
Very good news ehh^^

