From 34ac1018ee5f4a0c3682d6b1e76dc5414c39c075 Mon Sep 17 00:00:00 2001 From: WayneGoosen <13494899+WayneGoosen@users.noreply.github.com> Date: Wed, 3 Jul 2024 22:22:57 +0200 Subject: [PATCH] feat: add more to part 3 draft --- .../streamlit-deployment-guide-part-3-azure-infra.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/content/blog/streamlit-deployment-guide-part-3-azure-infra.mdx b/src/content/blog/streamlit-deployment-guide-part-3-azure-infra.mdx index 87a1fc5..60ad655 100644 --- a/src/content/blog/streamlit-deployment-guide-part-3-azure-infra.mdx +++ b/src/content/blog/streamlit-deployment-guide-part-3-azure-infra.mdx @@ -42,6 +42,8 @@ The code is split into the following files: ### main.tf +This Terrafom configuration assumes the resource group has already been created and permissions assigned only to this reasource group for the service principle. This data source uses the `resource_group_name` variable to retrieve the azurerm_resource_group information. + ```hcl data "azurerm_resource_group" "rg" { name = var.resource_group_name @@ -50,6 +52,10 @@ data "azurerm_resource_group" "rg" { ### providers.tf +This is the basic providers configuration. As we are using Azure, the azurerm provider is specified along with the backend configuration to store the tfstate within a storage account within Azure. random provide is also added as it is used to generate some random characters as you will see later. + +See [providers configuration](https://developer.hashicorp.com/terraform/language/providers/configuration) + ```hcl terraform { required_providers { @@ -80,6 +86,8 @@ provider "azurerm" { ### variables.tf +This file holds all the variable definitions. Allowing us to provide any custom values to our Terraform resources. See the description of the variable to understand each. + ```hcl variable "resource_group_name" { type = string @@ -143,6 +151,8 @@ variable "environment" { ### locals.tf +See [locals](https://developer.hashicorp.com/terraform/language/values/locals) + ```hcl locals { app_service_plan_name = "asp-${var.app_name}"