anasinnyk / terraform-provider-onepassword

Terraform provider for 1Password
GNU Lesser General Public License v3.0
128 stars 38 forks source link

OP_SESSION lookup: support for hyphens in subdomain #29

Closed oboukili closed 4 years ago

oboukili commented 4 years ago

This PR allows using hypens in the subdomain name (e.g. "team-foo") and loading a session token from the OPSESSION environment variable.

Dashes are simply converted to underscores so that the looked up environment variable name becomes OP_SESSION_team_foo mimicking the behavior of the 1password op cli.

Hyphens (-) in a subdomain will be changed to an underscore (_).

(source: https://support.1password.com/command-line/#sign-in-or-out)