Description
Terraform Enterprise version
The bug is reproducible with both HCP Terraform and Terraform Enterprise. I am using Terraform Enterprise 202501-1.
Terraform version
Terraform v1.11.4
on darwin_arm64
+ provider registry.terraform.io/hashicorp/tfe v0.65.2
...
Terraform Configuration Files
terraform {
required_providers {
tfe = {
source = "hashicorp/tfe"
version = "0.65.2"
}
}
required_version = "~> 1.11"
}
provider "tfe" {}
variable "test" {
default = "foo"
ephemeral = true
}
resource "tfe_variable_set" "test" {
name = "tfe-ephemeral-testing"
}
resource "tfe_variable" "varset" {
category = "env"
key = "tfe_ephemeral_test"
value_wo = var.test
variable_set_id = tfe_variable_set.test.id
}
resource "tfe_workspace" "test" {
name = "tfe-ephemeral-testing"
auto_apply = false
}
resource "tfe_variable" "workspace" {
category = "env"
key = "tfe_ephemeral_test"
value_wo = var.test
workspace_id = tfe_workspace.test.id
}
...
Debug Output
I can supply debug output if necessary. I haven't included any because this is pretty easy to reproduce.
Expected Behavior
When applying the above Terraform configuration, I expect the tfe_ephemeral_test
variable to contain the value "foo"
in both the variable set's variable and the workspace's variable.
Actual Behavior
The variable set's variable is unset where as the workspace's variable is correctly populated.

In addition to the lack of a value, subsequent Terraform plans of the same configuration include a change to replace the variable set's variable because it doesn't have the expected value. The workspace's variable does not appear in the plans.

Additional Context
I am not using any additional tooling or wrappers.