From 2d09ef83e15c21c0cf71b3a3ff4474c2be262e93 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Wed, 9 Mar 2022 14:06:48 +0100 Subject: [PATCH] fix: add missing doc for context based secrets (#31) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index db44e76e..047fbbc0 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,13 @@ Then add the plugin to your `netlify.toml` configuration file: package = "@netlify/plugin-secrets-manager" ``` +## Context based secrets + +The plugin has support for context based secrets, to allow injecting AWS secrets only to builds with a specific deploy context. +To configure the context for a secret, add a secret tag via AWS secrets manager with a name of `NETLIFY_CONTEXT` and value of `production`, `deploy-preview` or `branch-deploy`. + +As a result, the plugin will inject the AWS secret only to builds with the matching deploy context. + ## Additional configuration - By default the plugin injects the secrets with a `NETLIFY_AWS_SECRET_` prefix. You can override the default prefix