Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new vars #50

Merged
merged 2 commits into from
Jan 9, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion terraform/function-app/linux-function-app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ resource "azurerm_linux_function_app" "adl_func_linux" {
resource_group_name = var.rg_name
location = var.location

service_plan_id = var.service_plan_id
storage_account_name = var.storage_account_name
storage_account_access_key = var.storage_account_access_key
service_plan_id = var.service_plan_id
enabled = var.enabled
https_only = var.https_only
client_certificate_enabled = var.client_certificate_enabled
virtual_network_subnet_id = var.virtual_network_subnet_id

site_config {}

identity {
type = "SystemAssigned"
}

tags = var.tags
}
38 changes: 31 additions & 7 deletions terraform/function-app/linux-function-app/variables.tf
Original file line number Diff line number Diff line change
@@ -1,35 +1,59 @@
variable "basename" {
type = string
description = "Basename of the module"
description = "(Required) Basename of the module."
}

variable "rg_name" {
type = string
description = "Resource group name"
description = "(Required) Resource group name."
}

variable "location" {
type = string
description = "Location of the resource group"
description = "(Required) The Azure Region where the resource should exist."
}

variable "tags" {
type = map(string)
description = "(Optional) A mapping of tags which should be assigned to the deployed resource."
default = {}
description = "A mapping of tags which should be assigned to the deployed resource"
}

variable "storage_account_name" {
type = string
description = "The backend storage account name which will be used by this Function App"
description = "(Optional) The backend storage account name which will be used by this Function App."
}

variable "storage_account_access_key" {
type = string
description = "The access key which will be used to access the backend storage account for the Function App"
description = " (Optional) The access key which will be used to access the backend storage account for the Function App. Conflicts with storage_uses_managed_identity."
}

variable "service_plan_id" {
type = string
description = "The ID of the App Service Plan within which to create this Function App"
description = " (Required) The ID of the App Service Plan within which to create this Function App."
}

variable "enabled" {
type = bool
description = "(Optional) Is the Function App enabled? Defaults to true."
default = true
}

variable "https_only" {
type = bool
description = "(Optional) Can the Function App only be accessed via HTTPS? Defaults to false."
default = false
}

variable "client_certificate_enabled" {
type = bool
description = "(Optional) Should the function app use Client Certificates."
default = false
}

variable "virtual_network_subnet_id" {
type = string
description = "(Optional) The subnet id which will be used by this Function App for regional virtual network integration."
default = null
}