-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
42 lines (38 loc) · 960 Bytes
/
main.tf
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
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 2.26"
}
}
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "examplerg" {
name = "example-rg"
location = "northeurope"
}
resource "azurerm_app_service_plan" "exampleplan" {
name = "example-plan"
location = azurerm_resource_group.examplerg.location
resource_group_name = azurerm_resource_group.examplerg.name
kind = "Linux"
reserved = true
sku {
tier = "basic"
size = "b1"
}
}
resource "azurerm_app_service" "exampleapp" {
name = "example"
location = azurerm_resource_group.examplerg.location
resource_group_name = azurerm_resource_group.examplerg.name
app_service_plan_id = azurerm_app_service_plan.exampleplan.id
site_config {
linux_fx_version = "COMPOSE|${base64encode(file("docker-compose.yml"))}"
}
app_settings = {
"WEBSITES_ENABLE_APP_SERVICE_STORAGE" = "true"
}
}