1. Packages
  2. Packages
  3. Vercel Provider
  4. API Docs
  5. getFeatureFlag
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 information about an existing Feature Flag.

    This data source reads the simplified static flag shape exposed by this provider and looks up the flag by its stable key within a project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vercel from "@pulumiverse/vercel";
    
    const example = vercel.getFeatureFlag({
        projectId: "prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        key: "checkout-redesign",
    });
    
    import pulumi
    import pulumi_vercel as vercel
    
    example = vercel.get_feature_flag(project_id="prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        key="checkout-redesign")
    
    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 {
    		_, err := vercel.GetFeatureFlag(ctx, &vercel.GetFeatureFlagArgs{
    			ProjectId: "prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    			Key:       "checkout-redesign",
    		}, nil)
    		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 = Vercel.GetFeatureFlag.Invoke(new()
        {
            ProjectId = "prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            Key = "checkout-redesign",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vercel.VercelFunctions;
    import com.pulumi.vercel.inputs.GetFeatureFlagArgs;
    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) {
            final var example = VercelFunctions.getFeatureFlag(GetFeatureFlagArgs.builder()
                .projectId("prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx")
                .key("checkout-redesign")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: vercel:getFeatureFlag
          arguments:
            projectId: prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
            key: checkout-redesign
    
    Example coming soon!
    

    Using getFeatureFlag

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getFeatureFlag(args: GetFeatureFlagArgs, opts?: InvokeOptions): Promise<GetFeatureFlagResult>
    function getFeatureFlagOutput(args: GetFeatureFlagOutputArgs, opts?: InvokeOptions): Output<GetFeatureFlagResult>
    def get_feature_flag(key: Optional[str] = None,
                         project_id: Optional[str] = None,
                         team_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetFeatureFlagResult
    def get_feature_flag_output(key: pulumi.Input[Optional[str]] = None,
                         project_id: pulumi.Input[Optional[str]] = None,
                         team_id: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetFeatureFlagResult]
    func GetFeatureFlag(ctx *Context, args *GetFeatureFlagArgs, opts ...InvokeOption) (*GetFeatureFlagResult, error)
    func GetFeatureFlagOutput(ctx *Context, args *GetFeatureFlagOutputArgs, opts ...InvokeOption) GetFeatureFlagResultOutput

    > Note: This function is named GetFeatureFlag in the Go SDK.

    public static class GetFeatureFlag 
    {
        public static Task<GetFeatureFlagResult> InvokeAsync(GetFeatureFlagArgs args, InvokeOptions? opts = null)
        public static Output<GetFeatureFlagResult> Invoke(GetFeatureFlagInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFeatureFlagResult> getFeatureFlag(GetFeatureFlagArgs args, InvokeOptions options)
    public static Output<GetFeatureFlagResult> getFeatureFlag(GetFeatureFlagArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vercel:index/getFeatureFlag:getFeatureFlag
      arguments:
        # arguments dictionary
    data "vercel_get_feature_flag" "name" {
        # arguments
    }

    The following arguments are supported:

    Key string
    The stable flag key used in your application code.
    ProjectId string
    The ID of the Vercel project that owns the flag.
    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.
    Key string
    The stable flag key used in your application code.
    ProjectId string
    The ID of the Vercel project that owns the flag.
    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.
    key string
    The stable flag key used in your application code.
    project_id string
    The ID of the Vercel project that owns the flag.
    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.
    key String
    The stable flag key used in your application code.
    projectId String
    The ID of the Vercel project that owns the flag.
    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.
    key string
    The stable flag key used in your application code.
    projectId string
    The ID of the Vercel project that owns the flag.
    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.
    key str
    The stable flag key used in your application code.
    project_id str
    The ID of the Vercel project that owns the flag.
    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.
    key String
    The stable flag key used in your application code.
    projectId String
    The ID of the Vercel project that owns the flag.
    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.

    getFeatureFlag Result

    The following output properties are available:

    Archived bool
    Whether the flag is archived.
    Description string
    A human-readable description of the flag.
    Development Pulumiverse.Vercel.Outputs.GetFeatureFlagDevelopment
    The development environment behavior for this flag.
    Id string
    The ID of the feature flag.
    Key string
    The stable flag key used in your application code.
    Kind string
    The type of value this flag returns.
    Preview Pulumiverse.Vercel.Outputs.GetFeatureFlagPreview
    The preview environment behavior for this flag.
    Production Pulumiverse.Vercel.Outputs.GetFeatureFlagProduction
    The production environment behavior for this flag.
    ProjectId string
    The ID of the Vercel project that owns the flag.
    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.
    Variants List<Pulumiverse.Vercel.Outputs.GetFeatureFlagVariant>
    The variants available for this flag.
    Archived bool
    Whether the flag is archived.
    Description string
    A human-readable description of the flag.
    Development GetFeatureFlagDevelopment
    The development environment behavior for this flag.
    Id string
    The ID of the feature flag.
    Key string
    The stable flag key used in your application code.
    Kind string
    The type of value this flag returns.
    Preview GetFeatureFlagPreview
    The preview environment behavior for this flag.
    Production GetFeatureFlagProduction
    The production environment behavior for this flag.
    ProjectId string
    The ID of the Vercel project that owns the flag.
    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.
    Variants []GetFeatureFlagVariant
    The variants available for this flag.
    archived bool
    Whether the flag is archived.
    description string
    A human-readable description of the flag.
    development object
    The development environment behavior for this flag.
    id string
    The ID of the feature flag.
    key string
    The stable flag key used in your application code.
    kind string
    The type of value this flag returns.
    preview object
    The preview environment behavior for this flag.
    production object
    The production environment behavior for this flag.
    project_id string
    The ID of the Vercel project that owns the flag.
    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.
    variants list(object)
    The variants available for this flag.
    archived Boolean
    Whether the flag is archived.
    description String
    A human-readable description of the flag.
    development GetFeatureFlagDevelopment
    The development environment behavior for this flag.
    id String
    The ID of the feature flag.
    key String
    The stable flag key used in your application code.
    kind String
    The type of value this flag returns.
    preview GetFeatureFlagPreview
    The preview environment behavior for this flag.
    production GetFeatureFlagProduction
    The production environment behavior for this flag.
    projectId String
    The ID of the Vercel project that owns the flag.
    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.
    variants List<GetFeatureFlagVariant>
    The variants available for this flag.
    archived boolean
    Whether the flag is archived.
    description string
    A human-readable description of the flag.
    development GetFeatureFlagDevelopment
    The development environment behavior for this flag.
    id string
    The ID of the feature flag.
    key string
    The stable flag key used in your application code.
    kind string
    The type of value this flag returns.
    preview GetFeatureFlagPreview
    The preview environment behavior for this flag.
    production GetFeatureFlagProduction
    The production environment behavior for this flag.
    projectId string
    The ID of the Vercel project that owns the flag.
    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.
    variants GetFeatureFlagVariant[]
    The variants available for this flag.
    archived bool
    Whether the flag is archived.
    description str
    A human-readable description of the flag.
    development GetFeatureFlagDevelopment
    The development environment behavior for this flag.
    id str
    The ID of the feature flag.
    key str
    The stable flag key used in your application code.
    kind str
    The type of value this flag returns.
    preview GetFeatureFlagPreview
    The preview environment behavior for this flag.
    production GetFeatureFlagProduction
    The production environment behavior for this flag.
    project_id str
    The ID of the Vercel project that owns the flag.
    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.
    variants Sequence[GetFeatureFlagVariant]
    The variants available for this flag.
    archived Boolean
    Whether the flag is archived.
    description String
    A human-readable description of the flag.
    development Property Map
    The development environment behavior for this flag.
    id String
    The ID of the feature flag.
    key String
    The stable flag key used in your application code.
    kind String
    The type of value this flag returns.
    preview Property Map
    The preview environment behavior for this flag.
    production Property Map
    The production environment behavior for this flag.
    projectId String
    The ID of the Vercel project that owns the flag.
    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.
    variants List<Property Map>
    The variants available for this flag.

    Supporting Types

    GetFeatureFlagDevelopment

    DefaultVariantId string
    The variant served when this environment is enabled and no rules match.
    DisabledVariantId string
    The variant served while this environment is disabled or paused.
    Enabled bool
    Whether the flag actively evaluates in this environment.
    DefaultVariantId string
    The variant served when this environment is enabled and no rules match.
    DisabledVariantId string
    The variant served while this environment is disabled or paused.
    Enabled bool
    Whether the flag actively evaluates in this environment.
    default_variant_id string
    The variant served when this environment is enabled and no rules match.
    disabled_variant_id string
    The variant served while this environment is disabled or paused.
    enabled bool
    Whether the flag actively evaluates in this environment.
    defaultVariantId String
    The variant served when this environment is enabled and no rules match.
    disabledVariantId String
    The variant served while this environment is disabled or paused.
    enabled Boolean
    Whether the flag actively evaluates in this environment.
    defaultVariantId string
    The variant served when this environment is enabled and no rules match.
    disabledVariantId string
    The variant served while this environment is disabled or paused.
    enabled boolean
    Whether the flag actively evaluates in this environment.
    default_variant_id str
    The variant served when this environment is enabled and no rules match.
    disabled_variant_id str
    The variant served while this environment is disabled or paused.
    enabled bool
    Whether the flag actively evaluates in this environment.
    defaultVariantId String
    The variant served when this environment is enabled and no rules match.
    disabledVariantId String
    The variant served while this environment is disabled or paused.
    enabled Boolean
    Whether the flag actively evaluates in this environment.

    GetFeatureFlagPreview

    DefaultVariantId string
    The variant served when this environment is enabled and no rules match.
    DisabledVariantId string
    The variant served while this environment is disabled or paused.
    Enabled bool
    Whether the flag actively evaluates in this environment.
    DefaultVariantId string
    The variant served when this environment is enabled and no rules match.
    DisabledVariantId string
    The variant served while this environment is disabled or paused.
    Enabled bool
    Whether the flag actively evaluates in this environment.
    default_variant_id string
    The variant served when this environment is enabled and no rules match.
    disabled_variant_id string
    The variant served while this environment is disabled or paused.
    enabled bool
    Whether the flag actively evaluates in this environment.
    defaultVariantId String
    The variant served when this environment is enabled and no rules match.
    disabledVariantId String
    The variant served while this environment is disabled or paused.
    enabled Boolean
    Whether the flag actively evaluates in this environment.
    defaultVariantId string
    The variant served when this environment is enabled and no rules match.
    disabledVariantId string
    The variant served while this environment is disabled or paused.
    enabled boolean
    Whether the flag actively evaluates in this environment.
    default_variant_id str
    The variant served when this environment is enabled and no rules match.
    disabled_variant_id str
    The variant served while this environment is disabled or paused.
    enabled bool
    Whether the flag actively evaluates in this environment.
    defaultVariantId String
    The variant served when this environment is enabled and no rules match.
    disabledVariantId String
    The variant served while this environment is disabled or paused.
    enabled Boolean
    Whether the flag actively evaluates in this environment.

    GetFeatureFlagProduction

    DefaultVariantId string
    The variant served when this environment is enabled and no rules match.
    DisabledVariantId string
    The variant served while this environment is disabled or paused.
    Enabled bool
    Whether the flag actively evaluates in this environment.
    DefaultVariantId string
    The variant served when this environment is enabled and no rules match.
    DisabledVariantId string
    The variant served while this environment is disabled or paused.
    Enabled bool
    Whether the flag actively evaluates in this environment.
    default_variant_id string
    The variant served when this environment is enabled and no rules match.
    disabled_variant_id string
    The variant served while this environment is disabled or paused.
    enabled bool
    Whether the flag actively evaluates in this environment.
    defaultVariantId String
    The variant served when this environment is enabled and no rules match.
    disabledVariantId String
    The variant served while this environment is disabled or paused.
    enabled Boolean
    Whether the flag actively evaluates in this environment.
    defaultVariantId string
    The variant served when this environment is enabled and no rules match.
    disabledVariantId string
    The variant served while this environment is disabled or paused.
    enabled boolean
    Whether the flag actively evaluates in this environment.
    default_variant_id str
    The variant served when this environment is enabled and no rules match.
    disabled_variant_id str
    The variant served while this environment is disabled or paused.
    enabled bool
    Whether the flag actively evaluates in this environment.
    defaultVariantId String
    The variant served when this environment is enabled and no rules match.
    disabledVariantId String
    The variant served while this environment is disabled or paused.
    enabled Boolean
    Whether the flag actively evaluates in this environment.

    GetFeatureFlagVariant

    Description string
    A human-readable description for the variant.
    Id string
    The stable variant identifier.
    Label string
    A human-readable label for the variant.
    ValueBool bool
    The boolean value for this variant when kind = "boolean".
    ValueNumber double
    The numeric value for this variant when kind = "number".
    ValueString string
    The string value for this variant when kind = "string".
    Description string
    A human-readable description for the variant.
    Id string
    The stable variant identifier.
    Label string
    A human-readable label for the variant.
    ValueBool bool
    The boolean value for this variant when kind = "boolean".
    ValueNumber float64
    The numeric value for this variant when kind = "number".
    ValueString string
    The string value for this variant when kind = "string".
    description string
    A human-readable description for the variant.
    id string
    The stable variant identifier.
    label string
    A human-readable label for the variant.
    value_bool bool
    The boolean value for this variant when kind = "boolean".
    value_number number
    The numeric value for this variant when kind = "number".
    value_string string
    The string value for this variant when kind = "string".
    description String
    A human-readable description for the variant.
    id String
    The stable variant identifier.
    label String
    A human-readable label for the variant.
    valueBool Boolean
    The boolean value for this variant when kind = "boolean".
    valueNumber Double
    The numeric value for this variant when kind = "number".
    valueString String
    The string value for this variant when kind = "string".
    description string
    A human-readable description for the variant.
    id string
    The stable variant identifier.
    label string
    A human-readable label for the variant.
    valueBool boolean
    The boolean value for this variant when kind = "boolean".
    valueNumber number
    The numeric value for this variant when kind = "number".
    valueString string
    The string value for this variant when kind = "string".
    description str
    A human-readable description for the variant.
    id str
    The stable variant identifier.
    label str
    A human-readable label for the variant.
    value_bool bool
    The boolean value for this variant when kind = "boolean".
    value_number float
    The numeric value for this variant when kind = "number".
    value_string str
    The string value for this variant when kind = "string".
    description String
    A human-readable description for the variant.
    id String
    The stable variant identifier.
    label String
    A human-readable label for the variant.
    valueBool Boolean
    The boolean value for this variant when kind = "boolean".
    valueNumber Number
    The numeric value for this variant when kind = "number".
    valueString String
    The string value for this variant when kind = "string".

    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