| <!DOCTYPE html> |
| <html lang="en"> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| http://www.apache.org/licenses/LICENSE-2.0 |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <head> |
| <meta charset="utf-8" /> |
| <title>GcpSecretManagerParameterProvider</title> |
| |
| <link rel="stylesheet" href="../../../../../css/component-usage.css" type="text/css" /> |
| </head> |
| <body> |
| <h3>Mapping GCP Secrets to Parameter Contexts</h3> |
| |
| <p> |
| The GcpSecretManagerParameterProvider maps a Secret to a Parameter, which can be grouped by adding a "group-name" label. |
| To create a compatible secret from the GCP Console: |
| </p> |
| |
| <ol> |
| <li>From the Secret Manager service, click the "Create Secret" button</li> |
| <li>Enter the Secret name. This is the name of a parameter. Enter a value.</li> |
| <li>Under "Labels", add a label with a Key of "group-name" and a value of the intended Parameter Group name.</li> |
| </ol> |
| |
| <p> |
| Alternatively, from the command line, run a command like the following: |
| </p> |
| |
| <pre> |
| printf "[Parameter Value]" | gcloud secrets create --labels=group-name="[Parameter Group Name]" "[Parameter Name]" --data-file=- |
| </pre> |
| |
| <p>In this example, [Parameter Group Name] should be the intended name of the Parameter Group, [Parameter Name] should be |
| the parameter name, and [Parameter Value] should be the value of the parameter.</p> |
| |
| <h3>Configuring the Parameter Provider</h3> |
| |
| <p> |
| GCP Secrets must be explicitly matched in the "Group Name Pattern" property in order for them to be fetched. This |
| prevents more than the intended Secrets from being pulled into NiFi. |
| </p> |
| </body> |
| </html> |