published on Wednesday, Jul 22, 2026 by Pulumiverse
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.
- 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, orclient. - 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.
- 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, orclient. - 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.
- 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, orclient. - 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.
- 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, orclient. - 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.
- 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, orclient. - 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 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, orclient. - 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.
- 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, orclient. - 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the FeatureFlagSdkKey resource produces the following output properties:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
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) -> FeatureFlagSdkKeyfunc 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.
- 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, orclient.
- 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, orclient.
- 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, orclient.
- 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, orclient.
- 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, orclient.
- 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, orclient.
- 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, orclient.
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
settingstab 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
settingstab in the Vercel UI. - project_id can be found in the project
settingstab 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
vercelTerraform Provider.
published on Wednesday, Jul 22, 2026 by Pulumiverse