1. Packages
  2. Packages
  3. Scaleway
  4. API Docs
  5. functions
  6. Function
Viewing docs for Scaleway v1.49.0
published on Thursday, May 14, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.49.0
published on Thursday, May 14, 2026 by pulumiverse

    The scaleway.functions.Function resource allows you to create and manage Serverless Functions.

    Refer to the Serverless Functions product documentation and API documentation for more information.

    For more information on the limitations of Serverless Functions, refer to the dedicated documentation.

    Example Usage

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.functions.Namespace("main", {
        name: "main-function-namespace",
        description: "Main function namespace",
    });
    const mainFunction = new scaleway.functions.Function("main", {
        namespaceId: main.id,
        runtime: "go124",
        handler: "Handle",
        privacy: "private",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.functions.Namespace("main",
        name="main-function-namespace",
        description="Main function namespace")
    main_function = scaleway.functions.Function("main",
        namespace_id=main.id,
        runtime="go124",
        handler="Handle",
        privacy="private")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/functions"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := functions.NewNamespace(ctx, "main", &functions.NamespaceArgs{
    			Name:        pulumi.String("main-function-namespace"),
    			Description: pulumi.String("Main function namespace"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = functions.NewFunction(ctx, "main", &functions.FunctionArgs{
    			NamespaceId: main.ID(),
    			Runtime:     pulumi.String("go124"),
    			Handler:     pulumi.String("Handle"),
    			Privacy:     pulumi.String("private"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.Functions.Namespace("main", new()
        {
            Name = "main-function-namespace",
            Description = "Main function namespace",
        });
    
        var mainFunction = new Scaleway.Functions.Function("main", new()
        {
            NamespaceId = main.Id,
            Runtime = "go124",
            Handler = "Handle",
            Privacy = "private",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.functions.Namespace;
    import com.pulumi.scaleway.functions.NamespaceArgs;
    import com.pulumi.scaleway.functions.Function;
    import com.pulumi.scaleway.functions.FunctionArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 main = new Namespace("main", NamespaceArgs.builder()
                .name("main-function-namespace")
                .description("Main function namespace")
                .build());
    
            var mainFunction = new Function("mainFunction", FunctionArgs.builder()
                .namespaceId(main.id())
                .runtime("go124")
                .handler("Handle")
                .privacy("private")
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:functions:Namespace
        properties:
          name: main-function-namespace
          description: Main function namespace
      mainFunction:
        type: scaleway:functions:Function
        name: main
        properties:
          namespaceId: ${main.id}
          runtime: go124
          handler: Handle
          privacy: private
    
    Example coming soon!
    

    With sources and deploy

    You can easily create a zip file containing your function (ex: zip function.zip -r go.mod go.sum handler.go) to deploy it with Terraform seamlessly. Refer to our dedicated documentation for more information on how to package a function into a zip file.

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    import * as std from "@pulumi/std";
    
    const main = new scaleway.functions.Namespace("main", {
        name: "main-function-namespace",
        description: "Main function namespace",
    });
    const mainFunction = new scaleway.functions.Function("main", {
        namespaceId: main.id,
        description: "function with zip file",
        tags: [
            "tag1",
            "tag2",
        ],
        runtime: "go124",
        handler: "Handle",
        privacy: "private",
        timeout: 10,
        zipFile: "function.zip",
        zipHash: std.filesha256({
            input: "function.zip",
        }).result,
        deploy: true,
    });
    
    import pulumi
    import pulumi_std as std
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.functions.Namespace("main",
        name="main-function-namespace",
        description="Main function namespace")
    main_function = scaleway.functions.Function("main",
        namespace_id=main.id,
        description="function with zip file",
        tags=[
            "tag1",
            "tag2",
        ],
        runtime="go124",
        handler="Handle",
        privacy="private",
        timeout=10,
        zip_file="function.zip",
        zip_hash=std.filesha256(input="function.zip")["result"],
        deploy=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/functions"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := functions.NewNamespace(ctx, "main", &functions.NamespaceArgs{
    			Name:        pulumi.String("main-function-namespace"),
    			Description: pulumi.String("Main function namespace"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFilesha256, err := std.Filesha256(ctx, map[string]interface{}{
    			"input": "function.zip",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = functions.NewFunction(ctx, "main", &functions.FunctionArgs{
    			NamespaceId: main.ID(),
    			Description: pulumi.String("function with zip file"),
    			Tags: pulumi.StringArray{
    				pulumi.String("tag1"),
    				pulumi.String("tag2"),
    			},
    			Runtime: pulumi.String("go124"),
    			Handler: pulumi.String("Handle"),
    			Privacy: pulumi.String("private"),
    			Timeout: pulumi.Int(10),
    			ZipFile: pulumi.String("function.zip"),
    			ZipHash: invokeFilesha256.Result,
    			Deploy:  pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.Functions.Namespace("main", new()
        {
            Name = "main-function-namespace",
            Description = "Main function namespace",
        });
    
        var mainFunction = new Scaleway.Functions.Function("main", new()
        {
            NamespaceId = main.Id,
            Description = "function with zip file",
            Tags = new[]
            {
                "tag1",
                "tag2",
            },
            Runtime = "go124",
            Handler = "Handle",
            Privacy = "private",
            Timeout = 10,
            ZipFile = "function.zip",
            ZipHash = Std.Filesha256.Invoke(new()
            {
                Input = "function.zip",
            }).Result,
            Deploy = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.functions.Namespace;
    import com.pulumi.scaleway.functions.NamespaceArgs;
    import com.pulumi.scaleway.functions.Function;
    import com.pulumi.scaleway.functions.FunctionArgs;
    import com.pulumi.std.StdFunctions;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 main = new Namespace("main", NamespaceArgs.builder()
                .name("main-function-namespace")
                .description("Main function namespace")
                .build());
    
            var mainFunction = new Function("mainFunction", FunctionArgs.builder()
                .namespaceId(main.id())
                .description("function with zip file")
                .tags(            
                    "tag1",
                    "tag2")
                .runtime("go124")
                .handler("Handle")
                .privacy("private")
                .timeout(10)
                .zipFile("function.zip")
                .zipHash(StdFunctions.filesha256(Map.of("input", "function.zip")).result())
                .deploy(true)
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:functions:Namespace
        properties:
          name: main-function-namespace
          description: Main function namespace
      mainFunction:
        type: scaleway:functions:Function
        name: main
        properties:
          namespaceId: ${main.id}
          description: function with zip file
          tags:
            - tag1
            - tag2
          runtime: go124
          handler: Handle
          privacy: private
          timeout: 10
          zipFile: function.zip
          zipHash:
            fn::invoke:
              function: std:filesha256
              arguments:
                input: function.zip
              return: result
          deploy: true
    
    Example coming soon!
    

    Managing authentication of private functions with IAM

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    import * as std from "@pulumi/std";
    
    // Project to be referenced in the IAM policy
    const _default = scaleway.account.getProject({
        name: "default",
    });
    // IAM resources
    const funcAuth = new scaleway.iam.Application("func_auth", {name: "function-auth"});
    const accessPrivateFuncs = new scaleway.iam.Policy("access_private_funcs", {
        applicationId: funcAuth.id,
        rules: [{
            projectIds: [_default.then(_default => _default.id)],
            permissionSetNames: ["FunctionsPrivateAccess"],
        }],
    });
    const apiKey = new scaleway.iam.ApiKey("api_key", {applicationId: funcAuth.id});
    // Function resources
    const _private = new scaleway.functions.Namespace("private", {name: "private-function-namespace"});
    const privateFunction = new scaleway.functions.Function("private", {
        namespaceId: _private.id,
        runtime: "go124",
        handler: "Handle",
        privacy: "private",
        zipFile: "function.zip",
        zipHash: std.filesha256({
            input: "function.zip",
        }).result,
        deploy: true,
    });
    export const secretKey = apiKey.secretKey;
    export const functionEndpoint = privateFunction.domainName;
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumi_std as std
    import pulumiverse_scaleway as scaleway
    
    # Project to be referenced in the IAM policy
    default = scaleway.account.get_project(name="default")
    # IAM resources
    func_auth = scaleway.iam.Application("func_auth", name="function-auth")
    access_private_funcs = scaleway.iam.Policy("access_private_funcs",
        application_id=func_auth.id,
        rules=[{
            "project_ids": [default.id],
            "permission_set_names": ["FunctionsPrivateAccess"],
        }])
    api_key = scaleway.iam.ApiKey("api_key", application_id=func_auth.id)
    # Function resources
    private = scaleway.functions.Namespace("private", name="private-function-namespace")
    private_function = scaleway.functions.Function("private",
        namespace_id=private.id,
        runtime="go124",
        handler="Handle",
        privacy="private",
        zip_file="function.zip",
        zip_hash=std.filesha256(input="function.zip")["result"],
        deploy=True)
    pulumi.export("secretKey", api_key.secret_key)
    pulumi.export("functionEndpoint", private_function.domain_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/account"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/functions"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/iam"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Project to be referenced in the IAM policy
    		_default, err := account.LookupProject(ctx, &account.LookupProjectArgs{
    			Name: pulumi.StringRef("default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// IAM resources
    		funcAuth, err := iam.NewApplication(ctx, "func_auth", &iam.ApplicationArgs{
    			Name: pulumi.String("function-auth"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = iam.NewPolicy(ctx, "access_private_funcs", &iam.PolicyArgs{
    			ApplicationId: funcAuth.ID(),
    			Rules: iam.PolicyRuleArray{
    				&iam.PolicyRuleArgs{
    					ProjectIds: pulumi.StringArray{
    						pulumi.String(_default.Id),
    					},
    					PermissionSetNames: pulumi.StringArray{
    						pulumi.String("FunctionsPrivateAccess"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		apiKey, err := iam.NewApiKey(ctx, "api_key", &iam.ApiKeyArgs{
    			ApplicationId: funcAuth.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		// Function resources
    		private, err := functions.NewNamespace(ctx, "private", &functions.NamespaceArgs{
    			Name: pulumi.String("private-function-namespace"),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFilesha256, err := std.Filesha256(ctx, map[string]interface{}{
    			"input": "function.zip",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		privateFunction, err := functions.NewFunction(ctx, "private", &functions.FunctionArgs{
    			NamespaceId: private.ID(),
    			Runtime:     pulumi.String("go124"),
    			Handler:     pulumi.String("Handle"),
    			Privacy:     pulumi.String("private"),
    			ZipFile:     pulumi.String("function.zip"),
    			ZipHash:     invokeFilesha256.Result,
    			Deploy:      pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("secretKey", apiKey.SecretKey)
    		ctx.Export("functionEndpoint", privateFunction.DomainName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        // Project to be referenced in the IAM policy
        var @default = Scaleway.Account.GetProject.Invoke(new()
        {
            Name = "default",
        });
    
        // IAM resources
        var funcAuth = new Scaleway.Iam.Application("func_auth", new()
        {
            Name = "function-auth",
        });
    
        var accessPrivateFuncs = new Scaleway.Iam.Policy("access_private_funcs", new()
        {
            ApplicationId = funcAuth.Id,
            Rules = new[]
            {
                new Scaleway.Iam.Inputs.PolicyRuleArgs
                {
                    ProjectIds = new[]
                    {
                        @default.Apply(@default => @default.Apply(getProjectResult => getProjectResult.Id)),
                    },
                    PermissionSetNames = new[]
                    {
                        "FunctionsPrivateAccess",
                    },
                },
            },
        });
    
        var apiKey = new Scaleway.Iam.ApiKey("api_key", new()
        {
            ApplicationId = funcAuth.Id,
        });
    
        // Function resources
        var @private = new Scaleway.Functions.Namespace("private", new()
        {
            Name = "private-function-namespace",
        });
    
        var privateFunction = new Scaleway.Functions.Function("private", new()
        {
            NamespaceId = @private.Id,
            Runtime = "go124",
            Handler = "Handle",
            Privacy = "private",
            ZipFile = "function.zip",
            ZipHash = Std.Filesha256.Invoke(new()
            {
                Input = "function.zip",
            }).Result,
            Deploy = true,
        });
    
        return new Dictionary<string, object?>
        {
            ["secretKey"] = apiKey.SecretKey,
            ["functionEndpoint"] = privateFunction.DomainName,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.account.AccountFunctions;
    import com.pulumi.scaleway.account.inputs.GetProjectArgs;
    import com.pulumi.scaleway.iam.Application;
    import com.pulumi.scaleway.iam.ApplicationArgs;
    import com.pulumi.scaleway.iam.Policy;
    import com.pulumi.scaleway.iam.PolicyArgs;
    import com.pulumi.scaleway.iam.inputs.PolicyRuleArgs;
    import com.pulumi.scaleway.iam.ApiKey;
    import com.pulumi.scaleway.iam.ApiKeyArgs;
    import com.pulumi.scaleway.functions.Namespace;
    import com.pulumi.scaleway.functions.NamespaceArgs;
    import com.pulumi.scaleway.functions.Function;
    import com.pulumi.scaleway.functions.FunctionArgs;
    import com.pulumi.std.StdFunctions;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Project to be referenced in the IAM policy
            final var default = AccountFunctions.getProject(GetProjectArgs.builder()
                .name("default")
                .build());
    
            // IAM resources
            var funcAuth = new Application("funcAuth", ApplicationArgs.builder()
                .name("function-auth")
                .build());
    
            var accessPrivateFuncs = new Policy("accessPrivateFuncs", PolicyArgs.builder()
                .applicationId(funcAuth.id())
                .rules(PolicyRuleArgs.builder()
                    .projectIds(default_.id())
                    .permissionSetNames("FunctionsPrivateAccess")
                    .build())
                .build());
    
            var apiKey = new ApiKey("apiKey", ApiKeyArgs.builder()
                .applicationId(funcAuth.id())
                .build());
    
            // Function resources
            var private_ = new Namespace("private", NamespaceArgs.builder()
                .name("private-function-namespace")
                .build());
    
            var privateFunction = new Function("privateFunction", FunctionArgs.builder()
                .namespaceId(private_.id())
                .runtime("go124")
                .handler("Handle")
                .privacy("private")
                .zipFile("function.zip")
                .zipHash(StdFunctions.filesha256(Map.of("input", "function.zip")).result())
                .deploy(true)
                .build());
    
            ctx.export("secretKey", apiKey.secretKey());
            ctx.export("functionEndpoint", privateFunction.domainName());
        }
    }
    
    resources:
      # IAM resources
      funcAuth:
        type: scaleway:iam:Application
        name: func_auth
        properties:
          name: function-auth
      accessPrivateFuncs:
        type: scaleway:iam:Policy
        name: access_private_funcs
        properties:
          applicationId: ${funcAuth.id}
          rules:
            - projectIds:
                - ${default.id}
              permissionSetNames:
                - FunctionsPrivateAccess
      apiKey:
        type: scaleway:iam:ApiKey
        name: api_key
        properties:
          applicationId: ${funcAuth.id}
      # Function resources
      private:
        type: scaleway:functions:Namespace
        properties:
          name: private-function-namespace
      privateFunction:
        type: scaleway:functions:Function
        name: private
        properties:
          namespaceId: ${private.id}
          runtime: go124
          handler: Handle
          privacy: private
          zipFile: function.zip
          zipHash:
            fn::invoke:
              function: std:filesha256
              arguments:
                input: function.zip
              return: result
          deploy: true
    variables:
      # Project to be referenced in the IAM policy
      default:
        fn::invoke:
          function: scaleway:account:getProject
          arguments:
            name: default
    outputs:
      # Output the secret key and the function's endpoint for the curl command
      secretKey: ${apiKey.secretKey}
      functionEndpoint: ${privateFunction.domainName}
    
    Example coming soon!
    

    Then you can access your private function using the API key:

    $ curl -H "X-Auth-Token: $(terraform output -raw secret_key)" \
      "https://$(terraform output -raw function_endpoint)/"
    

    Keep in mind that you should revoke your legacy JWT tokens to ensure maximum security.

    Create Function Resource

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

    Constructor syntax

    new Function(name: string, args: FunctionArgs, opts?: CustomResourceOptions);
    @overload
    def Function(resource_name: str,
                 args: FunctionArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Function(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 namespace_id: Optional[str] = None,
                 runtime: Optional[str] = None,
                 privacy: Optional[str] = None,
                 handler: Optional[str] = None,
                 max_scale: Optional[int] = None,
                 region: Optional[str] = None,
                 memory_limit: Optional[int] = None,
                 min_scale: Optional[int] = None,
                 name: Optional[str] = None,
                 http_option: Optional[str] = None,
                 environment_variables: Optional[Mapping[str, str]] = None,
                 private_network_id: Optional[str] = None,
                 project_id: Optional[str] = None,
                 deploy: Optional[bool] = None,
                 description: Optional[str] = None,
                 sandbox: Optional[str] = None,
                 secret_environment_variables: Optional[Mapping[str, str]] = None,
                 tags: Optional[Sequence[str]] = None,
                 timeout: Optional[int] = None,
                 zip_file: Optional[str] = None,
                 zip_hash: Optional[str] = None)
    func NewFunction(ctx *Context, name string, args FunctionArgs, opts ...ResourceOption) (*Function, error)
    public Function(string name, FunctionArgs args, CustomResourceOptions? opts = null)
    public Function(String name, FunctionArgs args)
    public Function(String name, FunctionArgs args, CustomResourceOptions options)
    
    type: scaleway:functions:Function
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "scaleway_functions_function" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args FunctionArgs
    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 FunctionArgs
    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 FunctionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FunctionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FunctionArgs
    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 functionResource = new Scaleway.Functions.Function("functionResource", new()
    {
        NamespaceId = "string",
        Runtime = "string",
        Privacy = "string",
        Handler = "string",
        MaxScale = 0,
        Region = "string",
        MemoryLimit = 0,
        MinScale = 0,
        Name = "string",
        HttpOption = "string",
        EnvironmentVariables = 
        {
            { "string", "string" },
        },
        PrivateNetworkId = "string",
        ProjectId = "string",
        Deploy = false,
        Description = "string",
        Sandbox = "string",
        SecretEnvironmentVariables = 
        {
            { "string", "string" },
        },
        Tags = new[]
        {
            "string",
        },
        Timeout = 0,
        ZipFile = "string",
        ZipHash = "string",
    });
    
    example, err := functions.NewFunction(ctx, "functionResource", &functions.FunctionArgs{
    	NamespaceId: pulumi.String("string"),
    	Runtime:     pulumi.String("string"),
    	Privacy:     pulumi.String("string"),
    	Handler:     pulumi.String("string"),
    	MaxScale:    pulumi.Int(0),
    	Region:      pulumi.String("string"),
    	MemoryLimit: pulumi.Int(0),
    	MinScale:    pulumi.Int(0),
    	Name:        pulumi.String("string"),
    	HttpOption:  pulumi.String("string"),
    	EnvironmentVariables: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	PrivateNetworkId: pulumi.String("string"),
    	ProjectId:        pulumi.String("string"),
    	Deploy:           pulumi.Bool(false),
    	Description:      pulumi.String("string"),
    	Sandbox:          pulumi.String("string"),
    	SecretEnvironmentVariables: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeout: pulumi.Int(0),
    	ZipFile: pulumi.String("string"),
    	ZipHash: pulumi.String("string"),
    })
    
    resource "scaleway_functions_function" "functionResource" {
      namespace_id = "string"
      runtime      = "string"
      privacy      = "string"
      handler      = "string"
      max_scale    = 0
      region       = "string"
      memory_limit = 0
      min_scale    = 0
      name         = "string"
      http_option  = "string"
      environment_variables = {
        "string" = "string"
      }
      private_network_id = "string"
      project_id         = "string"
      deploy             = false
      description        = "string"
      sandbox            = "string"
      secret_environment_variables = {
        "string" = "string"
      }
      tags     = ["string"]
      timeout  = 0
      zip_file = "string"
      zip_hash = "string"
    }
    
    var functionResource = new Function("functionResource", FunctionArgs.builder()
        .namespaceId("string")
        .runtime("string")
        .privacy("string")
        .handler("string")
        .maxScale(0)
        .region("string")
        .memoryLimit(0)
        .minScale(0)
        .name("string")
        .httpOption("string")
        .environmentVariables(Map.of("string", "string"))
        .privateNetworkId("string")
        .projectId("string")
        .deploy(false)
        .description("string")
        .sandbox("string")
        .secretEnvironmentVariables(Map.of("string", "string"))
        .tags("string")
        .timeout(0)
        .zipFile("string")
        .zipHash("string")
        .build());
    
    function_resource = scaleway.functions.Function("functionResource",
        namespace_id="string",
        runtime="string",
        privacy="string",
        handler="string",
        max_scale=0,
        region="string",
        memory_limit=0,
        min_scale=0,
        name="string",
        http_option="string",
        environment_variables={
            "string": "string",
        },
        private_network_id="string",
        project_id="string",
        deploy=False,
        description="string",
        sandbox="string",
        secret_environment_variables={
            "string": "string",
        },
        tags=["string"],
        timeout=0,
        zip_file="string",
        zip_hash="string")
    
    const functionResource = new scaleway.functions.Function("functionResource", {
        namespaceId: "string",
        runtime: "string",
        privacy: "string",
        handler: "string",
        maxScale: 0,
        region: "string",
        memoryLimit: 0,
        minScale: 0,
        name: "string",
        httpOption: "string",
        environmentVariables: {
            string: "string",
        },
        privateNetworkId: "string",
        projectId: "string",
        deploy: false,
        description: "string",
        sandbox: "string",
        secretEnvironmentVariables: {
            string: "string",
        },
        tags: ["string"],
        timeout: 0,
        zipFile: "string",
        zipHash: "string",
    });
    
    type: scaleway:functions:Function
    properties:
        deploy: false
        description: string
        environmentVariables:
            string: string
        handler: string
        httpOption: string
        maxScale: 0
        memoryLimit: 0
        minScale: 0
        name: string
        namespaceId: string
        privacy: string
        privateNetworkId: string
        projectId: string
        region: string
        runtime: string
        sandbox: string
        secretEnvironmentVariables:
            string: string
        tags:
            - string
        timeout: 0
        zipFile: string
        zipHash: string
    

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

    Handler string
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    NamespaceId string

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    Privacy string
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    Runtime string
    Runtime of the function. Runtimes can be fetched using specific route
    Deploy bool
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    Description string
    The description of the function.
    EnvironmentVariables Dictionary<string, string>
    The environment variables of the function.
    HttpOption string
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    MaxScale int
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    MemoryLimit int
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    MinScale int
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    Name string
    The unique name of the function name.
    PrivateNetworkId string
    The ID of the Private Network the function is connected to.
    ProjectId string
    projectId) The ID of the project the functions namespace is associated with.
    Region string
    region). The region in which the namespace should be created.
    Sandbox string
    Execution environment of the function.
    SecretEnvironmentVariables Dictionary<string, string>
    The secret environment variables of the function.
    Tags List<string>
    The list of tags associated with the function.
    Timeout int
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    ZipFile string
    Path to the zip file containing your function sources to upload.
    ZipHash string
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    Handler string
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    NamespaceId string

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    Privacy string
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    Runtime string
    Runtime of the function. Runtimes can be fetched using specific route
    Deploy bool
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    Description string
    The description of the function.
    EnvironmentVariables map[string]string
    The environment variables of the function.
    HttpOption string
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    MaxScale int
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    MemoryLimit int
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    MinScale int
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    Name string
    The unique name of the function name.
    PrivateNetworkId string
    The ID of the Private Network the function is connected to.
    ProjectId string
    projectId) The ID of the project the functions namespace is associated with.
    Region string
    region). The region in which the namespace should be created.
    Sandbox string
    Execution environment of the function.
    SecretEnvironmentVariables map[string]string
    The secret environment variables of the function.
    Tags []string
    The list of tags associated with the function.
    Timeout int
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    ZipFile string
    Path to the zip file containing your function sources to upload.
    ZipHash string
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    handler string
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    namespace_id string

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    privacy string
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    runtime string
    Runtime of the function. Runtimes can be fetched using specific route
    deploy bool
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description string
    The description of the function.
    environment_variables map(string)
    The environment variables of the function.
    http_option string
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    max_scale number
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memory_limit number
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    min_scale number
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name string
    The unique name of the function name.
    private_network_id string
    The ID of the Private Network the function is connected to.
    project_id string
    projectId) The ID of the project the functions namespace is associated with.
    region string
    region). The region in which the namespace should be created.
    sandbox string
    Execution environment of the function.
    secret_environment_variables map(string)
    The secret environment variables of the function.
    tags list(string)
    The list of tags associated with the function.
    timeout number
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zip_file string
    Path to the zip file containing your function sources to upload.
    zip_hash string
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    handler String
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    namespaceId String

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    privacy String
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    runtime String
    Runtime of the function. Runtimes can be fetched using specific route
    deploy Boolean
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description String
    The description of the function.
    environmentVariables Map<String,String>
    The environment variables of the function.
    httpOption String
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    maxScale Integer
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memoryLimit Integer
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    minScale Integer
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name String
    The unique name of the function name.
    privateNetworkId String
    The ID of the Private Network the function is connected to.
    projectId String
    projectId) The ID of the project the functions namespace is associated with.
    region String
    region). The region in which the namespace should be created.
    sandbox String
    Execution environment of the function.
    secretEnvironmentVariables Map<String,String>
    The secret environment variables of the function.
    tags List<String>
    The list of tags associated with the function.
    timeout Integer
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zipFile String
    Path to the zip file containing your function sources to upload.
    zipHash String
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    handler string
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    namespaceId string

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    privacy string
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    runtime string
    Runtime of the function. Runtimes can be fetched using specific route
    deploy boolean
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description string
    The description of the function.
    environmentVariables {[key: string]: string}
    The environment variables of the function.
    httpOption string
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    maxScale number
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memoryLimit number
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    minScale number
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name string
    The unique name of the function name.
    privateNetworkId string
    The ID of the Private Network the function is connected to.
    projectId string
    projectId) The ID of the project the functions namespace is associated with.
    region string
    region). The region in which the namespace should be created.
    sandbox string
    Execution environment of the function.
    secretEnvironmentVariables {[key: string]: string}
    The secret environment variables of the function.
    tags string[]
    The list of tags associated with the function.
    timeout number
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zipFile string
    Path to the zip file containing your function sources to upload.
    zipHash string
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    handler str
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    namespace_id str

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    privacy str
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    runtime str
    Runtime of the function. Runtimes can be fetched using specific route
    deploy bool
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description str
    The description of the function.
    environment_variables Mapping[str, str]
    The environment variables of the function.
    http_option str
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    max_scale int
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memory_limit int
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    min_scale int
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name str
    The unique name of the function name.
    private_network_id str
    The ID of the Private Network the function is connected to.
    project_id str
    projectId) The ID of the project the functions namespace is associated with.
    region str
    region). The region in which the namespace should be created.
    sandbox str
    Execution environment of the function.
    secret_environment_variables Mapping[str, str]
    The secret environment variables of the function.
    tags Sequence[str]
    The list of tags associated with the function.
    timeout int
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zip_file str
    Path to the zip file containing your function sources to upload.
    zip_hash str
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    handler String
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    namespaceId String

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    privacy String
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    runtime String
    Runtime of the function. Runtimes can be fetched using specific route
    deploy Boolean
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description String
    The description of the function.
    environmentVariables Map<String>
    The environment variables of the function.
    httpOption String
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    maxScale Number
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memoryLimit Number
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    minScale Number
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name String
    The unique name of the function name.
    privateNetworkId String
    The ID of the Private Network the function is connected to.
    projectId String
    projectId) The ID of the project the functions namespace is associated with.
    region String
    region). The region in which the namespace should be created.
    sandbox String
    Execution environment of the function.
    secretEnvironmentVariables Map<String>
    The secret environment variables of the function.
    tags List<String>
    The list of tags associated with the function.
    timeout Number
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zipFile String
    Path to the zip file containing your function sources to upload.
    zipHash String
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).

    Outputs

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

    CpuLimit int
    The CPU limit in mVCPU for your function.
    DomainName string
    The native domain name of the function.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The organization ID the function is associated with.
    CpuLimit int
    The CPU limit in mVCPU for your function.
    DomainName string
    The native domain name of the function.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The organization ID the function is associated with.
    cpu_limit number
    The CPU limit in mVCPU for your function.
    domain_name string
    The native domain name of the function.
    id string
    The provider-assigned unique ID for this managed resource.
    organization_id string
    The organization ID the function is associated with.
    cpuLimit Integer
    The CPU limit in mVCPU for your function.
    domainName String
    The native domain name of the function.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The organization ID the function is associated with.
    cpuLimit number
    The CPU limit in mVCPU for your function.
    domainName string
    The native domain name of the function.
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The organization ID the function is associated with.
    cpu_limit int
    The CPU limit in mVCPU for your function.
    domain_name str
    The native domain name of the function.
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The organization ID the function is associated with.
    cpuLimit Number
    The CPU limit in mVCPU for your function.
    domainName String
    The native domain name of the function.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The organization ID the function is associated with.

    Look up Existing Function Resource

    Get an existing Function 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?: FunctionState, opts?: CustomResourceOptions): Function
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cpu_limit: Optional[int] = None,
            deploy: Optional[bool] = None,
            description: Optional[str] = None,
            domain_name: Optional[str] = None,
            environment_variables: Optional[Mapping[str, str]] = None,
            handler: Optional[str] = None,
            http_option: Optional[str] = None,
            max_scale: Optional[int] = None,
            memory_limit: Optional[int] = None,
            min_scale: Optional[int] = None,
            name: Optional[str] = None,
            namespace_id: Optional[str] = None,
            organization_id: Optional[str] = None,
            privacy: Optional[str] = None,
            private_network_id: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            runtime: Optional[str] = None,
            sandbox: Optional[str] = None,
            secret_environment_variables: Optional[Mapping[str, str]] = None,
            tags: Optional[Sequence[str]] = None,
            timeout: Optional[int] = None,
            zip_file: Optional[str] = None,
            zip_hash: Optional[str] = None) -> Function
    func GetFunction(ctx *Context, name string, id IDInput, state *FunctionState, opts ...ResourceOption) (*Function, error)
    public static Function Get(string name, Input<string> id, FunctionState? state, CustomResourceOptions? opts = null)
    public static Function get(String name, Output<String> id, FunctionState state, CustomResourceOptions options)
    resources:  _:    type: scaleway:functions:Function    get:      id: ${id}
    import {
      to = scaleway_functions_function.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:
    CpuLimit int
    The CPU limit in mVCPU for your function.
    Deploy bool
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    Description string
    The description of the function.
    DomainName string
    The native domain name of the function.
    EnvironmentVariables Dictionary<string, string>
    The environment variables of the function.
    Handler string
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    HttpOption string
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    MaxScale int
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    MemoryLimit int
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    MinScale int
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    Name string
    The unique name of the function name.
    NamespaceId string

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    OrganizationId string
    The organization ID the function is associated with.
    Privacy string
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    PrivateNetworkId string
    The ID of the Private Network the function is connected to.
    ProjectId string
    projectId) The ID of the project the functions namespace is associated with.
    Region string
    region). The region in which the namespace should be created.
    Runtime string
    Runtime of the function. Runtimes can be fetched using specific route
    Sandbox string
    Execution environment of the function.
    SecretEnvironmentVariables Dictionary<string, string>
    The secret environment variables of the function.
    Tags List<string>
    The list of tags associated with the function.
    Timeout int
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    ZipFile string
    Path to the zip file containing your function sources to upload.
    ZipHash string
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    CpuLimit int
    The CPU limit in mVCPU for your function.
    Deploy bool
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    Description string
    The description of the function.
    DomainName string
    The native domain name of the function.
    EnvironmentVariables map[string]string
    The environment variables of the function.
    Handler string
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    HttpOption string
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    MaxScale int
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    MemoryLimit int
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    MinScale int
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    Name string
    The unique name of the function name.
    NamespaceId string

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    OrganizationId string
    The organization ID the function is associated with.
    Privacy string
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    PrivateNetworkId string
    The ID of the Private Network the function is connected to.
    ProjectId string
    projectId) The ID of the project the functions namespace is associated with.
    Region string
    region). The region in which the namespace should be created.
    Runtime string
    Runtime of the function. Runtimes can be fetched using specific route
    Sandbox string
    Execution environment of the function.
    SecretEnvironmentVariables map[string]string
    The secret environment variables of the function.
    Tags []string
    The list of tags associated with the function.
    Timeout int
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    ZipFile string
    Path to the zip file containing your function sources to upload.
    ZipHash string
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    cpu_limit number
    The CPU limit in mVCPU for your function.
    deploy bool
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description string
    The description of the function.
    domain_name string
    The native domain name of the function.
    environment_variables map(string)
    The environment variables of the function.
    handler string
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    http_option string
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    max_scale number
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memory_limit number
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    min_scale number
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name string
    The unique name of the function name.
    namespace_id string

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    organization_id string
    The organization ID the function is associated with.
    privacy string
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    private_network_id string
    The ID of the Private Network the function is connected to.
    project_id string
    projectId) The ID of the project the functions namespace is associated with.
    region string
    region). The region in which the namespace should be created.
    runtime string
    Runtime of the function. Runtimes can be fetched using specific route
    sandbox string
    Execution environment of the function.
    secret_environment_variables map(string)
    The secret environment variables of the function.
    tags list(string)
    The list of tags associated with the function.
    timeout number
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zip_file string
    Path to the zip file containing your function sources to upload.
    zip_hash string
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    cpuLimit Integer
    The CPU limit in mVCPU for your function.
    deploy Boolean
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description String
    The description of the function.
    domainName String
    The native domain name of the function.
    environmentVariables Map<String,String>
    The environment variables of the function.
    handler String
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    httpOption String
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    maxScale Integer
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memoryLimit Integer
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    minScale Integer
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name String
    The unique name of the function name.
    namespaceId String

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    organizationId String
    The organization ID the function is associated with.
    privacy String
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    privateNetworkId String
    The ID of the Private Network the function is connected to.
    projectId String
    projectId) The ID of the project the functions namespace is associated with.
    region String
    region). The region in which the namespace should be created.
    runtime String
    Runtime of the function. Runtimes can be fetched using specific route
    sandbox String
    Execution environment of the function.
    secretEnvironmentVariables Map<String,String>
    The secret environment variables of the function.
    tags List<String>
    The list of tags associated with the function.
    timeout Integer
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zipFile String
    Path to the zip file containing your function sources to upload.
    zipHash String
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    cpuLimit number
    The CPU limit in mVCPU for your function.
    deploy boolean
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description string
    The description of the function.
    domainName string
    The native domain name of the function.
    environmentVariables {[key: string]: string}
    The environment variables of the function.
    handler string
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    httpOption string
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    maxScale number
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memoryLimit number
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    minScale number
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name string
    The unique name of the function name.
    namespaceId string

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    organizationId string
    The organization ID the function is associated with.
    privacy string
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    privateNetworkId string
    The ID of the Private Network the function is connected to.
    projectId string
    projectId) The ID of the project the functions namespace is associated with.
    region string
    region). The region in which the namespace should be created.
    runtime string
    Runtime of the function. Runtimes can be fetched using specific route
    sandbox string
    Execution environment of the function.
    secretEnvironmentVariables {[key: string]: string}
    The secret environment variables of the function.
    tags string[]
    The list of tags associated with the function.
    timeout number
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zipFile string
    Path to the zip file containing your function sources to upload.
    zipHash string
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    cpu_limit int
    The CPU limit in mVCPU for your function.
    deploy bool
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description str
    The description of the function.
    domain_name str
    The native domain name of the function.
    environment_variables Mapping[str, str]
    The environment variables of the function.
    handler str
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    http_option str
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    max_scale int
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memory_limit int
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    min_scale int
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name str
    The unique name of the function name.
    namespace_id str

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    organization_id str
    The organization ID the function is associated with.
    privacy str
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    private_network_id str
    The ID of the Private Network the function is connected to.
    project_id str
    projectId) The ID of the project the functions namespace is associated with.
    region str
    region). The region in which the namespace should be created.
    runtime str
    Runtime of the function. Runtimes can be fetched using specific route
    sandbox str
    Execution environment of the function.
    secret_environment_variables Mapping[str, str]
    The secret environment variables of the function.
    tags Sequence[str]
    The list of tags associated with the function.
    timeout int
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zip_file str
    Path to the zip file containing your function sources to upload.
    zip_hash str
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).
    cpuLimit Number
    The CPU limit in mVCPU for your function.
    deploy Boolean
    Define whether the function should be deployed. Terraform will wait for the function to be deployed. Your function will be redeployed if you update the source zip file.
    description String
    The description of the function.
    domainName String
    The native domain name of the function.
    environmentVariables Map<String>
    The environment variables of the function.
    handler String
    Handler of the function, depends on the runtime. Refer to the dedicated documentation for the list of supported runtimes.
    httpOption String
    Allows both HTTP and HTTPS (enabled) or redirect HTTP to HTTPS (redirected). Defaults to enabled.
    maxScale Number
    The maximum number of instances this function can scale to. Default to 20. Your function will scale automatically based on the incoming workload, but will never exceed the configured maxScale value.
    memoryLimit Number
    The memory resources in MB to allocate to each function. Defaults to 256 MB.
    minScale Number
    The minimum number of function instances running continuously. Defaults to 0. Functions are billed when executed, and using a minScale greater than 0 will cause your function to run constantly.
    name String
    The unique name of the function name.
    namespaceId String

    The Functions namespace ID of the function.

    Important Updating the name argument will recreate the function.

    organizationId String
    The organization ID the function is associated with.
    privacy String
    The privacy type defines the way to authenticate to your function. Please check our dedicated section.
    privateNetworkId String
    The ID of the Private Network the function is connected to.
    projectId String
    projectId) The ID of the project the functions namespace is associated with.
    region String
    region). The region in which the namespace should be created.
    runtime String
    Runtime of the function. Runtimes can be fetched using specific route
    sandbox String
    Execution environment of the function.
    secretEnvironmentVariables Map<String>
    The secret environment variables of the function.
    tags List<String>
    The list of tags associated with the function.
    timeout Number
    The maximum amount of time your function can spend processing a request before being stopped. Defaults to 300s.
    zipFile String
    Path to the zip file containing your function sources to upload.
    zipHash String
    The hash of your source zip file, changing it will redeploy the function. Can be any string, changing it will simply trigger a state change. You can use any Terraform hash function to trigger a change on your zip change (see examples).

    Import

    Functions can be imported using, {region}/{id}, as shown below:

    $ pulumi import scaleway:functions/function:Function main fr-par/11111111-1111-1111-1111-111111111111
    

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

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Viewing docs for Scaleway v1.49.0
    published on Thursday, May 14, 2026 by pulumiverse
      Try Pulumi Cloud free. Your team will thank you.