Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Customize workspace name #135

@OlegGorj

Description

@OlegGorj

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Presently, the name of TFE/TFC workspace gets constructed using k8s Namespace and Name specified in CRD
ref:

workspace := fmt.Sprintf("%s-%s", instance.Namespace, instance.Name)
.
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 as demo, makes actual TFC workspace my-very-lengthy-namespace-0-demo. By specifying key tfc_name one could shorten the name to my-ns0-demo.

apiVersion: app.terraform.io/v1alpha1
kind: Workspace
metadata:
 name: demo

 # 
 #  Shorter name of the workspace 
 #
 tfc_name: my-ns0-demo

spec:
 organization: demo
 secretsMountPath: "/tmp/secrets"
 variables:
   - key: CONFIRM_DESTROY
     value: "1"
     sensitive: false
     environmentVariable: true
 outputs:
   - key: pet
     moduleOutputName: rofl

References

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions