Changes to storage
This commit is contained in:
parent
1b0212fb94
commit
3ee47f573a
@ -13,22 +13,28 @@ resource "random_string" "unique_id" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
locals {
|
locals {
|
||||||
functionAppName = var.appName
|
functionAppName = "fnapp${random_string.unique_id.result}"
|
||||||
hostingPlanName = var.appName
|
hostingPlanName = "fnapp${random_string.unique_id.result}"
|
||||||
applicationInsightsName = var.appName
|
applicationInsightsName = "fnapp${random_string.unique_id.result}"
|
||||||
storageAccountName = "${random_string.unique_id.result}azfunctions"
|
storageAccountName = "${random_string.unique_id.result}azfunctions"
|
||||||
functionWorkerRuntime = var.runtime
|
functionWorkerRuntime = var.runtime
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_storage_account" "storageAccount" {
|
# Generate random value for the storage account name
|
||||||
name = local.storageAccountName
|
resource "random_string" "storage_account_name" {
|
||||||
location = azurerm_resource_group.rg.location
|
length = 8
|
||||||
resource_group_name = azurerm_resource_group.rg.name
|
lower = true
|
||||||
account_tier = "Standard"
|
numeric = false
|
||||||
account_replication_type = var.storageAccountType
|
special = false
|
||||||
|
upper = false
|
||||||
|
}
|
||||||
|
|
||||||
enable_https_traffic_only = true
|
resource "azurerm_storage_account" "storageAccount" {
|
||||||
allow_blob_public_access = false
|
name = random_string.storage_account_name.result
|
||||||
|
resource_group_name = azurerm_resource_group.rg.name
|
||||||
|
location = azurerm_resource_group.rg.location
|
||||||
|
account_tier = "Standard"
|
||||||
|
account_replication_type = "LRS"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "azurerm_app_service_plan" "hostingPlan" {
|
resource "azurerm_app_service_plan" "hostingPlan" {
|
||||||
|
@ -12,7 +12,7 @@ variable "resource_group_location" {
|
|||||||
|
|
||||||
variable "appName" {
|
variable "appName" {
|
||||||
type = string
|
type = string
|
||||||
default = "fnapp${random_string.unique_id.result}"
|
default = "fnapp"
|
||||||
description = "The name of the function app that you wish to create."
|
description = "The name of the function app that you wish to create."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user