From 93e84f9ccba83df83f24d8efb7bcb9bae32c301e Mon Sep 17 00:00:00 2001 From: hezijie Date: Wed, 20 Dec 2023 12:34:59 +0800 Subject: [PATCH] correct toggle expression, update readme --- README.md | 2 ++ main.tf | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 224ebc47..96af9c75 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,7 @@ No modules. | [azurerm_role_assignment.existing_application_gateway_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource | | [azurerm_role_assignment.network_contributor](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource | | [azurerm_role_assignment.network_contributor_on_subnet](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/role_assignment) | resource | +| [null_resource.aks_cluster_recreate](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [null_resource.kubernetes_version_keeper](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [null_resource.pool_name_keeper](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [tls_private_key.ssh](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource | @@ -316,6 +317,7 @@ No modules. | [enable\_node\_public\_ip](#input\_enable\_node\_public\_ip) | (Optional) Should nodes in this Node Pool have a Public IP Address? Defaults to false. | `bool` | `false` | no | | [green\_field\_application\_gateway\_for\_ingress](#input\_green\_field\_application\_gateway\_for\_ingress) | [Definition of `green_field`](https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-ingress-controller-add-on-new)
* `name` - (Optional) The name of the Application Gateway to be used or created in the Nodepool Resource Group, which in turn will be integrated with the ingress controller of this Kubernetes Cluster.
* `subnet_cidr` - (Optional) The subnet CIDR to be used to create an Application Gateway, which in turn will be integrated with the ingress controller of this Kubernetes Cluster.
* `subnet_id` - (Optional) The ID of the subnet on which to create an Application Gateway, which in turn will be integrated with the ingress controller of this Kubernetes Cluster. |
object({
name = optional(string)
subnet_cidr = optional(string)
subnet_id = optional(string)
})
| `null` | no | | [http\_application\_routing\_enabled](#input\_http\_application\_routing\_enabled) | Enable HTTP Application Routing Addon (forces recreation). | `bool` | `false` | no | +| [http\_proxy\_config](#input\_http\_proxy\_config) | optional(object({
http\_proxy = (Optional) The proxy address to be used when communicating over HTTP. Changing this forces a new resource to be created.
https\_proxy = (Optional) The proxy address to be used when communicating over HTTPS. Changing this forces a new resource to be created.
no\_proxy = (Optional) The list of domains that will not use the proxy for communication. Note: If you specify the `default_node_pool.0.vnet_subnet_id`, be sure to include the Subnet CIDR in the `no_proxy` list. Note: You may wish to use Terraform's `ignore_changes` functionality to ignore the changes to this field.
trusted\_ca = (Optional) The base64 encoded alternative CA certificate content in PEM format.
})) |
object({
http_proxy = optional(string)
https_proxy = optional(string)
no_proxy = optional(list(string))
trusted_ca = optional(string)
})
| `null` | no | | [identity\_ids](#input\_identity\_ids) | (Optional) Specifies a list of User Assigned Managed Identity IDs to be assigned to this Kubernetes Cluster. | `list(string)` | `null` | no | | [identity\_type](#input\_identity\_type) | (Optional) The type of identity used for the managed cluster. Conflicts with `client_id` and `client_secret`. Possible values are `SystemAssigned` and `UserAssigned`. If `UserAssigned` is set, an `identity_ids` must be set as well. | `string` | `"SystemAssigned"` | no | | [image\_cleaner\_enabled](#input\_image\_cleaner\_enabled) | (Optional) Specifies whether Image Cleaner is enabled. | `bool` | `false` | no | diff --git a/main.tf b/main.tf index 3c1703d0..7e80d821 100644 --- a/main.tf +++ b/main.tf @@ -50,7 +50,7 @@ resource "azurerm_kubernetes_cluster" "main" { workload_identity_enabled = var.workload_identity_enabled dynamic "http_proxy_config" { - for_each = var.http_proxy_config == true ? [] : ["http_proxy_config"] + for_each = var.http_proxy_config == null ? [] : ["http_proxy_config"] content { http_proxy = var.http_proxy_config.http_proxy https_proxy = var.http_proxy_config.https_proxy