Skip to content

Commit 30f17ce

Browse files
add any-k8s-resources module (#2)
1 parent 4110105 commit 30f17ce

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

652 Bytes
Binary file not shown.

any-k8s-resources/main.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
resource "helm_release" "k8s-resource" {
2+
name = var.release_name == null ? var.name : var.release_name
3+
chart = "${path.module}/dynamic-k8s-resources-0.1.0.tgz"
4+
timeout = lookup(var.advanced_config, "timeout", 300)
5+
wait = lookup(var.advanced_config, "wait", false)
6+
version = "0.1.0"
7+
create_namespace = true
8+
max_history = lookup(var.advanced_config, "max_history", 10)
9+
namespace = var.namespace
10+
values = [
11+
jsonencode({
12+
resources = var.resources_data
13+
})
14+
]
15+
}

any-k8s-resources/variables.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
variable "name" {
2+
type = string
3+
}
4+
5+
variable "advanced_config" {
6+
type = any
7+
}
8+
9+
variable "namespace" {
10+
type = string
11+
}
12+
13+
variable "resources_data" {
14+
type = any
15+
}
16+
17+
variable "release_name" {
18+
type = string
19+
default = null
20+
}

0 commit comments

Comments
 (0)