github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/azure/appservice/enforce_https.tf.go (about) 1 package appservice 2 3 var terraformEnforceHttpsGoodExamples = []string{ 4 ` 5 resource "azurerm_function_app" "good_example" { 6 name = "test-azure-functions" 7 location = azurerm_resource_group.example.location 8 resource_group_name = azurerm_resource_group.example.name 9 app_service_plan_id = azurerm_app_service_plan.example.id 10 storage_account_name = azurerm_storage_account.example.name 11 storage_account_access_key = azurerm_storage_account.example.primary_access_key 12 os_type = "linux" 13 https_only = true 14 } 15 `, 16 } 17 18 var terraformEnforceHttpsBadExamples = []string{ 19 ` 20 resource "azurerm_function_app" "bad_example" { 21 name = "test-azure-functions" 22 location = azurerm_resource_group.example.location 23 resource_group_name = azurerm_resource_group.example.name 24 app_service_plan_id = azurerm_app_service_plan.example.id 25 storage_account_name = azurerm_storage_account.example.name 26 storage_account_access_key = azurerm_storage_account.example.primary_access_key 27 os_type = "linux" 28 } 29 `, 30 } 31 32 var terraformEnforceHttpsLinks = []string{ 33 `https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/function_app#https_only`, 34 } 35 36 var terraformEnforceHttpsRemediationMarkdown = ``