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

feat: addowner_oidc_access_token tocoder_workspace data source#91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 1 commit intomainfromoidc
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletionsdocs/data-sources/parameter.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,6 +56,7 @@ Optional:
- `error` (String) An error message to display if the value doesn't match the provided regex.
- `max` (Number) The maximum of a number parameter.
- `min` (Number) The minimum of a number parameter.
- `monotonic` (String) Number monotonicity, either increasing or decreasing.
- `regex` (String) A regex for the input parameter to match against.


1 change: 1 addition & 0 deletionsdocs/data-sources/workspace.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,6 +33,7 @@ resource "kubernetes_pod" "dev" {
- `owner` (String) Username of the workspace owner.
- `owner_email` (String) Email address of the workspace owner.
- `owner_id` (String) UUID of the workspace owner.
- `owner_oidc_access_token` (String) A valid OpenID Connect access token of the workspace owner. This is only available if the workspace owner authenticated with OpenID Connect. If a valid token cannot be obtained, this value will be an empty string.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

When implemented in the coder side, I think this should be disabled by default and enableable with a flag or at the very least the other way around.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You should mention that in this description too.

- `start_count` (Number) A computed count based on "transition" state. If "start", count will equal 1.
- `transition` (String) Either "start" or "stop". Use this to start/stop resources with "count".

Expand Down
10 changes: 10 additions & 0 deletionsprovider/workspace.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,6 +42,9 @@ func workspaceDataSource() *schema.Resource {
}
_ = rd.Set("owner_id", ownerID)

ownerOIDCAccessToken := os.Getenv("CODER_WORKSPACE_OWNER_OIDC_ACCESS_TOKEN")
_ = rd.Set("owner_oidc_access_token", ownerOIDCAccessToken)

name := os.Getenv("CODER_WORKSPACE_NAME")
if name == "" {
name = "default"
Expand DownExpand Up@@ -111,6 +114,13 @@ func workspaceDataSource() *schema.Resource {
Computed: true,
Description: "UUID of the workspace owner.",
},
"owner_oidc_access_token": {
Type: schema.TypeString,
Computed: true,
Description: "A valid OpenID Connect access token of the workspace owner. " +
"This is only available if the workspace owner authenticated with OpenID Connect. " +
"If a valid token cannot be obtained, this value will be an empty string.",
},
"id": {
Type: schema.TypeString,
Computed: true,
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp