-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterraform.tf
59 lines (53 loc) · 1.93 KB
/
terraform.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
56
57
58
59
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.49.0"
}
}
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "hvalfangst" {
name = "hvalfangstresourcegroup"
location = "West Europe"
}
resource "azurerm_storage_account" "hvalfangst" {
name = "hvalfangststorageaccount"
resource_group_name = azurerm_resource_group.hvalfangst.name
location = azurerm_resource_group.hvalfangst.location
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "azurerm_service_plan" "hvalfangst" {
name = "hvalfangstserviceplan"
location = azurerm_resource_group.hvalfangst.location
resource_group_name = azurerm_resource_group.hvalfangst.name
os_type = "Linux"
sku_name = "Y1"
}
resource "azurerm_application_insights" "hvalfangst" {
name = "hvalfangstapplicationinsights"
resource_group_name = azurerm_resource_group.hvalfangst.name
location = azurerm_resource_group.hvalfangst.location
application_type = "other"
}
resource "azurerm_linux_function_app" "hvalfangst" {
name = "hvalfangstlinuxfunctionapp"
resource_group_name = azurerm_resource_group.hvalfangst.name
location = azurerm_resource_group.hvalfangst.location
storage_account_name = azurerm_storage_account.hvalfangst.name
storage_account_access_key = azurerm_storage_account.hvalfangst.primary_access_key
service_plan_id = azurerm_service_plan.hvalfangst.id
site_config {
application_insights_key = azurerm_application_insights.hvalfangst.instrumentation_key
application_insights_connection_string = azurerm_application_insights.hvalfangst.connection_string
application_stack{
use_custom_runtime = true
}
}
app_settings = {
"APPINSIGHTS_INSTRUMENTATIONKEY" = azurerm_application_insights.hvalfangst.instrumentation_key
}
}