Merge pull request #966 from serin0837/gcp-secret-manager-add-labels

add label managed by infisical
This commit is contained in:
BlackMagiq
2023-09-13 10:12:16 +01:00
committed by GitHub
2 changed files with 14 additions and 3 deletions

View File

@@ -336,7 +336,7 @@ const syncSecretsGCPSecretManager = async ({
});
const res: GCPSMListSecretsRes = (await standardRequest.get(
`${INTEGRATION_GCP_SECRET_MANAGER_URL}/v1beta1/projects/${integration.appId}/secrets`,
`${INTEGRATION_GCP_SECRET_MANAGER_URL}/v1/projects/${integration.appId}/secrets?filter=labels.managed-by=infisical`,
{
params,
headers: {
@@ -391,6 +391,9 @@ const syncSecretsGCPSecretManager = async ({
{
replication: {
automatic: {}
},
labels: {
"managed-by": "infisical"
}
},
{

View File

@@ -40,9 +40,13 @@ Select which Infisical environment secrets you want to sync to which GCP secret
![integrations GCP secret manager](../../images/integrations/gcp-secret-manager/integrations-gcp-secret-manager-create.png)
![integrations GCP secret manager](../../images/integrations/gcp-secret-manager/integrations-gcp-secret-manager.png)
<Note>
Secrets synced from Infisical to GCP Secret Manager are automatically labeled `managed-by:infisical` to avoid overwriting existing values in GCP Secret Manager.
</Note>
<Warning>
Using Infisical to sync secrets to GCP Secret Manager requires that you enable
the Service Usage API in the Google Cloud project you want to sync secrets to. More on that [here](https://cloud.google.com/service-usage/docs/set-up-development-environment).
the Service Usage API and Cloud Resource Manager API in the Google Cloud project you want to sync secrets to. More on that [here](https://cloud.google.com/service-usage/docs/set-up-development-environment).
</Warning>
</Accordion>
<Accordion title="Connect with Service Account JSON">
@@ -90,9 +94,13 @@ Select which Infisical environment secrets you want to sync to the GCP secret ma
![integrations GCP secret manager](../../images/integrations/gcp-secret-manager/integrations-gcp-secret-manager-create.png)
![integrations GCP secret manager](../../images/integrations/gcp-secret-manager/integrations-gcp-secret-manager.png)
<Note>
Secrets synced from Infisical to GCP Secret Manager are automatically labeled `managed-by:infisical` to avoid overwriting existing values in GCP Secret Manager.
</Note>
<Warning>
Using Infisical to sync secrets to GCP Secret Manager requires that you enable
the Service Usage API in the Google Cloud project you want to sync secrets to. More on that [here](https://cloud.google.com/service-usage/docs/set-up-development-environment).
the Service Usage API and Cloud Resource Manager API in the Google Cloud project you want to sync secrets to. More on that [here](https://cloud.google.com/service-usage/docs/set-up-development-environment).
</Warning>
</Accordion>
</AccordionGroup>