File tree Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,6 @@ Description: Azure Resource Group to use
108
108
109
109
Type: ` string `
110
110
111
- ### ssh\_ public\_ key
112
-
113
- Description: SSH public key to access the kubernetes node with
114
-
115
- Type: ` string `
116
-
117
111
### stage
118
112
119
113
Description: Stage for this ip
@@ -269,6 +263,14 @@ Type: `string`
269
263
270
264
Default: ` "Free" `
271
265
266
+ ### ssh\_ public\_ key
267
+
268
+ Description: SSH public key to access the kubernetes node with
269
+
270
+ Type: ` string `
271
+
272
+ Default: ` "" `
273
+
272
274
### static\_ outbound\_ ip\_ count
273
275
274
276
Description: On a lot of outgoing connections use this together with the maximum for outbound\_ ports\_ allocated of 64000 to not fall into network
Original file line number Diff line number Diff line change @@ -68,10 +68,13 @@ resource "azurerm_kubernetes_cluster" "k8s" {
68
68
}
69
69
}
70
70
71
- linux_profile {
72
- admin_username = var. project
73
- ssh_key {
74
- key_data = var. ssh_public_key
71
+ dynamic "linux_profile" {
72
+ for_each = var. ssh_public_key == " " ? [] : [var . ssh_public_key ]
73
+ content {
74
+ admin_username = var. project
75
+ ssh_key {
76
+ key_data = linux_profile. value
77
+ }
75
78
}
76
79
}
77
80
}
Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ variable "idle_timeout" {
159
159
160
160
variable "ssh_public_key" {
161
161
type = string
162
+ default = " "
162
163
description = " SSH public key to access the kubernetes node with"
163
164
}
164
165
You can’t perform that action at this time.
0 commit comments