Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support an extention path to parameter store to swap secrets/vars under the same project #87

Open
daigotanaka opened this issue May 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@daigotanaka
Copy link
Contributor

daigotanaka commented May 3, 2021

Currently, a secret <some_key> is stored in the remote parameter store (AWS SystemsManager Parameter Store) in the following format:

/<resource_group_name>/<task_name>/<some_key>

To make the project more reusable, the secrets keys can use an extension like this:

/<resource_group_name>/<task_name>/<some_key>/__ext/<some_extension>

The value is still loaded to <some_key> although it is retrieved from a key ending <some_extension>.
A reserved key __ext is added to handle the separation between the extension and the rest. This is necessary for handling an extension for resource group-level secrets.

Example 1:
This extension can be a notion of production or staging environment.

/<resource_group_name>/<task_name>/<some_key>/__ext/staging

Example 2:
This extension can be used to give the same task definition execute with different nuances of contexts:

/<resource_group_name>/<task_name>/<some_key>/__ext/account_1
/<resource_group_name>/<task_name>/<some_key>/__ext/account_2

handoff commands can take --extension (shorthand -x) option like:

# Local run
handoff run local -p <project_dir> -w <workspace_dir> --extension account_1

# Local run with remote stored secrets and project settings
handoff run -p <project_dir> -w <workspace_dir> --extension account_1

# Local container run test
handoff container run -p <project_dir> -w <workspace_dir> --extension account_1

# Run on cloud
handoff cloud run -p <project_dir> -w <workspace_dir> --extension account_1

With run local, handoff should search a subdirectory .secret/account_1 instead of the default directory .secret.

@daigotanaka daigotanaka added the enhancement New feature or request label May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant