-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tf
More file actions
42 lines (37 loc) · 1.14 KB
/
main.tf
File metadata and controls
42 lines (37 loc) · 1.14 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
resource "random_id" "unique_string" {
keepers = {
#Generate a new id each time we create a VCN environment
}
byte_length = 2
}
resource "azurerm_resource_group" "webappdemo"{
name = "wpdemo"
location = "${var.location}"
}
resource "azurerm_app_service_plan" "demoplan" {
name = "demowebplan"
location = "${azurerm_resource_group.webappdemo.location}"
resource_group_name = "${azurerm_resource_group.webappdemo.name}"
sku {
tier = "Basic"
size = "B1"
}
}
resource "azurerm_app_service" "webservice" {
name = "demowd${random_id.unique_string.id}"
location = "${azurerm_resource_group.webappdemo.location}"
resource_group_name = "${azurerm_resource_group.webappdemo.name}"
app_service_plan_id = "${azurerm_app_service_plan.demoplan.id}"
site_config {
dotnet_framework_version = "v4.0"
scm_type = "LocalGit"
}
app_settings = {
"SOME_KEY" = "some-value"
}
connection_string {
name = "Database"
type = "SQLServer"
value = "Server=some-server.mydomain.com;Integrated Security=SSPI"
}
}