Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

cloudteachable profile imageSrinivasulu Paranduru
Srinivasulu Paranduru forcloudteachable

Posted on

IAC - Azure WebApp creation

Step1: Terraform provider section

    terraform {        required_providers {            azurerm ={                source = "hashicorp/azurerm"                version="3.17.0"            }        }      }
Enter fullscreen modeExit fullscreen mode

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 {        }    }
Enter fullscreen modeExit fullscreen mode

Step3: Azure resource group creation

resource "azurerm_resource_group" "example" {        name     = "template-grp"        location = "North Europe"    }
Enter fullscreen modeExit fullscreen mode

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"    }
Enter fullscreen modeExit fullscreen mode

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        ]    }
Enter fullscreen modeExit fullscreen mode

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 indev.to ,linkedin

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

More fromcloudteachable

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp