Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 367ebca

Browse files
Mark tokens as sensitive in data sources
Mark the following attributes as sensitive to prevent them from being logged or displayed in Terraform output: - data.coder_workspace_owner.me.oidc_access_token - data.coder_workspace_owner.me.session_token - data.coder_external_auth.example.access_token This follows the same pattern as ssh_private_key and agent token which are already marked as sensitive. Fixes #266 Co-authored-by: matifali <[email protected]>
1 parent e890833 commit 367ebca

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

provider/externalauth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func externalAuthDataSource() *schema.Resource {
3737
Type: schema.TypeString,
3838
Description: "The access token returned by the external auth provider. This can be used to pre-authenticate command-line tools.",
3939
Computed: true,
40+
Sensitive: true,
4041
},
4142
"optional": {
4243
Type: schema.TypeBool,

provider/workspace_owner.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ func workspaceOwnerDataSource() *schema.Resource {
113113
Type: schema.TypeString,
114114
Computed: true,
115115
Description: "Session token for authenticating with a Coder deployment. It is regenerated every time a workspace is started.",
116+
Sensitive: true,
116117
},
117118
"oidc_access_token": {
118119
Type: schema.TypeString,
119120
Computed: true,
120121
Description: "A valid OpenID Connect access token of the workspace owner. " +
121122
"This is only available if the workspace owner authenticated with OpenID Connect. " +
122123
"If a valid token cannot be obtained, this value will be an empty string.",
124+
Sensitive: true,
123125
},
124126
"login_type": {
125127
Type: schema.TypeString,

0 commit comments

Comments
 (0)