-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
57 lines (51 loc) · 1.59 KB
/
main.tf
File metadata and controls
57 lines (51 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Configure the Azure provider
terraform {
backend "azurerm" {
resource_group_name = "perudotnet-rg"
storage_account_name = "terraformstpdn"
container_name = "tfstatedevops"
key = "tfstatedevops.tfstate"
}
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 3.0.0"
}
}
required_version = ">= 0.14.9"
}
provider "azurerm" {
features {}
}
# Create the resource group
resource "azurerm_resource_group" "rg" {
name = "perudotnet-apps-rg"
location = "westeurope"
}
# Create the Linux App Service Plan
resource "azurerm_service_plan" "appserviceplan" {
name = "perudotnet-apps"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
os_type = "Windows"
sku_name = "F1"
}
# Create the web app, pass in the App Service Plan ID
resource "azurerm_linux_web_app" "webapp" {
name = "perudotnetwa"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
service_plan_id = azurerm_service_plan.appserviceplan.id
site_config {
use_32_bit_worker = true
always_on = false
}
}
# Deploying sourec code from GitHub app!
# 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
# }