Skip to content

Commit

Permalink
feat(terraform): add trigger_helm_update variable to control Helm cha…
Browse files Browse the repository at this point in the history
…rt updates

Introduce a new variable `trigger_helm_update` to allow users to
trigger Helm chart updates. This enhances flexibility by enabling
conditional updates based on the variable's value.
  • Loading branch information
sachincool committed Oct 26, 2024
1 parent c765ea9 commit 889b75a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ data "aws_eks_cluster_auth" "cluster" {
}
resource "null_resource" "helm_install" {

Check warning on line 4 in main.tf

View workflow job for this annotation

GitHub Actions / tflint (ubuntu-latest)

Missing version constraint for provider "null" in `required_providers`

Check warning on line 4 in main.tf

View workflow job for this annotation

GitHub Actions / tflint (macos-latest)

Missing version constraint for provider "null" in `required_providers`

Check warning on line 4 in main.tf

View workflow job for this annotation

GitHub Actions / tflint (windows-latest)

Missing version constraint for provider "null" in `required_providers`
triggers = {
chart_name = var.chart_name
chart_version = var.chart_version
release_name = var.release_name
namespace = var.namespace
chart_name = var.chart_name
chart_version = var.chart_version
release_name = var.release_name
namespace = var.namespace
update_trigger = var.trigger_helm_update != null ? var.trigger_helm_update : "initial"
}
# Add this data source after the existing aws_eks_cluster data source

provisioner "local-exec" {
command = <<-EOT
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@ variable "set_values" {
description = "A map of values to pass to the Helm chart"
default = {}
}
variable "trigger_helm_update" {
description = "Set this to any value to trigger a Helm chart update"
type = string
default = null
}

0 comments on commit 889b75a

Please sign in to comment.