mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
improvements: address feedback
This commit is contained in:
@@ -2,3 +2,62 @@ export enum GcpSyncScope {
|
|||||||
Global = "global",
|
Global = "global",
|
||||||
Region = "region"
|
Region = "region"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum GCPSecretManagerLocation {
|
||||||
|
// Asia Pacific
|
||||||
|
ASIA_SOUTHEAST3 = "asia-southeast3", // Bangkok
|
||||||
|
ASIA_SOUTH2 = "asia-south2", // Delhi
|
||||||
|
ASIA_EAST2 = "asia-east2", // Hong Kong
|
||||||
|
ASIA_SOUTHEAST2 = "asia-southeast2", // Jakarta
|
||||||
|
AUSTRALIA_SOUTHEAST2 = "australia-southeast2", // Melbourne
|
||||||
|
ASIA_SOUTH1 = "asia-south1", // Mumbai
|
||||||
|
ASIA_NORTHEAST2 = "asia-northeast2", // Osaka
|
||||||
|
ASIA_NORTHEAST3 = "asia-northeast3", // Seoul
|
||||||
|
ASIA_SOUTHEAST1 = "asia-southeast1", // Singapore
|
||||||
|
AUSTRALIA_SOUTHEAST1 = "australia-southeast1", // Sydney
|
||||||
|
ASIA_EAST1 = "asia-east1", // Taiwan
|
||||||
|
ASIA_NORTHEAST1 = "asia-northeast1", // Tokyo
|
||||||
|
|
||||||
|
// Europe
|
||||||
|
EUROPE_WEST1 = "europe-west1", // Belgium
|
||||||
|
EUROPE_WEST10 = "europe-west10", // Berlin
|
||||||
|
EUROPE_NORTH1 = "europe-north1", // Finland
|
||||||
|
EUROPE_NORTH2 = "europe-north2", // Stockholm
|
||||||
|
EUROPE_WEST3 = "europe-west3", // Frankfurt
|
||||||
|
EUROPE_WEST2 = "europe-west2", // London
|
||||||
|
EUROPE_SOUTHWEST1 = "europe-southwest1", // Madrid
|
||||||
|
EUROPE_WEST8 = "europe-west8", // Milan
|
||||||
|
EUROPE_WEST4 = "europe-west4", // Netherlands
|
||||||
|
EUROPE_WEST12 = "europe-west12", // Turin
|
||||||
|
EUROPE_WEST9 = "europe-west9", // Paris
|
||||||
|
EUROPE_CENTRAL2 = "europe-central2", // Warsaw
|
||||||
|
EUROPE_WEST6 = "europe-west6", // Zurich
|
||||||
|
|
||||||
|
// North America
|
||||||
|
US_CENTRAL1 = "us-central1", // Iowa
|
||||||
|
US_WEST4 = "us-west4", // Las Vegas
|
||||||
|
US_WEST2 = "us-west2", // Los Angeles
|
||||||
|
NORTHAMERICA_SOUTH1 = "northamerica-south1", // Mexico
|
||||||
|
NORTHAMERICA_NORTHEAST1 = "northamerica-northeast1", // Montréal
|
||||||
|
US_EAST4 = "us-east4", // Northern Virginia
|
||||||
|
US_CENTRAL2 = "us-central2", // Oklahoma
|
||||||
|
US_WEST1 = "us-west1", // Oregon
|
||||||
|
US_WEST3 = "us-west3", // Salt Lake City
|
||||||
|
US_EAST1 = "us-east1", // South Carolina
|
||||||
|
NORTHAMERICA_NORTHEAST2 = "northamerica-northeast2", // Toronto
|
||||||
|
US_EAST5 = "us-east5", // Columbus
|
||||||
|
US_SOUTH1 = "us-south1", // Dallas
|
||||||
|
US_WEST8 = "us-west8", // Phoenix
|
||||||
|
|
||||||
|
// South America
|
||||||
|
SOUTHAMERICA_EAST1 = "southamerica-east1", // São Paulo
|
||||||
|
SOUTHAMERICA_WEST1 = "southamerica-west1", // Santiago
|
||||||
|
|
||||||
|
// Middle East
|
||||||
|
ME_CENTRAL2 = "me-central2", // Dammam
|
||||||
|
ME_CENTRAL1 = "me-central1", // Doha
|
||||||
|
ME_WEST1 = "me-west1", // Tel Aviv
|
||||||
|
|
||||||
|
// Africa
|
||||||
|
AFRICA_SOUTH1 = "africa-south1" // Johannesburg
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
import { TSyncOptionsConfig } from "@app/services/secret-sync/secret-sync-types";
|
import { TSyncOptionsConfig } from "@app/services/secret-sync/secret-sync-types";
|
||||||
|
|
||||||
import { SecretSync } from "../secret-sync-enums";
|
import { SecretSync } from "../secret-sync-enums";
|
||||||
import { GcpSyncScope } from "./gcp-sync-enums";
|
import { GCPSecretManagerLocation, GcpSyncScope } from "./gcp-sync-enums";
|
||||||
|
|
||||||
const GcpSyncOptionsConfig: TSyncOptionsConfig = { canImportSecrets: true };
|
const GcpSyncOptionsConfig: TSyncOptionsConfig = { canImportSecrets: true };
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ const GcpSyncDestinationConfigSchema = z.discriminatedUnion("scope", [
|
|||||||
.object({
|
.object({
|
||||||
scope: z.literal(GcpSyncScope.Region).describe(SecretSyncs.DESTINATION_CONFIG.GCP.scope),
|
scope: z.literal(GcpSyncScope.Region).describe(SecretSyncs.DESTINATION_CONFIG.GCP.scope),
|
||||||
projectId: z.string().min(1, "Project ID is required").describe(SecretSyncs.DESTINATION_CONFIG.GCP.projectId),
|
projectId: z.string().min(1, "Project ID is required").describe(SecretSyncs.DESTINATION_CONFIG.GCP.projectId),
|
||||||
locationId: z.string().min(1, "Location ID is required").describe(SecretSyncs.DESTINATION_CONFIG.GCP.locationId)
|
locationId: z.nativeEnum(GCPSecretManagerLocation).describe(SecretSyncs.DESTINATION_CONFIG.GCP.locationId)
|
||||||
})
|
})
|
||||||
.describe(
|
.describe(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ description: "Learn how to configure a GCP Secret Manager Sync for Infisical."
|
|||||||
- **GCP Connection**: The GCP Connection to authenticate with.
|
- **GCP Connection**: The GCP Connection to authenticate with.
|
||||||
- **Project**: The GCP project to sync with.
|
- **Project**: The GCP project to sync with.
|
||||||
- **Scope**: The GCP project scope that secrets should be synced to:
|
- **Scope**: The GCP project scope that secrets should be synced to:
|
||||||
-**Global**: Secrets will be synced globally; available to all project regions.
|
- **Global**: Secrets will be synced globally; available to all project regions.
|
||||||
-**Region**: Secrets will be synced to the specified region.
|
- **Region**: Secrets will be synced to the specified region.
|
||||||
|
|
||||||
5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.
|
5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**.
|
||||||

|

|
||||||
|
|||||||
Reference in New Issue
Block a user