This repository has been archived by the owner on Jun 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
55 lines (48 loc) · 1.81 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
# Deploy sample app on Azure App Services in a standalone manner, no database required.
# Configure the AzureRM provider (using v2.1)
provider "azurerm" {
version = "~>2.14.0"
subscription_id = var.subscription_id
features {}
}
# Provision a resource group to hold all Azure resources
resource "azurerm_resource_group" "main" {
name = "${var.prefix}-resources"
location = var.location
}
# Provision the App Service plan to host the App Service web app
resource "azurerm_app_service_plan" "main" {
name = "${var.prefix}-asp"
location = azurerm_resource_group.main.location
resource_group_name = azurerm_resource_group.main.name
kind = "Windows"
sku {
tier = "Standard"
size = "S1"
}
}
# Provision the Azure App Service to host the main web site
resource "azurerm_app_service" "main" {
name = "${var.prefix}-appservice"
location = azurerm_resource_group.main.location
resource_group_name = azurerm_resource_group.main.name
app_service_plan_id = azurerm_app_service_plan.main.id
site_config {
always_on = true
default_documents = [
"Default.htm",
"Default.html",
"hostingstart.html"
]
}
app_settings = {
"WEBSITE_NODE_DEFAULT_VERSION" = "10.15.2"
"ApiUrl" = ""
"ApiUrlShoppingCart" = ""
"MongoConnectionString" = ""
"SqlConnectionString" = ""
"productImagesUrl" = "https://raw.githubusercontent.com/microsoft/TailwindTraders-Backend/master/Deploy/tailwindtraders-images/product-detail"
"Personalizer__ApiKey" = ""
"Personalizer__Endpoint" = ""
}
}