IAC – Azure WebApp creation

Step1: Terraform provider section

terraform {
required_providers {
azurerm ={
source = “hashicorp/azurerm”
version=”3.17.0″
}
}
}

Step2: Provider section of azu…


This content originally appeared on DEV Community and was authored by Srinivasulu Paranduru

Step1: Terraform provider section

    terraform {
        required_providers {
            azurerm ={
                source = "hashicorp/azurerm"
                version="3.17.0"
            }
        }  
    }

Step2: Provider section of azurerm

Refer to article to get mentioned details required to be provided in azurerm provider - https://dev.to/srinivasuluparanduru/azure-service-principal-creation-step-by-step-approach-2a46

provider "azurerm" {
        subscription_id = ""
        tenant_id = ""
        client_id = ""
        client_secret = ""    

        features {

        }
    }

Step3: Azure resource group creation

resource "azurerm_resource_group" "example" {
        name     = "template-grp"
        location = "North Europe"
    }

Step4: Azure service plan

resource "azurerm_service_plan" "plan202407" {
        name                = "plan202407"
        resource_group_name = azurerm_resource_group.example.name
        location            = "North Europe"
        os_type             = "Windows"
        sku_name            = "F1"
    }

Step5: Creation of Azure web app

resource "azurerm_windows_web_app" "example" {
        name                = "examplewebapp"
        resource_group_name = azurerm_resource_group.example.name
        location            = azurerm_service_plan.example.location
        service_plan_id     = azurerm_service_plan.example.id

        site_config {
            always_on = false
            application_stack {
                current_stack = "dotnet"
                dotnet_Version = "v6.0"
            }
        }
        depends_on= [
                azurerm_service_plan.plan202407
        ]
    }

References:
1.Service Plan

2.Azure webapp

Conclusion : Creation of Azure webapp using IAC - Terraform
💬 If you enjoyed reading this blog post and found it informative, please take a moment to share your thoughts by leaving a review and liking it 😀 and follow me in dev.to , linkedin


This content originally appeared on DEV Community and was authored by Srinivasulu Paranduru


Print Share Comment Cite Upload Translate Updates
APA

Srinivasulu Paranduru | Sciencx (2024-06-30T22:20:04+00:00) IAC – Azure WebApp creation. Retrieved from https://www.scien.cx/2024/06/30/iac-azure-webapp-creation/

MLA
" » IAC – Azure WebApp creation." Srinivasulu Paranduru | Sciencx - Sunday June 30, 2024, https://www.scien.cx/2024/06/30/iac-azure-webapp-creation/
HARVARD
Srinivasulu Paranduru | Sciencx Sunday June 30, 2024 » IAC – Azure WebApp creation., viewed ,<https://www.scien.cx/2024/06/30/iac-azure-webapp-creation/>
VANCOUVER
Srinivasulu Paranduru | Sciencx - » IAC – Azure WebApp creation. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/30/iac-azure-webapp-creation/
CHICAGO
" » IAC – Azure WebApp creation." Srinivasulu Paranduru | Sciencx - Accessed . https://www.scien.cx/2024/06/30/iac-azure-webapp-creation/
IEEE
" » IAC – Azure WebApp creation." Srinivasulu Paranduru | Sciencx [Online]. Available: https://www.scien.cx/2024/06/30/iac-azure-webapp-creation/. [Accessed: ]
rf:citation
» IAC – Azure WebApp creation | Srinivasulu Paranduru | Sciencx | https://www.scien.cx/2024/06/30/iac-azure-webapp-creation/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.