Skip to content

Instantly share code, notes, and snippets.

@rossarioking
Created July 27, 2023 13:34
Show Gist options
  • Save rossarioking/e642780c16eefea2fc9fdd8598ccdd39 to your computer and use it in GitHub Desktop.
Save rossarioking/e642780c16eefea2fc9fdd8598ccdd39 to your computer and use it in GitHub Desktop.
Deploy a Web Application with Terraform
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "= 2.99"
}
}
}
provider "azurerm" {
features {}
skip_provider_registration = true
}
resource "azurerm_app_service_plan" "svcplan" {
name = "newweb-appserviceplan"
location = "eastus"
resource_group_name = "191-6d76942d-deploy-a-web-application-with-terrafo"
sku {
tier = "Standard"
size = "S1"
}
}
resource "azurerm_app_service" "appsvc" {
name = "custom-tf-webapp-for-rossariosapp"
location = "eastus"
resource_group_name = "191-6d76942d-deploy-a-web-application-with-terrafo"
app_service_plan_id = azurerm_app_service_plan.svcplan.id
site_config {
dotnet_framework_version = "v4.0"
scm_type = "LocalGit"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment