Changed app_service_plan to service_plan; updated vars

This commit is contained in:
Tom Archer 2024-10-31 19:56:45 -07:00
Родитель c02b5a1250
Коммит 966d469033
2 изменённых файлов: 7 добавлений и 11 удалений

Просмотреть файл

@ -1,4 +1,5 @@
# Azure Function App
# Azure Functions app
This template deploys an Azure Function App.
## Terraform resource types
@ -7,7 +8,7 @@ This template deploys an Azure Function App.
- [azurerm_resource_group](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group)
- [random_string](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string)
- [azurerm_storage_account](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account)
- [azurerm_app_service_plan](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service_plan)
- [azurerm_service_plan](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/service_plan)
- [azurerm_function_app](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/function_app)
- [azurerm_application_insights](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/application_insights)
@ -18,8 +19,6 @@ This template deploys an Azure Function App.
| `resource_group_name_prefix` | Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription. | rg |
| `resource_group_location` | Location of the resource group. | eastus |
| `appName` | The name of the function app that you wish to create. | fnapp${random_string.unique_id.result} |
| `storageAccountType` | Storage Account type. Possible values are: Standard_LRS, Standard_GRS, Standard_RAGRS. | Standard_LRS |
| `appInsightsLocation` | Location for Application Insights. | "" |
| `runtime` | The language worker runtime to load in the function app. Possible values are: node, dotnet, java. | node |
## Example

Просмотреть файл

@ -37,15 +37,12 @@ resource "azurerm_storage_account" "storageAccount" {
account_replication_type = "LRS"
}
resource "azurerm_app_service_plan" "hostingPlan" {
resource "azurerm_service_plan" "hostingPlan" {
name = local.hostingPlanName
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
kind = "FunctionApp"
sku {
tier = "Dynamic"
size = "Y1"
}
location = azurerm_resource_group.rg.location
os_type = "Linux"
sku_name = "P1v2"
}
resource "azurerm_function_app" "functionApp" {