Loading...
Loading...
### Terraform Version ```shell Terraform v1.14.1 on darwin_arm64 + provider registry.terraform.io/alekc/kubectl v2.1.3 + provider registry.terraform.io/hashicorp/aws v6.20.0 + provider registry.terraform.io/hashicorp/cloudinit v2.3.7 + provider registry.terraform.io/hashicorp/helm v2.17.0 + provider registry.terraform.io/hashicorp/kubernetes v2.38.0 + provider registry.terraform.io/hashicorp/null v3.2.4 + provider registry.terraform.io/hashicorp/time v0.13.1 + provider registry.terraform.io/hashicorp/tls v4.1.0 + provider registry.terraform.io/infisical/infisical v0.15.31 + provider registry.terraform.io/okta/okta v6.4.0 ``` ### Terraform Configuration Files ```terraform data "aws_eks_cluster_auth" "this" { name = var.cluster_name region = var.region } output "token" { description = "Short-lived authentication token for the EKS cluster. Use this to configure Kubernetes providers." value = data.aws_eks_cluster_auth.this.token sensitive = true ephemeral = true } output "id" { description = "The ID of the EKS cluster for which the authentication token is generated." value = data.aws_eks_cluster_auth.this.id } variable "cluster_name" { description = "The name of the EKS cluster for which to generate authentication credentials." type = string } variable "region" { description = "The AWS region where the EKS cluster is located." type = string default = null } ``` ### Debug Output ``` ...debug output, or link to a gist... ``` ### Expected Behavior I understood PR https://github.com/hashicorp/terraform/pull/37813 as ephemeral outputs should be allowed in Terraform Stacks, as I need them to be able to authenticate with an EKS cluster without having to regenerate the plan after approving it beyond the lifetime of the token. ### Actual Behavior Output of `terraform stacks validate`: ``` ╷ │ Error: Ephemeral output not allowed │ │ on ./eks_creds/outputs.tf line 1: │ 1: output "token" { │ │ Ephemeral outputs are not allowed in context of a root module ╵ Failure! Terraform Stacks configuration is not valid, please check and fix the errors printed above. ``` Same happens in HCP Terraform ### Steps to Reproduce Create a Terraform stack that uses this module (see Relevant Terraform Configuration Files): ```hcl component "eks_creds" { source = "./eks_creds" inputs = { cluster_name = "test-cluster" region = "us-east-1" } providers = { aws = provider.aws.target } } ``` Run `terraform stacks validate` ### Additional Context Terraform Stacks is running in HCP Terraform but this reproduces in terminal. ### References - #37813 ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.