Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Stable way to get Workspace owner's email in terraform #326

Open
@aarosil

Description

@aarosil

I'm readingdata.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 returnsdefault@example.com, 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!="default@example.com"?replace(split("@", data.coder_workspace_owner.me.email)[0],".","-"):"coder"

I added a check for the default value after noticingtemplate push failed validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp