I created this repo https://github.com/Adron/terrazuraā during a live stream on my Twitch Thrashing Code Channel š¤ at 10am on the 30th of December, 2020. The VOD is now available on my YouTube Thrashing Code Channel https://youtube.com/thrashingcodeā. A rough as hell year, but wanted to wrap it up with some solid content. In this stream I tackled a ton of specifics, in detail about getting Hasura deployed in Azure, Postgres backed, a database schema designed and created, using database schema migrations, and all sorts of tips n’ tricks along the way. 3 hours of solid how to get shit done material!
For live streams, check out and follow at https://www.twitch.tv/thrashingcodeā šš» or for VOD viewing check out https://youtube.com/thrashingcode
02:49ā – Shout out to the stream sponsor, Azure, and links to some collateral material.
14:50ā – In this first segment, I start but run into some troubleshooting needs around the provider versions for Terraform in regards to Azure. You can skip this part unless you want to see what issue I ran into.
18:24ā – Since I ran into issues with the current version of Terraform I had installed, at this time I show a quick upgrade to the latest version.
27:22ā – After upgrading and fighting through trial and error execution of Terraform until I finally get the right combination of provider and Terraform versions.
27:53ā – Adding the first Terraform resource, the Azure resource group.
29:47ā – Azure Portal oddness, just to take note off if/when you’re working through this. Workaround later in the stream.
32:00ā – Adding the Postgres server resource.
44:43ā – In this segment I switched over to Jetbrain’s Intellij to do the rest of the work. I also tweak the IDE to re-add the plugin for the material design themes and icons. If you use this IDE, it’s very much IMHO worth getting this to switch between themes.
59:32ā – After getting leveled-up with the IDE, I wrap up the #Postgresā server resource and #terraformā apply it the overall set of resources. At this point I also move forward with the infrastructure as code, with emphasis on additive changes to the immutable infrastructure by emphasizing use of terraform apply and minimizing any terraform destroy use.
1:02:07ā – At this time, I try figuring out the portal issue by az logout and logging back in az login to Azure Still no resources shown but…
1:08:47ā – eventually I realize I have to use the hack solution of pasting the subscription ID into the
@Azure portal to get resources for the particular subscription account which seems highly counter intuitive since its the ONLY account. š§
1:22:54ā – The next thing I setup, now that I have variables that need passed in on every terraform execution, I add a script to do this for me.
1:29:35ā – Next up is adding the database to the database server and firewall rule. Also we get to see Jetbrains #Intellijā HCL plugin introspection at work adding required properties to the firewall resource! A really useful feature.
1:38:24ā – Next up, creating the Azure container to deploy our Hasura GraphQL API for #Postgresā to!
1:51:42ā – BAM! API Server is done and launched! I’ve got a live #GraphQLā API up and running in Azure and we’re ready to start building a data model!
1:56:22ā – In this segment I show how to turn off the public facing console and shift one’s development workflow to the local Hasura console working against – local OR your live dev environment.
1:58:29ā – Next segment I get into schema migrations, initializing a directory structure for Hasura CLI use, and metadata, migrations, and related data. Including an update to the latest CLI so you can see how to do that, after a run into a slight glitch. š¬
2:23:02ā – I also shift over to dbdiagram to graphically build out some of the schema via their markdown, then use the SQL export option for #postgresā combined with Hasura’s option to execute plain ole SQL via migrations…
2:31:48ā – Getting a bit more in depth in this segment, I delve through – via the Hasura console – to build out relationships between the tables and data so the graphql queries can introspect accordingly.
2:40:30ā – Next segment, graphql time! I show some of the options of what is available immediately for queries and mutations via the console.
2:50:36ā – Then some more details about metadata. I’m going to do a stream with further details, since I was a little fuzzy on some of those details myself, in the very very near future. However a good introduction to what the metadata does for the #graphqlā API.
2:59:07ā – Then as a wrap up to all of this… I nuke EVERYTHING and deploy it all out to Azure again inclusive of schema migrations, metadata, etc. š¤š»
3:16:30ā – Final segment, I add some data to the database and get into a few basic queries and mutations in #graphqlā via the #graphiqlā console interface in #Hasuraā.

You must be logged in to post a comment.