Skip to content

Commit

Permalink
Rename var.enable_azure_policy to var.azure_policy_enabled to mee…
Browse files Browse the repository at this point in the history
…t the naming convention.

Set `azure_policy_enabled` to true in test fixture code.
  • Loading branch information
lonegunmanb committed Jun 24, 2022
1 parent 4e2a5a5 commit 686a276
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ resource "azurerm_kubernetes_cluster" "main" {

http_application_routing_enabled = var.enable_http_application_routing

azure_policy_enabled = var.enable_azure_policy
azure_policy_enabled = var.azure_policy_enabled

dynamic "oms_agent" {
for_each = var.enable_log_analytics_workspace ? ["oms_agent"] : []
Expand Down
4 changes: 3 additions & 1 deletion test/fixture/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module "aks" {
vnet_subnet_id = azurerm_subnet.test.id
os_disk_size_gb = 60
enable_http_application_routing = true
enable_azure_policy = true
azure_policy_enabled = true
enable_host_encryption = true
sku_tier = "Paid"
private_cluster_enabled = true
Expand Down Expand Up @@ -77,6 +77,7 @@ module "aks_without_monitor" {
source = "../.."
prefix = "prefix2-${random_id.prefix.hex}"
resource_group_name = azurerm_resource_group.main.name
azure_policy_enabled = true
enable_log_analytics_workspace = false
net_profile_pod_cidr = "10.1.0.0/16"
depends_on = [azurerm_resource_group.main]
Expand All @@ -88,6 +89,7 @@ module "aks_cluster_name" {
prefix = "prefix"
resource_group_name = azurerm_resource_group.main.name
enable_log_analytics_workspace = true
azure_policy_enabled = true
cluster_log_analytics_workspace_name = "test-cluster"
net_profile_pod_cidr = "10.1.0.0/16"
identity_type = "UserAssigned"
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ variable "enable_http_application_routing" {
default = false
}

variable "enable_azure_policy" {
variable "azure_policy_enabled" {
description = "Enable Azure Policy Addon."
type = bool
default = false
Expand Down

0 comments on commit 686a276

Please sign in to comment.