1. Packages
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. FeatureFlagSdkKey
Viewing docs for Vercel v5.4.1
published on Wednesday, Jul 22, 2026 by Pulumiverse
vercel logo
Viewing docs for Vercel v5.4.1
published on Wednesday, Jul 22, 2026 by Pulumiverse

    Provides a Feature Flag SDK Key resource.

    SDK keys are project-scoped and environment-specific. Vercel only returns the cleartext SDK key and connection string at creation time, so this resource preserves the existing sensitive values in state when later reads omit them.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = new vercel.Project("example", {name: "feature-flag-sdk-key-example"});
    const exampleFeatureFlagSdkKey = new vercel.FeatureFlagSdkKey("example", {
        projectId: example.id,
        environment: "production",
        type: "server",
        label: "backend-sdk",
    });
    const exampleProjectEnvironmentVariable = new vercel.ProjectEnvironmentVariable("example", {
        projectId: example.id,
        targets: ["production"],
        sensitive: true,
        key: "FLAGS_CONNECTION_STRING",
        value: exampleFeatureFlagSdkKey.connectionString,
    });
    
    import pulumi
    import pulumiverse_vercel as vercel
    
    example = vercel.Project("example", name="feature-flag-sdk-key-example")
    example_feature_flag_sdk_key = vercel.FeatureFlagSdkKey("example",
        project_id=example.id,
        environment="production",
        type="server",
        label="backend-sdk")
    example_project_environment_variable = vercel.ProjectEnvironmentVariable("example",
        project_id=example.id,
        targets=["production"],
        sensitive=True,
        key="FLAGS_CONNECTION_STRING",
        value=example_feature_flag_sdk_key.connection_string)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-vercel/sdk/v5/go/vercel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := vercel.NewProject(ctx, "example", &vercel.ProjectArgs{
    			Name: pulumi.String("feature-flag-sdk-key-example"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleFeatureFlagSdkKey, err := vercel.NewFeatureFlagSdkKey(ctx, "example", &vercel.FeatureFlagSdkKeyArgs{
    			ProjectId:   example.ID(),
    			Environment: pulumi.String("production"),
    			Type:        pulumi.String("server"),
    			Label:       pulumi.String("backend-sdk"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = vercel.NewProjectEnvironmentVariable(ctx, "example", &vercel.ProjectEnvironmentVariableArgs{
    			ProjectId: example.ID(),
    			Targets: pulumi.StringArray{
    				pulumi.String("production"),
    			},
    			Sensitive: pulumi.Bool(true),
    			Key:       pulumi.String("FLAGS_CONNECTION_STRING"),
    			Value:     exampleFeatureFlagSdkKey.ConnectionString,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vercel = Pulumiverse.Vercel;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Vercel.Project("example", new()
        {
            Name = "feature-flag-sdk-key-example",
        });
    
        var exampleFeatureFlagSdkKey = new Vercel.FeatureFlagSdkKey("example", new()
        {
            ProjectId = example.Id,
            Environment = "production",
            Type = "server",
            Label = "backend-sdk",
        });
    
        var exampleProjectEnvironmentVariable = new Vercel.ProjectEnvironmentVariable("example", new()
        {
            ProjectId = example.Id,
            Targets = new[]
            {
                "production",
            },
            Sensitive = true,
            Key = "FLAGS_CONNECTION_STRING",
            Value = exampleFeatureFlagSdkKey.ConnectionString,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumiverse.vercel.Project;
    import com.pulumiverse.vercel.ProjectArgs;
    import com.pulumiverse.vercel.FeatureFlagSdkKey;
    import com.pulumiverse.vercel.FeatureFlagSdkKeyArgs;
    import com.pulumiverse.vercel.ProjectEnvironmentVariable;
    import com.pulumiverse.vercel.ProjectEnvironmentVariableArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Project("example", ProjectArgs.builder()
                .name("feature-flag-sdk-key-example")
                .build());
    
            var exampleFeatureFlagSdkKey = new FeatureFlagSdkKey("exampleFeatureFlagSdkKey", FeatureFlagSdkKeyArgs.builder()
                .projectId(example.id())
                .environment("production")
                .type("server")
                .label("backend-sdk")
                .build());
    
            var exampleProjectEnvironmentVariable = new ProjectEnvironmentVariable("exampleProjectEnvironmentVariable", ProjectEnvironmentVariableArgs.builder()
                .projectId(example.id())
                .targets("production")
                .sensitive(true)
                .key("FLAGS_CONNECTION_STRING")
                .value(exampleFeatureFlagSdkKey.connectionString())
                .build());
    
        }
    }
    
    resources:
      example:
        type: vercel:Project
        properties:
          name: feature-flag-sdk-key-example
      exampleFeatureFlagSdkKey:
        type: vercel:FeatureFlagSdkKey
        name: example
        properties:
          projectId: ${example.id}
          environment: production
          type: server
          label: backend-sdk
      exampleProjectEnvironmentVariable:
        type: vercel:ProjectEnvironmentVariable
        name: example
        properties:
          projectId: ${example.id}
          targets:
            - production
          sensitive: true
          key: FLAGS_CONNECTION_STRING
          value: ${exampleFeatureFlagSdkKey.connectionString}
    
    Example coming soon!
    

    Create FeatureFlagSdkKey Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new FeatureFlagSdkKey(name: string, args: FeatureFlagSdkKeyArgs, opts?: CustomResourceOptions);
    @overload
    def FeatureFlagSdkKey(resource_name: str,
                          args: FeatureFlagSdkKeyArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def FeatureFlagSdkKey(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          environment: Optional[str] = None,
                          project_id: Optional[str] = None,
                          type: Optional[str] = None,
                          label: Optional[str] = None,
                          team_id: Optional[str] = None)
    func NewFeatureFlagSdkKey(ctx *Context, name string, args FeatureFlagSdkKeyArgs, opts ...ResourceOption) (*FeatureFlagSdkKey, error)
    public FeatureFlagSdkKey(string name, FeatureFlagSdkKeyArgs args, CustomResourceOptions? opts = null)
    public FeatureFlagSdkKey(String name, FeatureFlagSdkKeyArgs args)
    public FeatureFlagSdkKey(String name, FeatureFlagSdkKeyArgs args, CustomResourceOptions options)
    
    type: vercel:FeatureFlagSdkKey
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "vercel_feature_flag_sdk_key" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args FeatureFlagSdkKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args FeatureFlagSdkKeyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args FeatureFlagSdkKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FeatureFlagSdkKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FeatureFlagSdkKeyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var featureFlagSdkKeyResource = new Vercel.FeatureFlagSdkKey("featureFlagSdkKeyResource", new()
    {
        Environment = "string",
        ProjectId = "string",
        Type = "string",
        Label = "string",
        TeamId = "string",
    });
    
    example, err := vercel.NewFeatureFlagSdkKey(ctx, "featureFlagSdkKeyResource", &vercel.FeatureFlagSdkKeyArgs{
    	Environment: pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	Label:       pulumi.String("string"),
    	TeamId:      pulumi.String("string"),
    })
    
    resource "vercel_feature_flag_sdk_key" "featureFlagSdkKeyResource" {
      lifecycle {
        create_before_destroy = true
      }
      environment = "string"
      project_id  = "string"
      type        = "string"
      label       = "string"
      team_id     = "string"
    }
    
    var featureFlagSdkKeyResource = new FeatureFlagSdkKey("featureFlagSdkKeyResource", FeatureFlagSdkKeyArgs.builder()
        .environment("string")
        .projectId("string")
        .type("string")
        .label("string")
        .teamId("string")
        .build());
    
    feature_flag_sdk_key_resource = vercel.FeatureFlagSdkKey("featureFlagSdkKeyResource",
        environment="string",
        project_id="string",
        type="string",
        label="string",
        team_id="string")
    
    const featureFlagSdkKeyResource = new vercel.FeatureFlagSdkKey("featureFlagSdkKeyResource", {
        environment: "string",
        projectId: "string",
        type: "string",
        label: "string",
        teamId: "string",
    });
    
    type: vercel:FeatureFlagSdkKey
    properties:
        environment: string
        label: string
        projectId: string
        teamId: string
        type: string
    

    FeatureFlagSdkKey Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The FeatureFlagSdkKey resource accepts the following input properties:

    Environment string
    The environment this SDK key should authenticate against.
    ProjectId string
    The ID of the Vercel project that owns the SDK key.
    Type string
    The SDK key type. Must be one of server, mobile, or client.
    Label string
    An optional label to help identify this key in the Vercel dashboard.
    TeamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    Environment string
    The environment this SDK key should authenticate against.
    ProjectId string
    The ID of the Vercel project that owns the SDK key.
    Type string
    The SDK key type. Must be one of server, mobile, or client.
    Label string
    An optional label to help identify this key in the Vercel dashboard.
    TeamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    environment string
    The environment this SDK key should authenticate against.
    project_id string
    The ID of the Vercel project that owns the SDK key.
    type string
    The SDK key type. Must be one of server, mobile, or client.
    label string
    An optional label to help identify this key in the Vercel dashboard.
    team_id string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    environment String
    The environment this SDK key should authenticate against.
    projectId String
    The ID of the Vercel project that owns the SDK key.
    type String
    The SDK key type. Must be one of server, mobile, or client.
    label String
    An optional label to help identify this key in the Vercel dashboard.
    teamId String
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    environment string
    The environment this SDK key should authenticate against.
    projectId string
    The ID of the Vercel project that owns the SDK key.
    type string
    The SDK key type. Must be one of server, mobile, or client.
    label string
    An optional label to help identify this key in the Vercel dashboard.
    teamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    environment str
    The environment this SDK key should authenticate against.
    project_id str
    The ID of the Vercel project that owns the SDK key.
    type str
    The SDK key type. Must be one of server, mobile, or client.
    label str
    An optional label to help identify this key in the Vercel dashboard.
    team_id str
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    environment String
    The environment this SDK key should authenticate against.
    projectId String
    The ID of the Vercel project that owns the SDK key.
    type String
    The SDK key type. Must be one of server, mobile, or client.
    label String
    An optional label to help identify this key in the Vercel dashboard.
    teamId String
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the FeatureFlagSdkKey resource produces the following output properties:

    ConnectionString string
    The connection string for this SDK key. Vercel only returns this at creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    SdkKey string
    The cleartext SDK key. Vercel only returns this at creation time.
    ConnectionString string
    The connection string for this SDK key. Vercel only returns this at creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    SdkKey string
    The cleartext SDK key. Vercel only returns this at creation time.
    connection_string string
    The connection string for this SDK key. Vercel only returns this at creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    sdk_key string
    The cleartext SDK key. Vercel only returns this at creation time.
    connectionString String
    The connection string for this SDK key. Vercel only returns this at creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    sdkKey String
    The cleartext SDK key. Vercel only returns this at creation time.
    connectionString string
    The connection string for this SDK key. Vercel only returns this at creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    sdkKey string
    The cleartext SDK key. Vercel only returns this at creation time.
    connection_string str
    The connection string for this SDK key. Vercel only returns this at creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    sdk_key str
    The cleartext SDK key. Vercel only returns this at creation time.
    connectionString String
    The connection string for this SDK key. Vercel only returns this at creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    sdkKey String
    The cleartext SDK key. Vercel only returns this at creation time.

    Look up Existing FeatureFlagSdkKey Resource

    Get an existing FeatureFlagSdkKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: FeatureFlagSdkKeyState, opts?: CustomResourceOptions): FeatureFlagSdkKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_string: Optional[str] = None,
            environment: Optional[str] = None,
            label: Optional[str] = None,
            project_id: Optional[str] = None,
            sdk_key: Optional[str] = None,
            team_id: Optional[str] = None,
            type: Optional[str] = None) -> FeatureFlagSdkKey
    func GetFeatureFlagSdkKey(ctx *Context, name string, id IDInput, state *FeatureFlagSdkKeyState, opts ...ResourceOption) (*FeatureFlagSdkKey, error)
    public static FeatureFlagSdkKey Get(string name, Input<string> id, FeatureFlagSdkKeyState? state, CustomResourceOptions? opts = null)
    public static FeatureFlagSdkKey get(String name, Output<String> id, FeatureFlagSdkKeyState state, CustomResourceOptions options)
    resources:  _:    type: vercel:FeatureFlagSdkKey    get:      id: ${id}
    import {
      to = vercel_feature_flag_sdk_key.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ConnectionString string
    The connection string for this SDK key. Vercel only returns this at creation time.
    Environment string
    The environment this SDK key should authenticate against.
    Label string
    An optional label to help identify this key in the Vercel dashboard.
    ProjectId string
    The ID of the Vercel project that owns the SDK key.
    SdkKey string
    The cleartext SDK key. Vercel only returns this at creation time.
    TeamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    Type string
    The SDK key type. Must be one of server, mobile, or client.
    ConnectionString string
    The connection string for this SDK key. Vercel only returns this at creation time.
    Environment string
    The environment this SDK key should authenticate against.
    Label string
    An optional label to help identify this key in the Vercel dashboard.
    ProjectId string
    The ID of the Vercel project that owns the SDK key.
    SdkKey string
    The cleartext SDK key. Vercel only returns this at creation time.
    TeamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    Type string
    The SDK key type. Must be one of server, mobile, or client.
    connection_string string
    The connection string for this SDK key. Vercel only returns this at creation time.
    environment string
    The environment this SDK key should authenticate against.
    label string
    An optional label to help identify this key in the Vercel dashboard.
    project_id string
    The ID of the Vercel project that owns the SDK key.
    sdk_key string
    The cleartext SDK key. Vercel only returns this at creation time.
    team_id string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    type string
    The SDK key type. Must be one of server, mobile, or client.
    connectionString String
    The connection string for this SDK key. Vercel only returns this at creation time.
    environment String
    The environment this SDK key should authenticate against.
    label String
    An optional label to help identify this key in the Vercel dashboard.
    projectId String
    The ID of the Vercel project that owns the SDK key.
    sdkKey String
    The cleartext SDK key. Vercel only returns this at creation time.
    teamId String
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    type String
    The SDK key type. Must be one of server, mobile, or client.
    connectionString string
    The connection string for this SDK key. Vercel only returns this at creation time.
    environment string
    The environment this SDK key should authenticate against.
    label string
    An optional label to help identify this key in the Vercel dashboard.
    projectId string
    The ID of the Vercel project that owns the SDK key.
    sdkKey string
    The cleartext SDK key. Vercel only returns this at creation time.
    teamId string
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    type string
    The SDK key type. Must be one of server, mobile, or client.
    connection_string str
    The connection string for this SDK key. Vercel only returns this at creation time.
    environment str
    The environment this SDK key should authenticate against.
    label str
    An optional label to help identify this key in the Vercel dashboard.
    project_id str
    The ID of the Vercel project that owns the SDK key.
    sdk_key str
    The cleartext SDK key. Vercel only returns this at creation time.
    team_id str
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    type str
    The SDK key type. Must be one of server, mobile, or client.
    connectionString String
    The connection string for this SDK key. Vercel only returns this at creation time.
    environment String
    The environment this SDK key should authenticate against.
    label String
    An optional label to help identify this key in the Vercel dashboard.
    projectId String
    The ID of the Vercel project that owns the SDK key.
    sdkKey String
    The cleartext SDK key. Vercel only returns this at creation time.
    teamId String
    The ID of the Vercel team. Required when configuring a team resource if a default team has not been set in the provider.
    type String
    The SDK key type. Must be one of server, mobile, or client.

    Import

    The pulumi import command can be used, for example:

    If importing into a personal account, or with a team configured on the provider, simply use the project ID and SDK key hash.

    • project_id can be found in the project settings tab in the Vercel UI.
    • hash_key can be found from the Flags SDK Keys UI or API.
    $ pulumi import vercel:index/featureFlagSdkKey:FeatureFlagSdkKey example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/sdk_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    Alternatively, you can import via the team_id, project_id, and SDK key hash.

    • team_id can be found in the team settings tab in the Vercel UI.
    • project_id can be found in the project settings tab in the Vercel UI.
    $ pulumi import vercel:index/featureFlagSdkKey:FeatureFlagSdkKey example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/sdk_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    vercel pulumiverse/pulumi-vercel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the vercel Terraform Provider.
    vercel logo
    Viewing docs for Vercel v5.4.1
    published on Wednesday, Jul 22, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial