I created this repo 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. 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β.
Top comments (0)