Skip to content

Commit

Permalink
feat(http_proxy_config): Add http_proxy_config
Browse files Browse the repository at this point in the history
Related to: #434

Signed-off-by: Iago Santos Pardo <[email protected]>
  • Loading branch information
isantospardo authored and lonegunmanb committed Dec 20, 2023
1 parent b7f89be commit d4777a0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

**Merged pull requests:**

- Add support for `http_proxy_config` [\#434](https://github.com/Azure/terraform-azurerm-aks/pull/434) ([isantospardo](https://github.com/isantospardo))

## [Unreleased](https://github.com/Azure/terraform-azurerm-aks/tree/HEAD)

**Merged pull requests:**

- Output Kubernetes Cluster Network Profile [\#333](https://github.com/Azure/terraform-azurerm-aks/pull/333) ([joshua-giumelli-deltatre](https://github.com/joshua-giumelli-deltatre))

## [6.8.0](https://github.com/Azure/terraform-azurerm-aks/tree/6.8.0) (2023-04-04)
Expand Down
10 changes: 10 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ resource "azurerm_kubernetes_cluster" "main" {
} /*<box>*/ : replace(k, "avm_", var.tracing_tags_prefix) => v } : {}) /*</box>*/))
workload_identity_enabled = var.workload_identity_enabled

dynamic "http_proxy_config" {
for_each = var.http_proxy_config == true ? [] : ["http_proxy_config"]
content {
http_proxy = var.http_proxy_config.http_proxy
https_proxy = var.http_proxy_config.https_proxy
no_proxy = coalesce(var.http_proxy_config.no_proxy, [])
trusted_ca = var.http_proxy_config.trusted_ca
}
}

dynamic "default_node_pool" {
for_each = var.enable_auto_scaling == true ? [] : ["default_node_pool_manually_scaled"]

Expand Down
19 changes: 19 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,25 @@ variable "agents_min_count" {
description = "Minimum number of nodes in a pool"
}

variable "http_proxy_config" {
type = object({
http_proxy = optional(string)
https_proxy = optional(string)
no_proxy = optional(list(string))
trusted_ca = optional(string)
})
default = {}
description = <<-EOT
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.
}))
EOT
nullable = false
}

variable "agents_pool_kubelet_configs" {
type = list(object({
cpu_manager_policy = optional(string)
Expand Down

0 comments on commit d4777a0

Please sign in to comment.