Skip to content

Commit 6d31fa8

Browse files
authored
add functionality for new attributes in new_service_plan (#48)
1 parent 15352ab commit 6d31fa8

3 files changed

Lines changed: 12 additions & 23 deletions

File tree

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,7 @@ Default: `{}`
990990

991991
### <a name="input_new_service_plan"></a> [new\_service\_plan](#input\_new\_service\_plan)
992992

993-
Description:
994-
A map of objects that represent a new App Service Plan to create for the Function App.
993+
Description: A map of objects that represent a new App Service Plan to create for the Function App.
995994

996995
- `name` - (Optional) The name of the App Service Plan.
997996
- `resource_group_name` - (Optional) The name of the resource group to deploy the App Service Plan in.
@@ -1004,10 +1003,6 @@ Description:
10041003
- `zone_balancing_enabled` - (Optional) Should zone balancing be enabled for the App Service Plan? Changing this forces a new resource to be created.
10051004
> **NOTE:** If this setting is set to `true` and the `worker_count` value is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
10061005
1007-
```terraform
1008-
1009-
```terraform
1010-
10111006
Type:
10121007

10131008
```hcl

main.service_plan.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
resource "azurerm_service_plan" "this" {
22
count = var.create_service_plan ? 1 : 0
33

4-
location = coalesce(var.new_service_plan.location, var.location)
5-
name = coalesce(var.new_service_plan.name, "${var.name}-asp")
6-
os_type = var.os_type
7-
resource_group_name = coalesce(var.new_service_plan.resource_group_name, var.resource_group_name)
8-
sku_name = var.new_service_plan.sku_name
9-
app_service_environment_id = var.new_service_plan.app_service_environment_resource_id
10-
tags = var.tags
11-
# maximum_elastic_worker_count = var.new_service_plan.maximum_elastic_worker_count
12-
# worker_count = var.new_service_plan.worker_count
13-
# per_site_scaling_enabled = var.new_service_plan.per_site_scaling_enabled
14-
zone_balancing_enabled = var.new_service_plan.zone_balancing_enabled
4+
location = coalesce(var.new_service_plan.location, var.location)
5+
name = coalesce(var.new_service_plan.name, "${var.name}-asp")
6+
os_type = var.os_type
7+
resource_group_name = coalesce(var.new_service_plan.resource_group_name, var.resource_group_name)
8+
sku_name = var.new_service_plan.sku_name
9+
app_service_environment_id = var.new_service_plan.app_service_environment_resource_id
10+
maximum_elastic_worker_count = var.new_service_plan.maximum_elastic_worker_count
11+
per_site_scaling_enabled = var.new_service_plan.per_site_scaling_enabled
12+
tags = var.tags
13+
worker_count = var.new_service_plan.worker_count
14+
zone_balancing_enabled = var.new_service_plan.zone_balancing_enabled
1515
}

variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,6 @@ variable "new_service_plan" {
907907

908908
}
909909
description = <<DESCRIPTION
910-
911910
A map of objects that represent a new App Service Plan to create for the Function App.
912911
913912
- `name` - (Optional) The name of the App Service Plan.
@@ -920,11 +919,6 @@ variable "new_service_plan" {
920919
- `per_site_scaling_enabled` - (Optional) Should per site scaling be enabled for the App Service Plan? Defaults to `false`.
921920
- `zone_balancing_enabled` - (Optional) Should zone balancing be enabled for the App Service Plan? Changing this forces a new resource to be created.
922921
> **NOTE:** If this setting is set to `true` and the `worker_count` value is specified, it should be set to a multiple of the number of availability zones in the region. Please see the Azure documentation for the number of Availability Zones in your region.
923-
924-
```terraform
925-
926-
```terraform
927-
928922
DESCRIPTION
929923
}
930924

0 commit comments

Comments
 (0)