Skip to content

bloominlabs/vault-plugin-secrets-planetscale

Repository files navigation

vault-plugin-secrets-planetscale

Generate @planetscale usernames and passwords using vault.

Usage

Setup Endpoint

  1. Download and enable plugin locally (TODO)

  2. Configure the plugin

    vault write /planetscale/config/root service_token=<service_token> service_token_name=<service_token_id>
    
  3. Add one or more policies

Configure Policies

vault write planetscale/roles/fjord organization=bloominlabs database=bloominlabs role=admin branch=main

you can then read from the role using

vault read /planetscale/creds/<role-name>

Development

The provided Earthfile (think makefile, but using docker) is used to build, test, and publish the plugin. See the build targets for more information. Common targets include

# build a local version of the plugin
$ earthly +build

# start vault and enable the plugin locally
earthly +dev