-
Notifications
You must be signed in to change notification settings - Fork 881
feat: add session token injection to provisioner #7461
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice piece of code, Jon!
provisioner/terraform/provision.go
Outdated
@@ -220,6 +220,7 @@ func provisionEnv(config *proto.Provision_Config, params []*proto.ParameterValue | |||
"CODER_WORKSPACE_OWNER_OIDC_ACCESS_TOKEN="+config.Metadata.WorkspaceOwnerOidcAccessToken, | |||
"CODER_WORKSPACE_ID="+config.Metadata.WorkspaceId, | |||
"CODER_WORKSPACE_OWNER_ID="+config.Metadata.WorkspaceOwnerId, | |||
"CODER_SESSION_TOKEN="+config.Metadata.CoderSessionToken, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt it, but maybe you want to confirm that we don't leak it somewhere in the provisioner logs presented in the debug mode (Try with debug mode).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, all comments addressed.
This PR adds the plumbing necessary for referencing the
coder_session_token
data source in the TF provider.fixes #6354