Open
Description
I'm reading data.coder_workspace_owner.me.email
in a template for use in Kubernetes, to derive the user's namespace from their email address. During destroy, the datasource returns [email protected]
, so my template breaks. Is there a stable way to access the user's email from within the template?
This is the code I'm using now which doesn't work:
namespace = data.coder_workspace_owner.me.email != "[email protected]" ? replace(split("@", data.coder_workspace_owner.me.email)[0], ".", "-") : "coder"
I added a check for the default value after noticing template push
failed validation
Metadata
Metadata
Assignees
Labels
No labels