feat: add 1password module under bpmct namespace - #824
Conversation
5df94fa to
4393712
Compare
DevelopmentCats
left a comment
There was a problem hiding this comment.
NIT: There are a few references of 1Password as onepassword in the module and readme, but the module files themselves are 1password.svg and modules/1password
It might just be me, but it might feel better as onepassword for the file names and dir as well @bpmct
- Add pre_install_script for orchestration flexibility - Use consistent '1password' naming across module and README - Rename coder_script resource to '1password' - Extract run_script() helper to deduplicate pre/post script logic - Trim redundant comments and verbose printf messages in run.sh
The display name and tags stay as '1Password' for discoverability, but the directory and registry source path use 'onepassword' to match Terraform's identifier rules.
|
Addressed both review comments:
Also cleaned up run.sh — trimmed redundant comments and verbose log messages. |
Adds a 1Password module under the
bpmctnamespace.What it does
Installs the 1Password CLI (
op) into Coder workspaces at startup. Two auth paths:service_account_tokenandOP_SERVICE_ACCOUNT_TOKENis injected automatically. Fully headless.account_address,account_email,account_secret_keyto pre-register the account. User runsop signinin their terminal.Optionally installs the 1Password VS Code extension (
1Password.op-vscode) for code-server and VS Code withinstall_vscode_extension = true.Supports
pre_install_scriptandpost_install_scriptfor custom orchestration.What's included
registry/bpmct/— new namespace (Ben Potter, community)registry/bpmct/modules/1password/— the module (main.tf,run.sh,README.md).icons/1password.svg— 1Password logo from Simple IconsTested
Spun up a dev Coder instance, pushed the template with a real 1Password service account token, created a workspace, and confirmed:
opCLI installs and authenticatesop vault listreturns vaults1Password.op-vscodeextension installs in code-server