Skip to content

Commit

Permalink
Remove experimental flag for use in latest terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
mvachhar committed Nov 16, 2022
1 parent 66d2ffd commit a1d6d02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
resource "local_file" "kubeconfig" {
sensitive_content = templatefile("${path.module}/kubeconfig-template.tpl", { contexts = var.contexts, clusters = var.clusters, users = var.users, colors = var.colors, current_context = var.current_context })
resource "local_sensitive_file" "kubeconfig" {
content = templatefile("${path.module}/kubeconfig-template.tpl", { contexts = var.contexts, clusters = var.clusters, users = var.users, colors = var.colors, current_context = var.current_context })
filename = "./${var.filename}"
}

output "kubeconfig_path" {
value = local_file.kubeconfig.filename
value = local_sensitive_file.kubeconfig.filename
description = "Path to the kubeconfig file"
}

output "kubeconfig_content" {
value = yamldecode(local_file.kubeconfig.sensitive_content)
value = yamldecode(local_sensitive_file.kubeconfig.content)
description = "HCL representation of kubeconfig file contents"
sensitive = true
}
5 changes: 2 additions & 3 deletions providers.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
terraform {
experiments = [module_variable_optional_attrs]
required_version = ">=0.15.0"
required_version = ">=1.3.0"
required_providers {
local = {
source = "hashicorp/local"
version = ">=2.0.0"
}
}
}
}

0 comments on commit a1d6d02

Please sign in to comment.