File tree Expand file tree Collapse file tree 4 files changed +0
-59
lines changed Expand file tree Collapse file tree 4 files changed +0
-59
lines changed Original file line number Diff line number Diff line change @@ -88,21 +88,18 @@ module jenkins {
8888| ------| ---------|
8989| terraform | >= 0.13 |
9090| helm | >= 2.0 |
91- | null | >= 3.0 |
9291
9392## Providers
9493
9594| Name | Version |
9695| ------| ---------|
9796| helm | >= 2.0 |
98- | null | >= 3.0 |
9997
10098## Inputs
10199
102100| Name | Description | Type | Default | Required |
103101| ------| -------------| ------| ---------| :--------:|
104102| app | an application to deploy | ` map(any) ` | n/a | yes |
105- | manage\_ repo | Whether Helm repo should be added, updated and removed during Terraform execution | ` bool ` | ` false ` | no |
106103| namespace | namespace where to deploy an application | ` string ` | n/a | yes |
107104| repository | Helm repository | ` string ` | n/a | yes |
108105| repository\_ config | repository configuration | ` map(any) ` | n/a | yes |
Original file line number Diff line number Diff line change 1- resource "null_resource" "repo_add" {
2- count = var. manage_repo ? 1 : 0
3-
4- triggers = {
5- always_run = " ${ timestamp ()} "
6- }
7-
8- provisioner "local-exec" {
9- command = " helm repo add ${ var . app [" chart" ]} ${ var . repository } "
10- }
11- }
12-
13- resource "null_resource" "repo_update" {
14- count = var. manage_repo ? 1 : 0
15-
16- triggers = {
17- always_run = " ${ timestamp ()} "
18- }
19-
20- provisioner "local-exec" {
21- command = " helm repo update ${ var . app [" chart" ]} "
22- }
23-
24- depends_on = [
25- resource . null_resource . repo_add [0 ]
26- ]
27- }
28-
291resource "helm_release" "this" {
302 count = var. app [" deploy" ] ? 1 : 0
313 namespace = var. namespace
@@ -77,25 +49,4 @@ resource "helm_release" "this" {
7749 value = item. value . value
7850 }
7951 }
80-
81- depends_on = [
82- resource . null_resource . repo_update
83- ]
84- }
85-
86- resource "null_resource" "repo_delete" {
87- count = var. manage_repo ? 1 : 0
88-
89- triggers = {
90- always_run = " ${ timestamp ()} "
91- }
92-
93- provisioner "local-exec" {
94- command = " helm repo remove ${ var . app [" chart" ]} "
95- }
96-
97- depends_on = [
98- resource . null_resource . repo_add [0 ],
99- resource . helm_release . this
100- ]
10152}
Original file line number Diff line number Diff line change @@ -42,9 +42,3 @@ variable "repository" {
4242 description = " Helm repository"
4343 type = string
4444}
45-
46- variable "manage_repo" {
47- description = " Whether Helm repo should be added, updated and removed during Terraform execution"
48- default = false
49- type = bool
50- }
Original file line number Diff line number Diff line change @@ -3,6 +3,5 @@ terraform {
33
44 required_providers {
55 helm = " >= 2.0"
6- null = " >= 3.0"
76 }
87}
You can’t perform that action at this time.
0 commit comments