diff --git a/backend/src/integrations/sync.ts b/backend/src/integrations/sync.ts
index a3264d351..6605b231f 100644
--- a/backend/src/integrations/sync.ts
+++ b/backend/src/integrations/sync.ts
@@ -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"
}
},
{
diff --git a/docs/integrations/cloud/gcp-secret-manager.mdx b/docs/integrations/cloud/gcp-secret-manager.mdx
index 8daa60a2a..3c1863006 100644
--- a/docs/integrations/cloud/gcp-secret-manager.mdx
+++ b/docs/integrations/cloud/gcp-secret-manager.mdx
@@ -40,9 +40,13 @@ Select which Infisical environment secrets you want to sync to which GCP secret


+
+ Secrets synced from Infisical to GCP Secret Manager are automatically labeled `managed-by:infisical` to avoid overwriting existing values in GCP Secret Manager.
+
+
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).
@@ -90,9 +94,13 @@ Select which Infisical environment secrets you want to sync to the GCP secret ma


+
+ Secrets synced from Infisical to GCP Secret Manager are automatically labeled `managed-by:infisical` to avoid overwriting existing values in GCP Secret Manager.
+
+
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).