-
Notifications
You must be signed in to change notification settings - Fork 55
Update coder-login module to use coder_env resources #389
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
❌ Version Bump Validation FailedBump Type: Module versions need to be updated but haven't been bumped yet. Required Actions:
Script Output:
|
4128618
to
e3ce4b0
Compare
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.
Pull Request Overview
This PR modernizes the coder-login
module by replacing shell script-based authentication with native Terraform coder_env
resources for setting environment variables.
- Replaced
coder_script
resource with twocoder_env
resources forCODER_SESSION_TOKEN
andCODER_URL
- Removed the external
run.sh
shell script dependency - Added comprehensive Terraform tests with mocked data validation
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
registry/coder/modules/coder-login/run.sh |
Removed shell script that handled coder CLI authentication |
registry/coder/modules/coder-login/main.tf |
Replaced coder_script with coder_env resources for environment variables |
registry/coder/modules/coder-login/main.tftest.hcl |
Added comprehensive test suite with mocked data sources |
registry/coder/modules/coder-login/README.md |
Updated version reference from v1.0.31 to v1.1.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
- Replaced coder_script resource with coder_env resources for CODER_SESSION_TOKEN and CODER_URL - Removed run.sh script file in favor of native Terraform provider resources - Added comprehensive Terraform tests with mocked data validation - Uses correct environment variable names as per coder CLI documentation - Cleaner approach using native Terraform provider resources Co-authored-by: Atif Ali <atif@coder.com>
e3ce4b0
to
df5f65e
Compare
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 tested this out just to make sure it works alright with just setting the env, and it works perfectly.
This PR updates the
coder-login
module to usecoder_env
resources instead of shell scripts for better security, maintainability, and native Terraform integration.Changes
coder_script
withcoder_env
resources: Uses native Terraform provider resources instead of shell scriptsrun.sh
script: Eliminated the need for external shell scriptsCODER_SESSION_TOKEN
andCODER_URL
usingcoder_env
resourcesv1.0.31
tov1.1.0
(minor bump)Benefits
CODER_SESSION_TOKEN
andCODER_URL
as per coder CLI documentationTesting
terraform validate
terraform fmt