Open OlegGorj opened 2 years ago
You can specify omitNamespacePrefix
in the Workspace
resource that will omit the namespace from the name of the TFC Workspace. Then the Workspace is names as the Workspace
resource is named:
...
metadata:
name: my-ns0-demo
...
spec:
omitNamespacePrefix: true
...
Community Note
Description
Presently, the name of TFE/TFC workspace gets constructed using k8s
Namespace
andName
specified in CRD ref: https://github.com/hashicorp/terraform-k8s/blob/0c0b52b36cfff48a1ca721707e65115800593561/workspacehelper/workspace_helper.go#L128 . Provided, in multi-tenant with vast complexity environments, namespaces can be quite long and descriptive, that makes the construct of the workspace name quite lengthy, hence ability to override the name of the workspace to shorten it, would be quite of utility.Potential Terraform Configuration
In case of k8s namespace as
my-very-lengthy-namespace-0
combined with workspace from CRD asdemo
, makes actual TFC workspacemy-very-lengthy-namespace-0-demo
. By specifying keytfc_name
one could shorten the name tomy-ns0-demo
.References
n/a