Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

set https only as default option for function app #17

Merged
merged 3 commits into from
Aug 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion azurerm_function_app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module "azurerm_function_app_site" {
]
}

httpsOnly = "false"
httpsOnly = "${var.https_only}"
serverFarmId = "${data.azurerm_app_service_plan.sp.id}"
}
}
6 changes: 5 additions & 1 deletion azurerm_function_app/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,16 @@ variable "functionapp_connection_strings" {
description = "Includes the authentication information required for your application to access data in an Azure Storage account at runtime using Shared Key authorization."
}

variable "https_only" {
default = "true"
description = "Force HTTPS in Azure Functions."
}

locals {
# Define resource names based on the following convention: # {azurerm_resource_name_prefix}-RESOURCE_TYPE-{environment}
azurerm_resource_group_name = "${var.resource_name_prefix}-${var.environment}-rg"
azurerm_functionapp_name = "${var.resource_name_prefix}-${var.environment}-fn-${var.functionapp_name}"
azurerm_app_service_plan_name = "${var.resource_name_prefix}-${var.environment}-serviceplan-${var.plan_name}"

azurerm_storage_account_name = "${var.resource_name_prefix}${var.environment}sa${var.storage_account_name}"
azurerm_key_vault_name = "${var.resource_name_prefix}-${var.environment}-keyvault"
}