Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucile Jeanneret committed Dec 16, 2024
1 parent 74edcb8 commit 78a9bc5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,32 @@ provider "azurerm" {
data "azurerm_resource_group" "rg" {
name = "rg-virtual-teacher-demo-wus"
}
# Create the Linux App Service Plan
resource "azurerm_service_plan" "appserviceplan" {
name = "webapp-asp-${random_integer.ri.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
os_type = "Linux"
sku_name = "B1"
}

resource "azurerm_app_service_plan" "appserviceplan" {
name = "plan-virtual-teacher-demo-wus"
location = data.azurerm_resource_group.rg.location
resource_group_name = data.azurerm_resource_group.rg.name
sku {
tier = "Standard"
size = "S1"
# Create the web app, pass in the App Service Plan ID
resource "azurerm_linux_web_app" "webapp" {
name = "webapp-${random_integer.ri.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
service_plan_id = azurerm_service_plan.appserviceplan.id
https_only = true
site_config {
minimum_tls_version = "1.2"
}
}

resource "azurerm_app_service" "appservice" {
name = "webapp-virtual-teacher-demo-wus"
location = data.azurerm_resource_group.rg.location
resource_group_name = data.azurerm_resource_group.rg.name
app_service_plan_id = azurerm_app_service_plan.appserviceplan.id
# Deploy code from a public GitHub repo
resource "azurerm_app_service_source_control" "sourcecontrol" {
app_id = azurerm_linux_web_app.webapp.id
repo_url = "https://github.com/Azure-Samples/nodejs-docs-hello-world"
branch = "master"
use_manual_integration = true
use_mercurial = false
}
Empty file added deploy/outputs.tf
Empty file.

0 comments on commit 78a9bc5

Please sign in to comment.