1. Registry
  2. Packages
  3. Scaleway
  4. API Docs
  5. annotations
  6. getBinding
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

    Use this data source to retrieve information about an annotation binding.

    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 mainKey = 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: mainKey.srn,
        valueId: production.id,
    });
    const main = scaleway.annotations.getBindingOutput({
        bindingId: mainBinding.id,
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    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_key = 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_key.srn,
        value_id=production.id)
    main = scaleway.annotations.get_binding_output(binding_id=main_binding.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
    		}
    		mainKey, 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
    		}
    		mainBinding, err := annotations.NewBinding(ctx, "main", &annotations.BindingArgs{
    			Srn:     mainKey.Srn,
    			ValueId: production.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_ = annotations.LookupBindingOutput(ctx, annotations.GetBindingOutputArgs{
    			BindingId: mainBinding.ID(),
    		}, nil)
    		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 mainKey = 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 = mainKey.Srn,
            ValueId = production.Id,
        });
    
        var main = Scaleway.Annotations.GetBinding.Invoke(new()
        {
            BindingId = mainBinding.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 com.pulumi.scaleway.annotations.AnnotationsFunctions;
    import com.pulumi.scaleway.annotations.inputs.GetBindingArgs;
    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 mainKey = new com.pulumi.scaleway.keymanager.Key("mainKey", 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(mainKey.srn())
                .valueId(production.id())
                .build());
    
            final var main = AnnotationsFunctions.getBinding(GetBindingArgs.builder()
                .bindingId(mainBinding.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
      mainKey:
        type: scaleway:keymanager:Key
        name: main
        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: ${mainKey.srn}
          valueId: ${production.id}
    variables:
      main:
        fn::invoke:
          function: scaleway:annotations:getBinding
          arguments:
            bindingId: ${mainBinding.id}
    
    Example coming soon!
    

    Using getBinding

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

    function getBinding(args: GetBindingArgs, opts?: InvokeOptions): Promise<GetBindingResult>
    function getBindingOutput(args: GetBindingOutputArgs, opts?: InvokeOutputOptions): Output<GetBindingResult>
    def get_binding(binding_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetBindingResult
    def get_binding_output(binding_id: pulumi.Input[Optional[str]] = None,
                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetBindingResult]
    func LookupBinding(ctx *Context, args *LookupBindingArgs, opts ...InvokeOption) (*LookupBindingResult, error)
    func LookupBindingOutput(ctx *Context, args *LookupBindingOutputArgs, opts ...InvokeOption) LookupBindingResultOutput

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

    public static class GetBinding 
    {
        public static Task<GetBindingResult> InvokeAsync(GetBindingArgs args, InvokeOptions? opts = null)
        public static Output<GetBindingResult> Invoke(GetBindingInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetBindingResult> Invoke(GetBindingInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetBindingResult> getBinding(GetBindingArgs args, InvokeOptions options)
    public static Output<GetBindingResult> getBinding(GetBindingArgs args, InvokeOptions options)
    public static Output<GetBindingResult> getBinding(GetBindingArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: scaleway:annotations/getBinding:getBinding
      arguments:
        # arguments dictionary
    data "scaleway_annotations_get_binding" "name" {
        # arguments
    }

    The following arguments are supported:

    BindingId string
    The ID of the annotation binding to retrieve.
    BindingId string
    The ID of the annotation binding to retrieve.
    binding_id string
    The ID of the annotation binding to retrieve.
    bindingId String
    The ID of the annotation binding to retrieve.
    bindingId string
    The ID of the annotation binding to retrieve.
    binding_id str
    The ID of the annotation binding to retrieve.
    bindingId String
    The ID of the annotation binding to retrieve.

    getBinding Result

    The following output properties are available:

    BindingId string
    Id string
    The ID of the annotation binding
    KeyId string
    ID of the key associated to the binding
    Srn string
    Scaleway Resource Number associated to the binding
    ValueId string
    ID of the value associated to the binding
    BindingId string
    Id string
    The ID of the annotation binding
    KeyId string
    ID of the key associated to the binding
    Srn string
    Scaleway Resource Number associated to the binding
    ValueId string
    ID of the value associated to the binding
    binding_id string
    id string
    The ID of the annotation binding
    key_id string
    ID of the key associated to the binding
    srn string
    Scaleway Resource Number associated to the binding
    value_id string
    ID of the value associated to the binding
    bindingId String
    id String
    The ID of the annotation binding
    keyId String
    ID of the key associated to the binding
    srn String
    Scaleway Resource Number associated to the binding
    valueId String
    ID of the value associated to the binding
    bindingId string
    id string
    The ID of the annotation binding
    keyId string
    ID of the key associated to the binding
    srn string
    Scaleway Resource Number associated to the binding
    valueId string
    ID of the value associated to the binding
    binding_id str
    id str
    The ID of the annotation binding
    key_id str
    ID of the key associated to the binding
    srn str
    Scaleway Resource Number associated to the binding
    value_id str
    ID of the value associated to the binding
    bindingId String
    id String
    The ID of the annotation binding
    keyId String
    ID of the key associated to the binding
    srn String
    Scaleway Resource Number associated to the binding
    valueId String
    ID of the value associated to the binding

    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