1. Registry
  2. Packages
  3. Scaleway
  4. API Docs
  5. annotations
  6. Binding
Viewing docs for Scaleway v1.54.0
published on Friday, Jul 31, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.54.0
published on Friday, Jul 31, 2026 by pulumiverse

    Creates and manages Scaleway Annotations Bindings.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const environment = new scaleway.annotations.Key("environment", {
        name: "environment",
        description: "Deployment environment (production, staging, development)",
    });
    const production = new scaleway.annotations.Value("production", {
        keyId: environment.id,
        name: "production",
        description: "Production environment",
    });
    const main = new scaleway.keymanager.Key("main", {
        name: "example-key",
        region: "fr-par",
        usage: "symmetric_encryption",
        algorithm: "aes_256_gcm",
        description: "Example key for binding",
        unprotected: true,
    });
    const mainBinding = new scaleway.annotations.Binding("main", {
        srn: main.srn,
        valueId: production.id,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    environment = scaleway.annotations.Key("environment",
        name="environment",
        description="Deployment environment (production, staging, development)")
    production = scaleway.annotations.Value("production",
        key_id=environment.id,
        name="production",
        description="Production environment")
    main = scaleway.keymanager.Key("main",
        name="example-key",
        region="fr-par",
        usage="symmetric_encryption",
        algorithm="aes_256_gcm",
        description="Example key for binding",
        unprotected=True)
    main_binding = scaleway.annotations.Binding("main",
        srn=main.srn,
        value_id=production.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/annotations"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/keymanager"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		environment, err := annotations.NewKey(ctx, "environment", &annotations.KeyArgs{
    			Name:        pulumi.String("environment"),
    			Description: pulumi.String("Deployment environment (production, staging, development)"),
    		})
    		if err != nil {
    			return err
    		}
    		production, err := annotations.NewValue(ctx, "production", &annotations.ValueArgs{
    			KeyId:       environment.ID(),
    			Name:        pulumi.String("production"),
    			Description: pulumi.String("Production environment"),
    		})
    		if err != nil {
    			return err
    		}
    		main, err := keymanager.NewKey(ctx, "main", &keymanager.KeyArgs{
    			Name:        pulumi.String("example-key"),
    			Region:      pulumi.String("fr-par"),
    			Usage:       pulumi.String("symmetric_encryption"),
    			Algorithm:   pulumi.String("aes_256_gcm"),
    			Description: pulumi.String("Example key for binding"),
    			Unprotected: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = annotations.NewBinding(ctx, "main", &annotations.BindingArgs{
    			Srn:     main.Srn,
    			ValueId: production.ID(),
    		})
    		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 environment = new Scaleway.Annotations.Key("environment", new()
        {
            Name = "environment",
            Description = "Deployment environment (production, staging, development)",
        });
    
        var production = new Scaleway.Annotations.Value("production", new()
        {
            KeyId = environment.Id,
            Name = "production",
            Description = "Production environment",
        });
    
        var main = new Scaleway.Keymanager.Key("main", new()
        {
            Name = "example-key",
            Region = "fr-par",
            Usage = "symmetric_encryption",
            Algorithm = "aes_256_gcm",
            Description = "Example key for binding",
            Unprotected = true,
        });
    
        var mainBinding = new Scaleway.Annotations.Binding("main", new()
        {
            Srn = main.Srn,
            ValueId = production.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.annotations.Value;
    import com.pulumi.scaleway.annotations.ValueArgs;
    import com.pulumi.scaleway.annotations.Binding;
    import com.pulumi.scaleway.annotations.BindingArgs;
    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 environment = new com.pulumi.scaleway.annotations.Key("environment", com.pulumi.scaleway.annotations.KeyArgs.builder()
                .name("environment")
                .description("Deployment environment (production, staging, development)")
                .build());
    
            var production = new Value("production", ValueArgs.builder()
                .keyId(environment.id())
                .name("production")
                .description("Production environment")
                .build());
    
            var main = new com.pulumi.scaleway.keymanager.Key("main", com.pulumi.scaleway.keymanager.KeyArgs.builder()
                .name("example-key")
                .region("fr-par")
                .usage("symmetric_encryption")
                .algorithm("aes_256_gcm")
                .description("Example key for binding")
                .unprotected(true)
                .build());
    
            var mainBinding = new Binding("mainBinding", BindingArgs.builder()
                .srn(main.srn())
                .valueId(production.id())
                .build());
    
        }
    }
    
    resources:
      environment:
        type: scaleway:annotations:Key
        properties:
          name: environment
          description: Deployment environment (production, staging, development)
      production:
        type: scaleway:annotations:Value
        properties:
          keyId: ${environment.id}
          name: production
          description: Production environment
      main:
        type: scaleway:keymanager:Key
        properties:
          name: example-key
          region: fr-par
          usage: symmetric_encryption
          algorithm: aes_256_gcm
          description: Example key for binding
          unprotected: true
      mainBinding:
        type: scaleway:annotations:Binding
        name: main
        properties:
          srn: ${main.srn}
          valueId: ${production.id}
    
    Example coming soon!
    

    Create Binding Resource

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

    Constructor syntax

    new Binding(name: string, args: BindingArgs, opts?: CustomResourceOptions);
    @overload
    def Binding(resource_name: str,
                args: BindingArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Binding(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                srn: Optional[str] = None,
                value_id: Optional[str] = None)
    func NewBinding(ctx *Context, name string, args BindingArgs, opts ...ResourceOption) (*Binding, error)
    public Binding(string name, BindingArgs args, CustomResourceOptions? opts = null)
    public Binding(String name, BindingArgs args)
    public Binding(String name, BindingArgs args, CustomResourceOptions options)
    
    type: scaleway:annotations:Binding
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "scaleway_annotations_binding" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args BindingArgs
    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 BindingArgs
    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 BindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BindingArgs
    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 bindingResource = new Scaleway.Annotations.Binding("bindingResource", new()
    {
        Srn = "string",
        ValueId = "string",
    });
    
    example, err := annotations.NewBinding(ctx, "bindingResource", &annotations.BindingArgs{
    	Srn:     pulumi.String("string"),
    	ValueId: pulumi.String("string"),
    })
    
    resource "scaleway_annotations_binding" "bindingResource" {
      lifecycle {
        create_before_destroy = true
      }
      srn      = "string"
      value_id = "string"
    }
    
    var bindingResource = new Binding("bindingResource", BindingArgs.builder()
        .srn("string")
        .valueId("string")
        .build());
    
    binding_resource = scaleway.annotations.Binding("bindingResource",
        srn="string",
        value_id="string")
    
    const bindingResource = new scaleway.annotations.Binding("bindingResource", {
        srn: "string",
        valueId: "string",
    });
    
    type: scaleway:annotations:Binding
    properties:
        srn: string
        valueId: string
    

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

    Srn string
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    ValueId string
    ID of the value to associate. Changing this forces a new resource to be created.
    Srn string
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    ValueId string
    ID of the value to associate. Changing this forces a new resource to be created.
    srn string
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    value_id string
    ID of the value to associate. Changing this forces a new resource to be created.
    srn String
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    valueId String
    ID of the value to associate. Changing this forces a new resource to be created.
    srn string
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    valueId string
    ID of the value to associate. Changing this forces a new resource to be created.
    srn str
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    value_id str
    ID of the value to associate. Changing this forces a new resource to be created.
    srn String
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    valueId String
    ID of the value to associate. Changing this forces a new resource to be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    KeyId string
    ID of the key associated to the binding.
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyId string
    ID of the key associated to the binding.
    id string
    The provider-assigned unique ID for this managed resource.
    key_id string
    ID of the key associated to the binding.
    id String
    The provider-assigned unique ID for this managed resource.
    keyId String
    ID of the key associated to the binding.
    id string
    The provider-assigned unique ID for this managed resource.
    keyId string
    ID of the key associated to the binding.
    id str
    The provider-assigned unique ID for this managed resource.
    key_id str
    ID of the key associated to the binding.
    id String
    The provider-assigned unique ID for this managed resource.
    keyId String
    ID of the key associated to the binding.

    Look up Existing Binding Resource

    Get an existing Binding 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?: BindingState, opts?: CustomResourceOptions): Binding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            key_id: Optional[str] = None,
            srn: Optional[str] = None,
            value_id: Optional[str] = None) -> Binding
    func GetBinding(ctx *Context, name string, id IDInput, state *BindingState, opts ...ResourceOption) (*Binding, error)
    public static Binding Get(string name, Input<string> id, BindingState? state, CustomResourceOptions? opts = null)
    public static Binding get(String name, Output<String> id, BindingState state, CustomResourceOptions options)
    resources:  _:    type: scaleway:annotations:Binding    get:      id: ${id}
    import {
      to = scaleway_annotations_binding.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:
    KeyId string
    ID of the key associated to the binding.
    Srn string
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    ValueId string
    ID of the value to associate. Changing this forces a new resource to be created.
    KeyId string
    ID of the key associated to the binding.
    Srn string
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    ValueId string
    ID of the value to associate. Changing this forces a new resource to be created.
    key_id string
    ID of the key associated to the binding.
    srn string
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    value_id string
    ID of the value to associate. Changing this forces a new resource to be created.
    keyId String
    ID of the key associated to the binding.
    srn String
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    valueId String
    ID of the value to associate. Changing this forces a new resource to be created.
    keyId string
    ID of the key associated to the binding.
    srn string
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    valueId string
    ID of the value to associate. Changing this forces a new resource to be created.
    key_id str
    ID of the key associated to the binding.
    srn str
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    value_id str
    ID of the value to associate. Changing this forces a new resource to be created.
    keyId String
    ID of the key associated to the binding.
    srn String
    Scaleway Resource Number to associate. Changing this forces a new resource to be created.
    valueId String
    ID of the value to associate. Changing this forces a new resource to be created.

    Import

    Annotation bindings can be imported using their id:

    $ pulumi import scaleway:annotations/binding:Binding main <binding_id>
    

    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.54.0
    published on Friday, Jul 31, 2026 by pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial