7 ms·
The Terraform Plugin for the Dominos Pizza Provider
- daenz 7y agoPretty 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
- t34543 7y agoMeh. I used terraform for a few years and every time it didn’t work the way I wanted I found a ignored github issue. Vaporware as far as I am concerned.
- diminoten 7y agoLuckily you're not the only consumer of Terraform...
- deleted 7y ago[deleted]
- Thaxll 7y ago"vaporware" you mean the most popular tool to deploy on cloud platforms.
- t34543 7y agoI prefer cloudformation
- erik_seaberg 7y agoMy biggest issue with CloudFormation is that it absolutely refused to start managing any resource it didn't create. "terraform import" is clumsy but better than nothing. I always thought CloudFormation was also less extensible, but it looks like they have Lambda-based macros now, which might actually be less hassle than writing gRPC plugin servers for Terraform. Now I need to look up how to extend Pulumi. I'm reluctant to use anything that will require generating a lot of Go code.
- t34543 7y agoIf you create resources outside of terraform/CF your doing it wrong. This is a feature, not a bug.
- mooreds 7y agoThat's a beautiful statement of purity, but my reality has been different. Even with the best of intensions sometimes resources are created outside of an IaC solution and you want to bring them in. On the other hand I hear that CF's rollback is better at not leaving things in a busted state.
- erik_seaberg 7y agoWe don't seem to have used Terraform for everything since day one. Even if we had, we can't migrate to CloudFormation without abandoning our Terraform-created datastores and live-migrating to new ones. (Not that we necessarily want to, at this point.)
- auslander 7y agoThis. It takes years to learn good architecture, and Cloudformation nudges you to make it right. Thats why you need senior infrastructure engineers.
- jen20 7y agoThis is 100% unrelated to “senior infrastructure engineers” (most of whom I’ve seen end up building pure crap), and import is simply a matter of practicality. If we followed the (patently poor) advice above, CF users would not have been able to use NAT Gateways - to take one of several prominent examples - for many months following their launch. Terraform was substantially faster to support them, but being able to import resources created outside the normal mechanism for _any_ reason is an essential part of any IaC tool.
- deleted 7y ago[deleted]
- dkersten 7y agoAnd outside of AWS?
- erik_seaberg 7y agoTerraform supports multiple vendors, but your templates are not vendor-neutral, you have to rewrite them all. I don't see it as that big a win over using each vendor's native tools, as long as they all support a config managed in git.
- dkersten 7y agoWith terraform, I at least only have to learn one syntax, so there’s at least that, if noting else.
- scarface74 7y agoWhich does little good if you still have to learn the provisioner, the terminology and the idiosyncrasies of the platform. And good luck using your business support plan with AWS when something goes wonky and you’re using Terraform.
- sciurus 7y agoIt does plenty of good. I have software that spans AWS, Azure, and GCP (don't ask me why). I can easily manage it as a cohesive whole, e.g. using an ip address provisioned in GCP as the target of a DNS record provisioned in AWS. I can spin it all up in a single call to a single tool. Under the hood, terraform is just using the AWS APIs. If an error occurs with them, getting support isn't an issue.
- dangus 7y agome too } } } } }
- usr1106 7y agoSo 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 7y agoWhile it does work, this provider is designed to showcase the power of Terraform and flexibility. I don’t recommend using this in production :)
- toomuchtodo 7y agoIf this isn’t production, I don’t know what is :)
- xfitm3 7y agoTerraform is buggy. It may be powerful, but only because its easier to learn vs cloudformation.
- jen20 7y agoSadly client side implementations of Destroy tend to leave you with inconsistent state files ;-)
- jitl 7y agoIt orders one on each apply. From the docs: > “As far as I know, there is no programmatic way to destroy an existing pizza. terraform destroy is implemented on the client side, by consuming the pizza.”
- jhanschoo 7y agoMore accurately, having a particular pizza order from Dominos seems to be that desired state. It's then up to Dominos to recognize that a correct pizza order is incomplete without a completed pizza delivery.
- MrEldritch 7y agoDominos has an online order tracker, so it ought to be possible to have this plugin recognize when an order is in fact complete.
- erik_seaberg 7y agoThis 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.
- ljm 7y agoI’d like it on Kubernetes so the pizza’s readiness probe can ping my IoT doorbell. Plus, the ability to add a sidecar container of garlic bread and dips would be nice. And the rolling deploys are a nice addition.
- evv 7y agoWe 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 7y agoSo 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 7y agoAnd a table of pre-sliced pizza would be less prone to philosophers starving while deadlocked on acquiring utensils.
- Future95 7y agoVery good news ehh^^
- aashishkoirala 7y agoMy favorite part: "terraform destroy is implemented on the client side, by consuming the pizza."
- deleted 7y ago[deleted]
- james_s_tayler 7y agoEpic. 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 7y agoLooked around but couldn't find a grocery store API to help deliver the dream.
- jackvalentine 7y agoSome kind of abstraction like postmates maybe?
- james_s_tayler 7y agoMy local supermarket has an online ordering platform. I could reverse engineer the API.
- znpy 7y agoAmazon Prime Pantry ?
- Operyl 7y agoWalmart Grocery Delivery?
- linux2647 7y agoI’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 7y agoThat explains why their pizza isn't that good, especially compared to, say, Costco.
- lonelappde 7y agoWho 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 7y agoI'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.
- deleted 7y ago[deleted]
- grogenaut 7y agoTerrible 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 7y agoFound the infosec person
- lonelappde 7y ago"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 7y agoLol 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.
- ozzmotik 7y ago>.gitignore
- deleted 7y ago[deleted]
- sandinmytea 7y agoYou sick fuckers are getting yourselves deeper into your dark, unavoidable reality. You can't avoid getting caught forever, sickos.
- imihai1988 7y agoAnd who hurt you ? On topic, this seems like a good showcase of Terraforms' flexibility, and a good side project for the OP.
- quickthrower2 7y agoAre you calling us sick fuckers because of choice of diet or devops tools.
- deleted 7y ago[deleted]
- spicyusername 7y agoWhat a time to be alive!
- benj111 7y agoI 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???