Skip to content

Commit b9b3d83

Browse files
donovm4root
andauthored
feat: logic app ftp and scm basic authentication enablement (#200)
* addition of functionality * linting checks --------- Co-authored-by: root <[email protected]>
1 parent c31a8d6 commit b9b3d83

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,11 @@ Default: `true`
133133

134134
### <a name="input_app_service_active_slot"></a> [app\_service\_active\_slot](#input\_app\_service\_active\_slot)
135135

136-
Description:
137-
```
138-
Object that sets the active slot for the App Service.
136+
Description: Object that sets the active slot for the App Service.
139137

140138
`slot_key` - The key of the slot object to set as active.
141139
`overwrite_network_config` - Determines if the network configuration should be overwritten. Defaults to `true`.
142140

143-
```
144-
145141
Type:
146142

147143
```hcl
@@ -912,9 +908,7 @@ Default: `0`
912908

913909
### <a name="input_deployment_slots"></a> [deployment\_slots](#input\_deployment\_slots)
914910

915-
Description:
916-
```
917-
> NOTE: If you plan to use the attribute reference of an external Application Insights instance for `application_insights_connection_string` and `application_insights_key`, you will likely need to remove the sensitivity level. For example, using the `nonsensitive` function.
911+
Description: > NOTE: If you plan to use the attribute reference of an external Application Insights instance for `application_insights_connection_string` and `application_insights_key`, you will likely need to remove the sensitivity level. For example, using the `nonsensitive` function.
918912

919913
- `storage_shares_to_mount` - A map of storage shares to mount to the Function App deployment slot.
920914
- `name` - The name of the share.
@@ -923,7 +917,6 @@ Description:
923917
- `share_name` - The name of the share in the Storage Account.
924918
- `mount_path` - The path where the share will be mounted in the Function App.
925919
- `type` - The type of mount, defaults to "AzureFiles".
926-
```
927920

928921
Type:
929922

@@ -1691,6 +1684,14 @@ map(object({
16911684

16921685
Default: `{}`
16931686

1687+
### <a name="input_scm_publish_basic_authentication_enabled"></a> [scm\_publish\_basic\_authentication\_enabled](#input\_scm\_publish\_basic\_authentication\_enabled)
1688+
1689+
Description: Should basic authentication be enabled for SCM publish?
1690+
1691+
Type: `bool`
1692+
1693+
Default: `true`
1694+
16941695
### <a name="input_site_config"></a> [site\_config](#input\_site\_config)
16951696

16961697
Description: An object that configures the Function App's `site_config` block.

main.logic_app.tf

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
resource "azurerm_logic_app_standard" "this" {
22
count = var.kind == "logicapp" ? 1 : 0
33

4-
app_service_plan_id = var.service_plan_resource_id
5-
location = var.location
6-
name = var.name
7-
resource_group_name = var.resource_group_name
8-
storage_account_access_key = var.storage_account_access_key
9-
storage_account_name = var.storage_account_name
10-
app_settings = var.app_settings
11-
bundle_version = var.bundle_version
12-
client_affinity_enabled = var.client_affinity_enabled
13-
client_certificate_mode = var.client_certificate_mode
14-
enabled = var.enabled
15-
# ftp_publish_basic_authentication_enabled = var.ftp_publish_basic_authentication_enabled
16-
https_only = var.https_only
17-
public_network_access = var.public_network_access_enabled == true ? "Enabled" : "Disabled"
18-
storage_account_share_name = var.storage_account_share_name
4+
app_service_plan_id = var.service_plan_resource_id
5+
location = var.location
6+
name = var.name
7+
resource_group_name = var.resource_group_name
8+
storage_account_access_key = var.storage_account_access_key
9+
storage_account_name = var.storage_account_name
10+
app_settings = var.app_settings
11+
bundle_version = var.bundle_version
12+
client_affinity_enabled = var.client_affinity_enabled
13+
client_certificate_mode = var.client_certificate_mode
14+
enabled = var.enabled
15+
ftp_publish_basic_authentication_enabled = var.ftp_publish_basic_authentication_enabled
16+
https_only = var.https_only
17+
public_network_access = var.public_network_access_enabled == true ? "Enabled" : "Disabled"
18+
scm_publish_basic_authentication_enabled = var.scm_publish_basic_authentication_enabled
19+
storage_account_share_name = var.storage_account_share_name
1920
# vnet_content_share_enabled = var.vnet_content_share_enabled
2021
tags = var.tags
2122
use_extension_bundle = var.use_extension_bundle
@@ -39,7 +40,6 @@ resource "azurerm_logic_app_standard" "this" {
3940
identity_ids = identity.value.user_assigned_resource_ids
4041
}
4142
}
42-
# scm_publish_basic_authentication_enabled = var.scm_publish_basic_authentication_enabled
4343
site_config {
4444
always_on = var.site_config.always_on
4545
app_scale_limit = var.site_config.app_scale_limit

variables.slots.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@ variable "app_service_active_slot" {
55
})
66
default = null
77
description = <<DESCRIPTION
8-
9-
```
108
Object that sets the active slot for the App Service.
119
1210
`slot_key` - The key of the slot object to set as active.
1311
`overwrite_network_config` - Determines if the network configuration should be overwritten. Defaults to `true`.
14-
15-
```
1612
DESCRIPTION
1713
}
1814

@@ -448,8 +444,6 @@ variable "deployment_slots" {
448444

449445
}
450446
description = <<DESCRIPTION
451-
452-
```
453447
> NOTE: If you plan to use the attribute reference of an external Application Insights instance for `application_insights_connection_string` and `application_insights_key`, you will likely need to remove the sensitivity level. For example, using the `nonsensitive` function.
454448
455449
- `storage_shares_to_mount` - A map of storage shares to mount to the Function App deployment slot.
@@ -459,7 +453,6 @@ variable "deployment_slots" {
459453
- `share_name` - The name of the share in the Storage Account.
460454
- `mount_path` - The path where the share will be mounted in the Function App.
461455
- `type` - The type of mount, defaults to "AzureFiles".
462-
```
463456
DESCRIPTION
464457
}
465458

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,6 +1120,12 @@ DESCRIPTION
11201120
nullable = false
11211121
}
11221122

1123+
variable "scm_publish_basic_authentication_enabled" {
1124+
type = bool
1125+
default = true
1126+
description = "Should basic authentication be enabled for SCM publish?"
1127+
}
1128+
11231129
variable "site_config" {
11241130
type = object({
11251131
always_on = optional(bool, true)

0 commit comments

Comments
 (0)