Skip to content

Commit f6a7254

Browse files
authored
Merge pull request #2 from dodevops/feature/te/allow-tags
feat: Allow tags
2 parents 3c33631 + f3ea110 commit f6a7254

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,15 @@ Description: On a lot of outgoing connections use this together with the max
250250

251251
Type: `number`
252252

253-
Default: `1`
253+
Default: `0`
254+
255+
### tags
256+
257+
Description: Map of tags for the resources
258+
259+
Type: `map(any)`
260+
261+
Default: `{}`
254262

255263
## Outputs
256264

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ resource "azurerm_kubernetes_cluster" "k8s" {
1515
name = local.cluster_name
1616
location = var.location
1717
resource_group_name = var.resource_group
18+
tags = var.tags
1819
dns_prefix = var.dns_prefix == "NONE" ? local.cluster_name : var.dns_prefix
1920
sku_tier = var.sku_tier
2021
kubernetes_version = var.kubernetes_version
@@ -48,7 +49,7 @@ resource "azurerm_kubernetes_cluster" "k8s" {
4849
network_plugin = "azure"
4950
network_policy = var.network_policy
5051
load_balancer_sku = length(var.node_pools) > 0 ? "Standard" : var.load_balancer_sku
51-
dynamic load_balancer_profile {
52+
dynamic "load_balancer_profile" {
5253
for_each = azurerm_public_ip.public-ip-outbound
5354
content {
5455
outbound_ip_address_ids = azurerm_public_ip.public-ip-outbound[*].id

vars.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ variable "resource_group" {
1818
description = "Azure Resource Group to use"
1919
}
2020

21+
variable "tags" {
22+
type = map(any)
23+
description = "Map of tags for the resources"
24+
default = {}
25+
}
26+
2127
variable "client_id" {
2228
type = string
2329
description = "Azure client ID to use to manage Azure resources from the cluster, like f.e. load balancers"

0 commit comments

Comments
 (0)