published on Sunday, Nov 15, 2026 by Pulumiverse
published on Sunday, Nov 15, 2026 by Pulumiverse
Provides a Feature Flag Connection resource.
A connection lets a consumer project in the same team read the flags of a source project. The consumer reads the source project’s flags with its own deployment identity by naming the source project in the Flags SDK. Deleting the connection revokes access without a redeploy.
Vercel Flags must be enabled on the source project before other projects can be connected to it, for example by creating a vercel.FeatureFlagDefinition on it first.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vercel from "@pulumiverse/vercel";
const source = new vercel.Project("source", {name: "feature-flag-connection-source"});
const consumer = new vercel.Project("consumer", {name: "feature-flag-connection-consumer"});
// Flags must be enabled on the source project before other projects can be
// connected to it. Creating a flag enables Flags on the project.
const example = new vercel.FeatureFlagDefinition("example", {
projectId: source.id,
key: "checkout-redesign",
kind: "boolean",
variants: [
{
id: "off",
valueBool: false,
},
{
id: "on",
valueBool: true,
},
],
});
// Lets the consumer project read the flags of the source project.
const exampleFeatureFlagConnection = new vercel.FeatureFlagConnection("example", {
projectId: source.id,
consumerProjectId: consumer.id,
}, {
dependsOn: [example],
});
import pulumi
import pulumiverse_vercel as vercel
source = vercel.Project("source", name="feature-flag-connection-source")
consumer = vercel.Project("consumer", name="feature-flag-connection-consumer")
# Flags must be enabled on the source project before other projects can be
# connected to it. Creating a flag enables Flags on the project.
example = vercel.FeatureFlagDefinition("example",
project_id=source.id,
key="checkout-redesign",
kind="boolean",
variants=[
{
"id": "off",
"value_bool": False,
},
{
"id": "on",
"value_bool": True,
},
])
# Lets the consumer project read the flags of the source project.
example_feature_flag_connection = vercel.FeatureFlagConnection("example",
project_id=source.id,
consumer_project_id=consumer.id,
opts = pulumi.ResourceOptions(depends_on=[example]))
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 {
source, err := vercel.NewProject(ctx, "source", &vercel.ProjectArgs{
Name: pulumi.String("feature-flag-connection-source"),
})
if err != nil {
return err
}
consumer, err := vercel.NewProject(ctx, "consumer", &vercel.ProjectArgs{
Name: pulumi.String("feature-flag-connection-consumer"),
})
if err != nil {
return err
}
// Flags must be enabled on the source project before other projects can be
// connected to it. Creating a flag enables Flags on the project.
example, err := vercel.NewFeatureFlagDefinition(ctx, "example", &vercel.FeatureFlagDefinitionArgs{
ProjectId: source.ID(),
Key: pulumi.String("checkout-redesign"),
Kind: pulumi.String("boolean"),
Variants: vercel.FeatureFlagDefinitionVariantArray{
&vercel.FeatureFlagDefinitionVariantArgs{
Id: pulumi.String("off"),
ValueBool: pulumi.Bool(false),
},
&vercel.FeatureFlagDefinitionVariantArgs{
Id: pulumi.String("on"),
ValueBool: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
// Lets the consumer project read the flags of the source project.
_, err = vercel.NewFeatureFlagConnection(ctx, "example", &vercel.FeatureFlagConnectionArgs{
ProjectId: source.ID(),
ConsumerProjectId: consumer.ID(),
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
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 source = new Vercel.Project("source", new()
{
Name = "feature-flag-connection-source",
});
var consumer = new Vercel.Project("consumer", new()
{
Name = "feature-flag-connection-consumer",
});
// Flags must be enabled on the source project before other projects can be
// connected to it. Creating a flag enables Flags on the project.
var example = new Vercel.FeatureFlagDefinition("example", new()
{
ProjectId = source.Id,
Key = "checkout-redesign",
Kind = "boolean",
Variants = new[]
{
new Vercel.Inputs.FeatureFlagDefinitionVariantArgs
{
Id = "off",
ValueBool = false,
},
new Vercel.Inputs.FeatureFlagDefinitionVariantArgs
{
Id = "on",
ValueBool = true,
},
},
});
// Lets the consumer project read the flags of the source project.
var exampleFeatureFlagConnection = new Vercel.FeatureFlagConnection("example", new()
{
ProjectId = source.Id,
ConsumerProjectId = consumer.Id,
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
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.FeatureFlagDefinition;
import com.pulumiverse.vercel.FeatureFlagDefinitionArgs;
import com.pulumi.vercel.inputs.FeatureFlagDefinitionVariantArgs;
import com.pulumiverse.vercel.FeatureFlagConnection;
import com.pulumiverse.vercel.FeatureFlagConnectionArgs;
import com.pulumi.resources.CustomResourceOptions;
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 source = new Project("source", ProjectArgs.builder()
.name("feature-flag-connection-source")
.build());
var consumer = new Project("consumer", ProjectArgs.builder()
.name("feature-flag-connection-consumer")
.build());
// Flags must be enabled on the source project before other projects can be
// connected to it. Creating a flag enables Flags on the project.
var example = new FeatureFlagDefinition("example", FeatureFlagDefinitionArgs.builder()
.projectId(source.id())
.key("checkout-redesign")
.kind("boolean")
.variants(
FeatureFlagDefinitionVariantArgs.builder()
.id("off")
.valueBool(false)
.build(),
FeatureFlagDefinitionVariantArgs.builder()
.id("on")
.valueBool(true)
.build())
.build());
// Lets the consumer project read the flags of the source project.
var exampleFeatureFlagConnection = new FeatureFlagConnection("exampleFeatureFlagConnection", FeatureFlagConnectionArgs.builder()
.projectId(source.id())
.consumerProjectId(consumer.id())
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
source:
type: vercel:Project
properties:
name: feature-flag-connection-source
consumer:
type: vercel:Project
properties:
name: feature-flag-connection-consumer
# Flags must be enabled on the source project before other projects can be
# connected to it. Creating a flag enables Flags on the project.
example:
type: vercel:FeatureFlagDefinition
properties:
projectId: ${source.id}
key: checkout-redesign
kind: boolean
variants:
- id: off
valueBool: false
- id: on
valueBool: true
# Lets the consumer project read the flags of the source project.
exampleFeatureFlagConnection:
type: vercel:FeatureFlagConnection
name: example
properties:
projectId: ${source.id}
consumerProjectId: ${consumer.id}
options:
dependsOn:
- ${example}
Example coming soon!
Create FeatureFlagConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FeatureFlagConnection(name: string, args: FeatureFlagConnectionArgs, opts?: CustomResourceOptions);@overload
def FeatureFlagConnection(resource_name: str,
args: FeatureFlagConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FeatureFlagConnection(resource_name: str,
opts: Optional[ResourceOptions] = None,
consumer_project_id: Optional[str] = None,
project_id: Optional[str] = None,
team_id: Optional[str] = None)func NewFeatureFlagConnection(ctx *Context, name string, args FeatureFlagConnectionArgs, opts ...ResourceOption) (*FeatureFlagConnection, error)public FeatureFlagConnection(string name, FeatureFlagConnectionArgs args, CustomResourceOptions? opts = null)
public FeatureFlagConnection(String name, FeatureFlagConnectionArgs args)
public FeatureFlagConnection(String name, FeatureFlagConnectionArgs args, CustomResourceOptions options)
type: vercel:FeatureFlagConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "vercel_feature_flag_connection" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args FeatureFlagConnectionArgs
- 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 FeatureFlagConnectionArgs
- 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 FeatureFlagConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FeatureFlagConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FeatureFlagConnectionArgs
- 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 featureFlagConnectionResource = new Vercel.FeatureFlagConnection("featureFlagConnectionResource", new()
{
ConsumerProjectId = "string",
ProjectId = "string",
TeamId = "string",
});
example, err := vercel.NewFeatureFlagConnection(ctx, "featureFlagConnectionResource", &vercel.FeatureFlagConnectionArgs{
ConsumerProjectId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
TeamId: pulumi.String("string"),
})
resource "vercel_feature_flag_connection" "featureFlagConnectionResource" {
lifecycle {
create_before_destroy = true
}
consumer_project_id = "string"
project_id = "string"
team_id = "string"
}
var featureFlagConnectionResource = new FeatureFlagConnection("featureFlagConnectionResource", FeatureFlagConnectionArgs.builder()
.consumerProjectId("string")
.projectId("string")
.teamId("string")
.build());
feature_flag_connection_resource = vercel.FeatureFlagConnection("featureFlagConnectionResource",
consumer_project_id="string",
project_id="string",
team_id="string")
const featureFlagConnectionResource = new vercel.FeatureFlagConnection("featureFlagConnectionResource", {
consumerProjectId: "string",
projectId: "string",
teamId: "string",
});
type: vercel:FeatureFlagConnection
properties:
consumerProjectId: string
projectId: string
teamId: string
FeatureFlagConnection 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 FeatureFlagConnection resource accepts the following input properties:
- Consumer
Project stringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- Project
Id string - The ID of the source Vercel project whose flags are shared.
- 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.
- Consumer
Project stringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- Project
Id string - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer_
project_ stringid - The ID of the Vercel project in the same team that may read the flags of the source project.
- project_
id string - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer
Project StringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- project
Id String - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer
Project stringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- project
Id string - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer_
project_ strid - The ID of the Vercel project in the same team that may read the flags of the source project.
- project_
id str - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer
Project StringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- project
Id String - The ID of the source Vercel project whose flags are shared.
- 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 FeatureFlagConnection resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing FeatureFlagConnection Resource
Get an existing FeatureFlagConnection 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?: FeatureFlagConnectionState, opts?: CustomResourceOptions): FeatureFlagConnection@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
consumer_project_id: Optional[str] = None,
project_id: Optional[str] = None,
team_id: Optional[str] = None) -> FeatureFlagConnectionfunc GetFeatureFlagConnection(ctx *Context, name string, id IDInput, state *FeatureFlagConnectionState, opts ...ResourceOption) (*FeatureFlagConnection, error)public static FeatureFlagConnection Get(string name, Input<string> id, FeatureFlagConnectionState? state, CustomResourceOptions? opts = null)public static FeatureFlagConnection get(String name, Output<String> id, FeatureFlagConnectionState state, CustomResourceOptions options)resources: existingFeatureFlagConnection: type: vercel:FeatureFlagConnection get: id: ${id}import {
to = vercel_feature_flag_connection.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state FeatureFlagConnectionState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state FeatureFlagConnectionState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state FeatureFlagConnectionState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state FeatureFlagConnectionState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Consumer
Project stringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- Project
Id string - The ID of the source Vercel project whose flags are shared.
- 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.
- Consumer
Project stringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- Project
Id string - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer_
project_ stringid - The ID of the Vercel project in the same team that may read the flags of the source project.
- project_
id string - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer
Project StringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- project
Id String - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer
Project stringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- project
Id string - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer_
project_ strid - The ID of the Vercel project in the same team that may read the flags of the source project.
- project_
id str - The ID of the source Vercel project whose flags are shared.
- 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.
- consumer
Project StringId - The ID of the Vercel project in the same team that may read the flags of the source project.
- project
Id String - The ID of the source Vercel project whose flags are shared.
- 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.
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 source and consumer project IDs.
- project_id can be found in the project
settingstab in the Vercel UI.
$ pulumi import vercel:index/featureFlagConnection:FeatureFlagConnection example prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/prj_yyyyyyyyyyyyyyyyyyyyyyyyyyyy
Alternatively, you can import via the team_id, source project_id, and consumer project_id.
- team_id can be found in the team
settingstab in the Vercel UI.
$ pulumi import vercel:index/featureFlagConnection:FeatureFlagConnection example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx/prj_yyyyyyyyyyyyyyyyyyyyyyyyyyyy
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 Sunday, Nov 15, 2026 by Pulumiverse