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

    Create an annotation key to define custom metadata labels that can be attached to Scaleway resources. Annotation keys allow you to organize and categorize resources using custom tags with meaningful names and descriptions.

    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)",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    environment = scaleway.annotations.Key("environment",
        name="environment",
        description="Deployment environment (production, staging, development)")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/annotations"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := annotations.NewKey(ctx, "environment", &annotations.KeyArgs{
    			Name:        pulumi.String("environment"),
    			Description: pulumi.String("Deployment environment (production, staging, development)"),
    		})
    		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)",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.annotations.Key;
    import com.pulumi.scaleway.annotations.KeyArgs;
    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 Key("environment", KeyArgs.builder()
                .name("environment")
                .description("Deployment environment (production, staging, development)")
                .build());
    
        }
    }
    
    resources:
      environment:
        type: scaleway:annotations:Key
        properties:
          name: environment
          description: Deployment environment (production, staging, development)
    
    Example coming soon!
    

    Create Key Resource

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

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args KeyArgs
    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 KeyArgs
    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 KeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KeyArgs
    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 keyResource = new Scaleway.Annotations.Key("keyResource", new()
    {
        Description = "string",
        Name = "string",
        OrganizationId = "string",
    });
    
    example, err := annotations.NewKey(ctx, "keyResource", &annotations.KeyArgs{
    	Description:    pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	OrganizationId: pulumi.String("string"),
    })
    
    resource "scaleway_annotations_key" "keyResource" {
      lifecycle {
        create_before_destroy = true
      }
      description     = "string"
      name            = "string"
      organization_id = "string"
    }
    
    var keyResource = new com.pulumi.scaleway.annotations.Key("keyResource", com.pulumi.scaleway.annotations.KeyArgs.builder()
        .description("string")
        .name("string")
        .organizationId("string")
        .build());
    
    key_resource = scaleway.annotations.Key("keyResource",
        description="string",
        name="string",
        organization_id="string")
    
    const keyResource = new scaleway.annotations.Key("keyResource", {
        description: "string",
        name: "string",
        organizationId: "string",
    });
    
    type: scaleway:annotations:Key
    properties:
        description: string
        name: string
        organizationId: string
    

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

    Description string
    Description of the annotation key.
    Name string
    Name of the annotation key.
    OrganizationId string
    organizationId) The organization ID to create the key in.
    Description string
    Description of the annotation key.
    Name string
    Name of the annotation key.
    OrganizationId string
    organizationId) The organization ID to create the key in.
    description string
    Description of the annotation key.
    name string
    Name of the annotation key.
    organization_id string
    organizationId) The organization ID to create the key in.
    description String
    Description of the annotation key.
    name String
    Name of the annotation key.
    organizationId String
    organizationId) The organization ID to create the key in.
    description string
    Description of the annotation key.
    name string
    Name of the annotation key.
    organizationId string
    organizationId) The organization ID to create the key in.
    description str
    Description of the annotation key.
    name str
    Name of the annotation key.
    organization_id str
    organizationId) The organization ID to create the key in.
    description String
    Description of the annotation key.
    name String
    Name of the annotation key.
    organizationId String
    organizationId) The organization ID to create the key in.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Key Resource

    Get an existing Key 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?: KeyState, opts?: CustomResourceOptions): Key
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None) -> Key
    func GetKey(ctx *Context, name string, id IDInput, state *KeyState, opts ...ResourceOption) (*Key, error)
    public static Key Get(string name, Input<string> id, KeyState? state, CustomResourceOptions? opts = null)
    public static Key get(String name, Output<String> id, KeyState state, CustomResourceOptions options)
    resources:  _:    type: scaleway:annotations:Key    get:      id: ${id}
    import {
      to = scaleway_annotations_key.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:
    Description string
    Description of the annotation key.
    Name string
    Name of the annotation key.
    OrganizationId string
    organizationId) The organization ID to create the key in.
    Description string
    Description of the annotation key.
    Name string
    Name of the annotation key.
    OrganizationId string
    organizationId) The organization ID to create the key in.
    description string
    Description of the annotation key.
    name string
    Name of the annotation key.
    organization_id string
    organizationId) The organization ID to create the key in.
    description String
    Description of the annotation key.
    name String
    Name of the annotation key.
    organizationId String
    organizationId) The organization ID to create the key in.
    description string
    Description of the annotation key.
    name string
    Name of the annotation key.
    organizationId string
    organizationId) The organization ID to create the key in.
    description str
    Description of the annotation key.
    name str
    Name of the annotation key.
    organization_id str
    organizationId) The organization ID to create the key in.
    description String
    Description of the annotation key.
    name String
    Name of the annotation key.
    organizationId String
    organizationId) The organization ID to create the key in.

    Import

    Annotation keys can be imported using their keyId and optionally the organizationId. If no organizationId is specified, the default provider organizationId will be used.

    $ pulumi import scaleway:annotations/key:Key main <key_id>
    
    $ pulumi import scaleway:annotations/key:Key main <organization_id>/<key_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