Commit 2c8daf1
committed
fix(jfrog-oauth): fail when access_token is empty
Add a lifecycle precondition to the coder_script resource that validates
the JFrog access token is not empty. This prevents the module from
silently creating configurations with empty tokens when users haven't
authenticated via external auth.
Changes:
- Add precondition check on data.coder_external_auth.jfrog.access_token
- Replace main.test.ts with jfrog-oauth.tftest.hcl for proper data mocking
- Add comprehensive tests covering all package managers (npm, pypi, go,
docker, conda, maven) with script content validation
- Tests verify actual generated configuration content, not just resource
existence
Fixes #721 parent 392f6b1 commit 2c8daf1
File tree
4 files changed
+409
-191
lines changed- registry/coder/modules/jfrog-oauth
4 files changed
+409
-191
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
0 commit comments