From 70edcac4f46ac31c14c3654123c79cd712256366 Mon Sep 17 00:00:00 2001 From: hezijie Date: Mon, 8 Aug 2022 14:10:41 +0800 Subject: [PATCH] Fix terraform code format test folder. --- test/fixture/disk_encryption_set.tf | 14 +++++++------- test/fixture/main.tf | 16 ++++++++-------- test/fixture/providers.tf | 2 +- versions.tf | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/test/fixture/disk_encryption_set.tf b/test/fixture/disk_encryption_set.tf index 035ca6b..bfb9a61 100644 --- a/test/fixture/disk_encryption_set.tf +++ b/test/fixture/disk_encryption_set.tf @@ -41,7 +41,7 @@ resource "azurerm_key_vault_key" "des_key" { key_vault_id = azurerm_key_vault.des_vault.id key_type = "RSA-HSM" key_size = 2048 - key_opts = [ + key_opts = [ "decrypt", "encrypt", "sign", @@ -72,9 +72,9 @@ resource "azurerm_disk_encryption_set" "des" { } resource "azurerm_key_vault_access_policy" "des" { - key_vault_id = azurerm_key_vault.des_vault.id - tenant_id = azurerm_disk_encryption_set.des.identity[0].tenant_id - object_id = azurerm_disk_encryption_set.des.identity[0].principal_id + key_vault_id = azurerm_key_vault.des_vault.id + tenant_id = azurerm_disk_encryption_set.des.identity[0].tenant_id + object_id = azurerm_disk_encryption_set.des.identity[0].principal_id key_permissions = [ "Get", "WrapKey", @@ -83,9 +83,9 @@ resource "azurerm_key_vault_access_policy" "des" { } resource "azurerm_key_vault_access_policy" "current_user" { - key_vault_id = azurerm_key_vault.des_vault.id - tenant_id = data.azurerm_client_config.current.tenant_id - object_id = coalesce(var.managed_identity_principal_id, data.azurerm_client_config.current.object_id) + key_vault_id = azurerm_key_vault.des_vault.id + tenant_id = data.azurerm_client_config.current.tenant_id + object_id = coalesce(var.managed_identity_principal_id, data.azurerm_client_config.current.object_id) key_permissions = [ "Get", "Create", diff --git a/test/fixture/main.tf b/test/fixture/main.tf index 2172611..b01bf86 100644 --- a/test/fixture/main.tf +++ b/test/fixture/main.tf @@ -33,14 +33,14 @@ module "aks" { resource_group_name = azurerm_resource_group.main.name agents_availability_zones = ["1", "2"] agents_count = null - agents_labels = { + agents_labels = { "node1" : "label1" } agents_max_count = 2 agents_max_pods = 100 agents_min_count = 1 agents_pool_name = "testnodepool" - agents_tags = { + agents_tags = { "Agent" : "agentTag" } agents_type = "VirtualMachineScaleSets" @@ -74,10 +74,10 @@ module "aks" { module "aks_without_monitor" { source = "../.." - prefix = "prefix2-${random_id.prefix.hex}" - resource_group_name = azurerm_resource_group.main.name - azure_policy_enabled = true - disk_encryption_set_id = azurerm_disk_encryption_set.des.id + prefix = "prefix2-${random_id.prefix.hex}" + resource_group_name = azurerm_resource_group.main.name + azure_policy_enabled = true + disk_encryption_set_id = azurerm_disk_encryption_set.des.id #checkov:skip=CKV_AZURE_4:The logging is turn off for demo purpose. DO NOT DO THIS IN PRODUCTION ENVIRONMENT! log_analytics_workspace_enabled = false role_based_access_control_enabled = true @@ -92,8 +92,8 @@ module "aks_without_monitor" { module "aks_cluster_name" { source = "../.." - prefix = "prefix" - resource_group_name = azurerm_resource_group.main.name + prefix = "prefix" + resource_group_name = azurerm_resource_group.main.name # Not necessary, just for demo purpose. admin_username = "azureuser" azure_policy_enabled = true diff --git a/test/fixture/providers.tf b/test/fixture/providers.tf index f2f349f..3ad7745 100644 --- a/test/fixture/providers.tf +++ b/test/fixture/providers.tf @@ -11,7 +11,7 @@ terraform { version = ">=1.0.2" } random = { - source = "hashicorp/random" + source = "hashicorp/random" version = ">=3.3.0" } } diff --git a/versions.tf b/versions.tf index 9ec442e..9f0bc9c 100644 --- a/versions.tf +++ b/versions.tf @@ -7,7 +7,7 @@ terraform { version = "~> 3.3" } tls = { - source = "hashicorp/tls" + source = "hashicorp/tls" version = "~> 3.1" } }