1. Packages
  2. Supabase Provider
  3. API Docs
  4. EdgeFunction
Viewing docs for supabase 1.7.0
published on Friday, Feb 13, 2026 by supabase
supabase logo
Viewing docs for supabase 1.7.0
published on Friday, Feb 13, 2026 by supabase

    Edge Function resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as supabase from "@pulumi/supabase";
    
    const foo = new supabase.EdgeFunction("foo", {
        projectRef: "mayuaycdtijbctgqbycg",
        slug: "foo",
        entrypoint: "supabase/functions/foo/index.ts",
    });
    
    import pulumi
    import pulumi_supabase as supabase
    
    foo = supabase.EdgeFunction("foo",
        project_ref="mayuaycdtijbctgqbycg",
        slug="foo",
        entrypoint="supabase/functions/foo/index.ts")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/supabase/supabase"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := supabase.NewEdgeFunction(ctx, "foo", &supabase.EdgeFunctionArgs{
    			ProjectRef: pulumi.String("mayuaycdtijbctgqbycg"),
    			Slug:       pulumi.String("foo"),
    			Entrypoint: pulumi.String("supabase/functions/foo/index.ts"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Supabase = Pulumi.Supabase;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Supabase.EdgeFunction("foo", new()
        {
            ProjectRef = "mayuaycdtijbctgqbycg",
            Slug = "foo",
            Entrypoint = "supabase/functions/foo/index.ts",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.supabase.EdgeFunction;
    import com.pulumi.supabase.EdgeFunctionArgs;
    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 foo = new EdgeFunction("foo", EdgeFunctionArgs.builder()
                .projectRef("mayuaycdtijbctgqbycg")
                .slug("foo")
                .entrypoint("supabase/functions/foo/index.ts")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: supabase:EdgeFunction
        properties:
          projectRef: mayuaycdtijbctgqbycg
          slug: foo
          entrypoint: supabase/functions/foo/index.ts
    

    Create EdgeFunction Resource

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

    Constructor syntax

    new EdgeFunction(name: string, args: EdgeFunctionArgs, opts?: CustomResourceOptions);
    @overload
    def EdgeFunction(resource_name: str,
                     args: EdgeFunctionArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def EdgeFunction(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     entrypoint: Optional[str] = None,
                     project_ref: Optional[str] = None,
                     slug: Optional[str] = None,
                     import_map: Optional[str] = None,
                     name: Optional[str] = None,
                     static_files: Optional[Sequence[str]] = None)
    func NewEdgeFunction(ctx *Context, name string, args EdgeFunctionArgs, opts ...ResourceOption) (*EdgeFunction, error)
    public EdgeFunction(string name, EdgeFunctionArgs args, CustomResourceOptions? opts = null)
    public EdgeFunction(String name, EdgeFunctionArgs args)
    public EdgeFunction(String name, EdgeFunctionArgs args, CustomResourceOptions options)
    
    type: supabase:EdgeFunction
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EdgeFunctionArgs
    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 EdgeFunctionArgs
    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 EdgeFunctionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EdgeFunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EdgeFunctionArgs
    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 edgeFunctionResource = new Supabase.EdgeFunction("edgeFunctionResource", new()
    {
        Entrypoint = "string",
        ProjectRef = "string",
        Slug = "string",
        ImportMap = "string",
        Name = "string",
        StaticFiles = new[]
        {
            "string",
        },
    });
    
    example, err := supabase.NewEdgeFunction(ctx, "edgeFunctionResource", &supabase.EdgeFunctionArgs{
    	Entrypoint: pulumi.String("string"),
    	ProjectRef: pulumi.String("string"),
    	Slug:       pulumi.String("string"),
    	ImportMap:  pulumi.String("string"),
    	Name:       pulumi.String("string"),
    	StaticFiles: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var edgeFunctionResource = new EdgeFunction("edgeFunctionResource", EdgeFunctionArgs.builder()
        .entrypoint("string")
        .projectRef("string")
        .slug("string")
        .importMap("string")
        .name("string")
        .staticFiles("string")
        .build());
    
    edge_function_resource = supabase.EdgeFunction("edgeFunctionResource",
        entrypoint="string",
        project_ref="string",
        slug="string",
        import_map="string",
        name="string",
        static_files=["string"])
    
    const edgeFunctionResource = new supabase.EdgeFunction("edgeFunctionResource", {
        entrypoint: "string",
        projectRef: "string",
        slug: "string",
        importMap: "string",
        name: "string",
        staticFiles: ["string"],
    });
    
    type: supabase:EdgeFunction
    properties:
        entrypoint: string
        importMap: string
        name: string
        projectRef: string
        slug: string
        staticFiles:
            - string
    

    EdgeFunction 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 EdgeFunction resource accepts the following input properties:

    Entrypoint string
    Path to the function entrypoint file
    ProjectRef string
    Project ref
    Slug string
    URL-friendly identifier for the function
    ImportMap string
    Path to the import map file
    Name string
    Name of the function (defaults to slug if not specified)
    StaticFiles List<string>
    List of glob patterns for static files to include
    Entrypoint string
    Path to the function entrypoint file
    ProjectRef string
    Project ref
    Slug string
    URL-friendly identifier for the function
    ImportMap string
    Path to the import map file
    Name string
    Name of the function (defaults to slug if not specified)
    StaticFiles []string
    List of glob patterns for static files to include
    entrypoint String
    Path to the function entrypoint file
    projectRef String
    Project ref
    slug String
    URL-friendly identifier for the function
    importMap String
    Path to the import map file
    name String
    Name of the function (defaults to slug if not specified)
    staticFiles List<String>
    List of glob patterns for static files to include
    entrypoint string
    Path to the function entrypoint file
    projectRef string
    Project ref
    slug string
    URL-friendly identifier for the function
    importMap string
    Path to the import map file
    name string
    Name of the function (defaults to slug if not specified)
    staticFiles string[]
    List of glob patterns for static files to include
    entrypoint str
    Path to the function entrypoint file
    project_ref str
    Project ref
    slug str
    URL-friendly identifier for the function
    import_map str
    Path to the import map file
    name str
    Name of the function (defaults to slug if not specified)
    static_files Sequence[str]
    List of glob patterns for static files to include
    entrypoint String
    Path to the function entrypoint file
    projectRef String
    Project ref
    slug String
    URL-friendly identifier for the function
    importMap String
    Path to the import map file
    name String
    Name of the function (defaults to slug if not specified)
    staticFiles List<String>
    List of glob patterns for static files to include

    Outputs

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

    Checksum string
    SHA256 checksum of the deployed function bundle (remote)
    CreatedAt double
    Timestamp when the function was created
    Id string
    The provider-assigned unique ID for this managed resource.
    LocalChecksum string
    SHA256 checksum of local source files before upload
    Status string
    Function deployment status
    UpdatedAt double
    Timestamp when the function was last updated
    Version double
    Currently deployed function version
    Checksum string
    SHA256 checksum of the deployed function bundle (remote)
    CreatedAt float64
    Timestamp when the function was created
    Id string
    The provider-assigned unique ID for this managed resource.
    LocalChecksum string
    SHA256 checksum of local source files before upload
    Status string
    Function deployment status
    UpdatedAt float64
    Timestamp when the function was last updated
    Version float64
    Currently deployed function version
    checksum String
    SHA256 checksum of the deployed function bundle (remote)
    createdAt Double
    Timestamp when the function was created
    id String
    The provider-assigned unique ID for this managed resource.
    localChecksum String
    SHA256 checksum of local source files before upload
    status String
    Function deployment status
    updatedAt Double
    Timestamp when the function was last updated
    version Double
    Currently deployed function version
    checksum string
    SHA256 checksum of the deployed function bundle (remote)
    createdAt number
    Timestamp when the function was created
    id string
    The provider-assigned unique ID for this managed resource.
    localChecksum string
    SHA256 checksum of local source files before upload
    status string
    Function deployment status
    updatedAt number
    Timestamp when the function was last updated
    version number
    Currently deployed function version
    checksum str
    SHA256 checksum of the deployed function bundle (remote)
    created_at float
    Timestamp when the function was created
    id str
    The provider-assigned unique ID for this managed resource.
    local_checksum str
    SHA256 checksum of local source files before upload
    status str
    Function deployment status
    updated_at float
    Timestamp when the function was last updated
    version float
    Currently deployed function version
    checksum String
    SHA256 checksum of the deployed function bundle (remote)
    createdAt Number
    Timestamp when the function was created
    id String
    The provider-assigned unique ID for this managed resource.
    localChecksum String
    SHA256 checksum of local source files before upload
    status String
    Function deployment status
    updatedAt Number
    Timestamp when the function was last updated
    version Number
    Currently deployed function version

    Look up Existing EdgeFunction Resource

    Get an existing EdgeFunction 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?: EdgeFunctionState, opts?: CustomResourceOptions): EdgeFunction
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            checksum: Optional[str] = None,
            created_at: Optional[float] = None,
            entrypoint: Optional[str] = None,
            import_map: Optional[str] = None,
            local_checksum: Optional[str] = None,
            name: Optional[str] = None,
            project_ref: Optional[str] = None,
            slug: Optional[str] = None,
            static_files: Optional[Sequence[str]] = None,
            status: Optional[str] = None,
            updated_at: Optional[float] = None,
            version: Optional[float] = None) -> EdgeFunction
    func GetEdgeFunction(ctx *Context, name string, id IDInput, state *EdgeFunctionState, opts ...ResourceOption) (*EdgeFunction, error)
    public static EdgeFunction Get(string name, Input<string> id, EdgeFunctionState? state, CustomResourceOptions? opts = null)
    public static EdgeFunction get(String name, Output<String> id, EdgeFunctionState state, CustomResourceOptions options)
    resources:  _:    type: supabase:EdgeFunction    get:      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:
    Checksum string
    SHA256 checksum of the deployed function bundle (remote)
    CreatedAt double
    Timestamp when the function was created
    Entrypoint string
    Path to the function entrypoint file
    ImportMap string
    Path to the import map file
    LocalChecksum string
    SHA256 checksum of local source files before upload
    Name string
    Name of the function (defaults to slug if not specified)
    ProjectRef string
    Project ref
    Slug string
    URL-friendly identifier for the function
    StaticFiles List<string>
    List of glob patterns for static files to include
    Status string
    Function deployment status
    UpdatedAt double
    Timestamp when the function was last updated
    Version double
    Currently deployed function version
    Checksum string
    SHA256 checksum of the deployed function bundle (remote)
    CreatedAt float64
    Timestamp when the function was created
    Entrypoint string
    Path to the function entrypoint file
    ImportMap string
    Path to the import map file
    LocalChecksum string
    SHA256 checksum of local source files before upload
    Name string
    Name of the function (defaults to slug if not specified)
    ProjectRef string
    Project ref
    Slug string
    URL-friendly identifier for the function
    StaticFiles []string
    List of glob patterns for static files to include
    Status string
    Function deployment status
    UpdatedAt float64
    Timestamp when the function was last updated
    Version float64
    Currently deployed function version
    checksum String
    SHA256 checksum of the deployed function bundle (remote)
    createdAt Double
    Timestamp when the function was created
    entrypoint String
    Path to the function entrypoint file
    importMap String
    Path to the import map file
    localChecksum String
    SHA256 checksum of local source files before upload
    name String
    Name of the function (defaults to slug if not specified)
    projectRef String
    Project ref
    slug String
    URL-friendly identifier for the function
    staticFiles List<String>
    List of glob patterns for static files to include
    status String
    Function deployment status
    updatedAt Double
    Timestamp when the function was last updated
    version Double
    Currently deployed function version
    checksum string
    SHA256 checksum of the deployed function bundle (remote)
    createdAt number
    Timestamp when the function was created
    entrypoint string
    Path to the function entrypoint file
    importMap string
    Path to the import map file
    localChecksum string
    SHA256 checksum of local source files before upload
    name string
    Name of the function (defaults to slug if not specified)
    projectRef string
    Project ref
    slug string
    URL-friendly identifier for the function
    staticFiles string[]
    List of glob patterns for static files to include
    status string
    Function deployment status
    updatedAt number
    Timestamp when the function was last updated
    version number
    Currently deployed function version
    checksum str
    SHA256 checksum of the deployed function bundle (remote)
    created_at float
    Timestamp when the function was created
    entrypoint str
    Path to the function entrypoint file
    import_map str
    Path to the import map file
    local_checksum str
    SHA256 checksum of local source files before upload
    name str
    Name of the function (defaults to slug if not specified)
    project_ref str
    Project ref
    slug str
    URL-friendly identifier for the function
    static_files Sequence[str]
    List of glob patterns for static files to include
    status str
    Function deployment status
    updated_at float
    Timestamp when the function was last updated
    version float
    Currently deployed function version
    checksum String
    SHA256 checksum of the deployed function bundle (remote)
    createdAt Number
    Timestamp when the function was created
    entrypoint String
    Path to the function entrypoint file
    importMap String
    Path to the import map file
    localChecksum String
    SHA256 checksum of local source files before upload
    name String
    Name of the function (defaults to slug if not specified)
    projectRef String
    Project ref
    slug String
    URL-friendly identifier for the function
    staticFiles List<String>
    List of glob patterns for static files to include
    status String
    Function deployment status
    updatedAt Number
    Timestamp when the function was last updated
    version Number
    Currently deployed function version

    Package Details

    Repository
    supabase supabase/terraform-provider-supabase
    License
    Notes
    This Pulumi package is based on the supabase Terraform Provider.
    supabase logo
    Viewing docs for supabase 1.7.0
    published on Friday, Feb 13, 2026 by supabase
      Try Pulumi Cloud free. Your team will thank you.