Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

10.3 KB
Raw Blame
---
title: "{Product} sync"
sidebarTitle: "{Product}"
description: "Learn how to configure a {Product} sync for Infisical."
---

{/*
NOTE: Template for docs/integrations/secret-syncs/{product-slug}.mdx. Read templates/README.md
first for what each kind of markup means.

Example pages: integrations/secret-syncs/1password.mdx, integrations/secret-syncs/databricks.mdx.
Those pages use labels from an older sync wizard. The labels in this template come from
frontend/src/components/secret-syncs/forms/; check them there again before publishing.

Check every claim about the destination against backend/src/services/secret-sync/{product-slug}/:
whether import is supported (canImportSecrets), whether the wizard shows **Prevent secret
deletion** and **Customize key names** (supportsDisableSecretDeletion and supportsKeySchema in
{product-slug}-sync-constants.ts; the wizard hides an option whose flag is false), which secret
names the destination accepts, and which secrets the sync writes and deletes.

The page creates a project-scoped app connection inline, so don't list the app connection as a
prerequisite.
*/}

import {SetupSnippetName} from "/snippets/app-connections/{product-slug}/{setup-snippet-file}.mdx";
import ConnectionFormFields from "/snippets/app-connections/{product-slug}/form-fields.mdx";

A {Product} Secret Sync pushes secrets from Infisical into {the {Product} destination}, where {what reads the secrets in {Product}}. Each Infisical secret becomes {what a secret becomes in {Product}}, with the same name unless you customize key names to add a prefix or suffix.

<Note>
    The {Product} Secret Sync requires a [{Product} app connection](/integrations/app-connections/{product-slug}). This guide walks you through creating a project-scoped app connection.
</Note>

## Prerequisites

- A [project with secrets configured](/documentation/platform/secrets-mgmt/quick-starts/deliver-first-secret)
- {The same {Product} access that the app connection page's prerequisites ask for}

{/* IF: the reader must create a resource in {Product} before the sync can use it */}
- {The resource, linked to {Product}'s documentation for creating it}
{/* END IF */}

{/* NOTE: Use the same Step 1 heading as the app connection page, so the links in form-fields.mdx resolve on both pages. */}

## Step 1: {The same heading text as Step 1 on the app connection page}

{One sentence stating what Infisical needs from {Product}}

<{SetupSnippetName} />

## Step 2: Set up the sync in Infisical

<Tip>
    To create the sync using the API, use the [Create {Product} Sync](/api-reference/endpoints/secret-syncs/{product-slug}/create) endpoint.
</Tip>

<Steps>
    <Step>
        In your project, go to **Integrations** and open the **Secret Syncs** tab. Select **+ Add Sync**.

        ![Secret Syncs Tab](/images/secret-syncs/general/secret-sync-tab.png)

        Then, select the **{Product}** sync.

        ![Select {Product}](/images/secret-syncs/{product-slug}/select-option.png)
    </Step>
    <Step>
        Under **Source**, choose which secrets to sync from Infisical:

        - **Environment**: The project environment to retrieve secrets from
        - **Secret Path**: The folder path to retrieve secrets from

        {/* IF: the destination rejects some secret names */}
        <Note>
            {Which names {Product} accepts, and what happens to a sync that includes a name {Product} rejects}
        </Note>
        {/* END IF */}

        <Tip>
            If you need to sync secrets from multiple folder locations, use [secret imports](/documentation/platform/secret-reference#secret-imports).
        </Tip>

        Then select **Continue**.
    </Step>
    <Step>
        {/* IF: the destination has fields to fill in besides the connection */}
        Under **Destination**, create or select the {Product} app connection the sync will use, then choose where secrets go in {Product}.
        {/* END IF */}
        {/* IF: the connection alone decides where secrets go */}
        Under **Destination**, create or select the {Product} app connection the sync will use. {One sentence stating how the connection decides where secrets go}, so there's nothing else to configure on this screen.
        {/* END IF */}

        <Tabs>
            <Tab title="Create a new app connection">
                Under **{Product} Connection**, select **Create Connection** in the dropdown, then fill in:

                <ConnectionFormFields />

                Select **Connect to {Product}**. Infisical returns you to the sync form with the new connection selected.

                <Note>
                    This creates a connection scoped to the current project. To share the connection across other projects, [create it at the organization level](/integrations/app-connections/{product-slug}#step-2-create-the-app-connection) first, then select it here.
                </Note>
            </Tab>
            <Tab title="Use an existing connection">
                Under **{Product} Connection**, select the app connection you'd like to use.
            </Tab>
        </Tabs>

        {/* IF: the destination has fields to fill in besides the connection */}
        - **{Field label from {Product}SyncFields.tsx}**: {What the field selects in {Product}}
        {/* END IF */}

        ![Configure Destination](/images/secret-syncs/{product-slug}/configure-destination.png)

        Then select **Continue**.
    </Step>
    <Step>
        {/* IF: canImportSecrets is true for this destination */}
        Under **Initial Sync Behavior**, choose how Infisical handles secrets that already exist in {Product} on the first sync:

        - **Overwrite {Product}**: {What happens to {Product} secrets that aren't in Infisical}
        - **Import from {Product}, prioritize Infisical**: {What happens when a key exists in both places}
        - **Import from {Product}, prioritize {Product}**: {What happens when a key exists in both places}

        Then select **Continue**.
        {/* END IF */}
        {/* IF: canImportSecrets is false for this destination */}
        Under **Initial Sync Behavior**, select **Overwrite {Product}**, then select **Continue**.

        <Note>
            {Why Infisical can't import secrets from {Product}}, so this sync can't import existing {Product} secrets into Infisical. **Overwrite {Product}** is the only option.
        </Note>
        {/* END IF */}

        ![Initial Sync Behavior](/images/secret-syncs/{product-slug}/initial-sync-behavior.png)
    </Step>
    <Step>
        Under **Sync Options**, choose how secrets are synced:

        {/* IF: supportsDisableSecretDeletion isn't false for this destination */}
        - **Prevent secret deletion**: When enabled, Infisical adds and updates secrets in {Product} but never deletes them; enable this if you manage some {Product} secrets outside of Infisical
        {/* END IF */}
        - **Auto-sync on changes**: When enabled, secrets sync to {Product} automatically as the source changes; turn it off to sync manually only
        {/* IF: supportsKeySchema isn't false for this destination */}
        - **Customize key names**: Adds a prefix or suffix to every synced name, using `{{secretKey}}` for the original name and `{{environment}}` for the environment slug
        {/* END IF */}

        {/* IF: the destination has its own sync options in SecretSyncOptionsFields/ */}
        - **{Option label}**: {What the option does}
        {/* END IF */}

        {/* IF: the sync can write to or delete secrets in {Product} that Infisical didn't create, and the wizard shows both Prevent secret deletion and Customize key names. Check the sync's delete logic before keeping this block. If the destination supports only one of the two options, rewrite the warning around that option instead. */}
        <Warning>
            {What the secrets in {Product} belong to}, so a sync can change secrets that were created outside Infisical. If you don't customize key names, the sync treats every secret in {the destination} as one it manages:

            - If a {Product} secret has the same name as an Infisical secret, the sync overwrites the {Product} secret's value
            - If **Prevent secret deletion** is off, every {Product} secret that isn't in Infisical is deleted

            With customized key names, the sync writes only names with your prefix or suffix, and deletes only {Product} secrets whose names match it.

            Before the first sync, customize key names or keep **Prevent secret deletion** on. **Prevent secret deletion** is on by default when you create the sync in the UI, but off unless you set `disableSecretDeletion` when you create it through the API.
        </Warning>
        {/* END IF */}

        ![Configure Sync Options](/images/secret-syncs/{product-slug}/configure-sync-options.png)

        Then select **Continue**.
    </Step>
    <Step>
        Give the sync a **Name** and an optional **Description**. The name must be slug-friendly.

        ![Sync Details](/images/secret-syncs/{product-slug}/configure-details.png)

        Then select **Continue**.
    </Step>
    <Step>
        Review your {Product} Sync configuration, then select **Create Sync**.

        ![Review and Create](/images/secret-syncs/{product-slug}/review-configuration.png)

        <Check>
            The sync is created. If **Auto-sync on changes** is enabled, it begins syncing secrets to {the destination} right away.
        </Check>
    </Step>
</Steps>

{/* IF: the reader has to do something in {Product} after the first sync */}
## Step 3: {The task in {Product}, as an imperative}

{Why the reader does the task, then <Steps> for the task}
{/* END IF */}

{/* IF: the destination behaves in a way that doesn't fit into the steps */}
## FAQ

<AccordionGroup>
    <Accordion title="{The question, as the reader would ask it}">
        {The answer}
    </Accordion>
</AccordionGroup>
{/* END IF */}

{/* NOTE: Link to what a reader does after creating the sync, such as the {Product} app connection page, the secret syncs overview, or the page for the tool that reads the secrets in {Product}. */}

## Next steps

<CardGroup cols={2}>
    <Card title="{The linked page's sidebar label}" icon="{Lucide icon name}" href="{Path of the linked page}">
        {What the reader can do on the linked page}
    </Card>
    <Card title="{The linked page's sidebar label}" icon="{Lucide icon name}" href="{Path of the linked page}">
        {What the reader can do on the linked page}
    </Card>
</CardGroup>