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

Skip to content

feat: add 1password module under bpmct namespace - #824

Merged
bpmct merged 7 commits into
mainfrom
bpmct/1password-module
Apr 1, 2026
Merged

feat: add 1password module under bpmct namespace#824
bpmct merged 7 commits into
mainfrom
bpmct/1password-module

Conversation

@bpmct

@bpmct bpmct commented Apr 1, 2026

Copy link
Copy Markdown
Member

Adds a 1Password module under the bpmct namespace.

What it does

Installs the 1Password CLI (op) into Coder workspaces at startup. Two auth paths:

  • Service account token — set service_account_token and OP_SERVICE_ACCOUNT_TOKEN is injected automatically. Fully headless.
  • Personal account — set account_address, account_email, account_secret_key to pre-register the account. User runs op signin in their terminal.

Optionally installs the 1Password VS Code extension (1Password.op-vscode) for code-server and VS Code with install_vscode_extension = true.

Supports pre_install_script and post_install_script for 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 Icons

Tested

Spun up a dev Coder instance, pushed the template with a real 1Password service account token, created a workspace, and confirmed:

  • op CLI installs and authenticates
  • op vault list returns vaults
  • 1Password.op-vscode extension installs in code-server

@bpmct
bpmct force-pushed the bpmct/1password-module branch from 5df94fa to 4393712 Compare April 1, 2026 17:59

@DevelopmentCats DevelopmentCats left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread registry/bpmct/modules/onepassword/main.tf
- 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
@bpmct
bpmct marked this pull request as ready for review April 1, 2026 18:19
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.

bpmct commented Apr 1, 2026

Copy link
Copy Markdown
Member Author

Addressed both review comments:

  1. Naming: Renamed the module directory from 1password to onepassword to match Terraform identifier rules. The display_name and tags stay as "1Password" for search/discoverability. README examples use module "onepassword".

  2. pre_install_script: Added alongside post_install_script. Both use a shared run_script() helper in run.sh.

Also cleaned up run.sh — trimmed redundant comments and verbose log messages.

@bpmct
bpmct requested a review from DevelopmentCats April 1, 2026 18:30
@bpmct
bpmct enabled auto-merge (squash) April 1, 2026 18:35
@bpmct
bpmct merged commit 5bc668a into main Apr 1, 2026
4 checks passed
@bpmct
bpmct deleted the bpmct/1password-module branch April 1, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants