Fix terraform code format test folder.

This commit is contained in:
hezijie 2022-08-08 14:10:41 +08:00
Родитель 1e2df97b30
Коммит 70edcac4f4
4 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -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",

Просмотреть файл

@ -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

Просмотреть файл

@ -11,7 +11,7 @@ terraform {
version = ">=1.0.2"
}
random = {
source = "hashicorp/random"
source = "hashicorp/random"
version = ">=3.3.0"
}
}

Просмотреть файл

@ -7,7 +7,7 @@ terraform {
version = "~> 3.3"
}
tls = {
source = "hashicorp/tls"
source = "hashicorp/tls"
version = "~> 3.1"
}
}