published on Saturday, Oct 24, 2026 by pulumiverse
published on Saturday, Oct 24, 2026 by pulumiverse
The scaleway.keymanager.Key resource allows you to create and manage cryptographic keys in Scaleway Key Manager (KMS).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create an asymmetric encryption key with RSA-4096.
const rsa4096 = new scaleway.keymanager.Key("rsa_4096", {
name: "rsa-4096-key",
region: "fr-par",
usage: "asymmetric_encryption",
algorithm: "rsa_oaep_4096_sha256",
description: "Key for encrypting large files with RSA-4096",
unprotected: true,
});
import pulumi
import pulumiverse_scaleway as scaleway
# Create an asymmetric encryption key with RSA-4096.
rsa4096 = scaleway.keymanager.Key("rsa_4096",
name="rsa-4096-key",
region="fr-par",
usage="asymmetric_encryption",
algorithm="rsa_oaep_4096_sha256",
description="Key for encrypting large files with RSA-4096",
unprotected=True)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/keymanager"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create an asymmetric encryption key with RSA-4096.
_, err := keymanager.NewKey(ctx, "rsa_4096", &keymanager.KeyArgs{
Name: pulumi.String("rsa-4096-key"),
Region: pulumi.String("fr-par"),
Usage: pulumi.String("asymmetric_encryption"),
Algorithm: pulumi.String("rsa_oaep_4096_sha256"),
Description: pulumi.String("Key for encrypting large files with RSA-4096"),
Unprotected: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
// Create an asymmetric encryption key with RSA-4096.
var rsa4096 = new Scaleway.Keymanager.Key("rsa_4096", new()
{
Name = "rsa-4096-key",
Region = "fr-par",
Usage = "asymmetric_encryption",
Algorithm = "rsa_oaep_4096_sha256",
Description = "Key for encrypting large files with RSA-4096",
Unprotected = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.keymanager.Key;
import com.pulumi.scaleway.keymanager.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) {
// Create an asymmetric encryption key with RSA-4096.
var rsa4096 = new Key("rsa4096", KeyArgs.builder()
.name("rsa-4096-key")
.region("fr-par")
.usage("asymmetric_encryption")
.algorithm("rsa_oaep_4096_sha256")
.description("Key for encrypting large files with RSA-4096")
.unprotected(true)
.build());
}
}
resources:
# Create an asymmetric encryption key with RSA-4096.
rsa4096:
type: scaleway:keymanager:Key
name: rsa_4096
properties:
name: rsa-4096-key
region: fr-par
usage: asymmetric_encryption
algorithm: rsa_oaep_4096_sha256
description: Key for encrypting large files with RSA-4096
unprotected: true
pulumi {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
# Create an asymmetric encryption key with RSA-4096.
resource "scaleway_keymanager_key" "rsa_4096" {
name = "rsa-4096-key"
region = "fr-par"
usage = "asymmetric_encryption"
algorithm = "rsa_oaep_4096_sha256"
description = "Key for encrypting large files with RSA-4096"
unprotected = true
}
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create an asymmetric signing key.
const signing = new scaleway.keymanager.Key("signing", {
name: "signing-key",
region: "fr-par",
usage: "asymmetric_signing",
algorithm: "rsa_pss_2048_sha256",
description: "Key for signing documents",
unprotected: true,
});
import pulumi
import pulumiverse_scaleway as scaleway
# Create an asymmetric signing key.
signing = scaleway.keymanager.Key("signing",
name="signing-key",
region="fr-par",
usage="asymmetric_signing",
algorithm="rsa_pss_2048_sha256",
description="Key for signing documents",
unprotected=True)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/keymanager"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create an asymmetric signing key.
_, err := keymanager.NewKey(ctx, "signing", &keymanager.KeyArgs{
Name: pulumi.String("signing-key"),
Region: pulumi.String("fr-par"),
Usage: pulumi.String("asymmetric_signing"),
Algorithm: pulumi.String("rsa_pss_2048_sha256"),
Description: pulumi.String("Key for signing documents"),
Unprotected: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
// Create an asymmetric signing key.
var signing = new Scaleway.Keymanager.Key("signing", new()
{
Name = "signing-key",
Region = "fr-par",
Usage = "asymmetric_signing",
Algorithm = "rsa_pss_2048_sha256",
Description = "Key for signing documents",
Unprotected = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.keymanager.Key;
import com.pulumi.scaleway.keymanager.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) {
// Create an asymmetric signing key.
var signing = new Key("signing", KeyArgs.builder()
.name("signing-key")
.region("fr-par")
.usage("asymmetric_signing")
.algorithm("rsa_pss_2048_sha256")
.description("Key for signing documents")
.unprotected(true)
.build());
}
}
resources:
# Create an asymmetric signing key.
signing:
type: scaleway:keymanager:Key
properties:
name: signing-key
region: fr-par
usage: asymmetric_signing
algorithm: rsa_pss_2048_sha256
description: Key for signing documents
unprotected: true
pulumi {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
# Create an asymmetric signing key.
resource "scaleway_keymanager_key" "signing" {
name = "signing-key"
region = "fr-par"
usage = "asymmetric_signing"
algorithm = "rsa_pss_2048_sha256"
description = "Key for signing documents"
unprotected = true
}
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create a basic key
const main = new scaleway.keymanager.Key("main", {
name: "my-kms-key",
usage: "symmetric_encryption",
algorithm: "aes_256_gcm",
unprotected: true,
});
import pulumi
import pulumiverse_scaleway as scaleway
# Create a basic key
main = scaleway.keymanager.Key("main",
name="my-kms-key",
usage="symmetric_encryption",
algorithm="aes_256_gcm",
unprotected=True)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/keymanager"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a basic key
_, err := keymanager.NewKey(ctx, "main", &keymanager.KeyArgs{
Name: pulumi.String("my-kms-key"),
Usage: pulumi.String("symmetric_encryption"),
Algorithm: pulumi.String("aes_256_gcm"),
Unprotected: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
// Create a basic key
var main = new Scaleway.Keymanager.Key("main", new()
{
Name = "my-kms-key",
Usage = "symmetric_encryption",
Algorithm = "aes_256_gcm",
Unprotected = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.keymanager.Key;
import com.pulumi.scaleway.keymanager.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) {
// Create a basic key
var main = new Key("main", KeyArgs.builder()
.name("my-kms-key")
.usage("symmetric_encryption")
.algorithm("aes_256_gcm")
.unprotected(true)
.build());
}
}
resources:
# Create a basic key
main:
type: scaleway:keymanager:Key
properties:
name: my-kms-key
usage: symmetric_encryption
algorithm: aes_256_gcm
unprotected: true
pulumi {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
# Create a basic key
resource "scaleway_keymanager_key" "main" {
name = "my-kms-key"
usage = "symmetric_encryption"
algorithm = "aes_256_gcm"
unprotected = true
}
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create a symmetric encryption key with a rotation policy of 30 days.
const symmetric = new scaleway.keymanager.Key("symmetric", {
name: "my-kms-key",
region: "fr-par",
projectId: "your-project-id",
usage: "symmetric_encryption",
algorithm: "aes_256_gcm",
description: "Key for encrypting secrets",
tags: [
"env:prod",
"kms",
],
unprotected: true,
rotationPolicy: {
rotationPeriod: "720h",
},
});
import pulumi
import pulumiverse_scaleway as scaleway
# Create a symmetric encryption key with a rotation policy of 30 days.
symmetric = scaleway.keymanager.Key("symmetric",
name="my-kms-key",
region="fr-par",
project_id="your-project-id",
usage="symmetric_encryption",
algorithm="aes_256_gcm",
description="Key for encrypting secrets",
tags=[
"env:prod",
"kms",
],
unprotected=True,
rotation_policy={
"rotation_period": "720h",
})
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/keymanager"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a symmetric encryption key with a rotation policy of 30 days.
_, err := keymanager.NewKey(ctx, "symmetric", &keymanager.KeyArgs{
Name: pulumi.String("my-kms-key"),
Region: pulumi.String("fr-par"),
ProjectId: pulumi.String("your-project-id"),
Usage: pulumi.String("symmetric_encryption"),
Algorithm: pulumi.String("aes_256_gcm"),
Description: pulumi.String("Key for encrypting secrets"),
Tags: pulumi.StringArray{
pulumi.String("env:prod"),
pulumi.String("kms"),
},
Unprotected: pulumi.Bool(true),
RotationPolicy: &keymanager.KeyRotationPolicyArgs{
RotationPeriod: pulumi.String("720h"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
// Create a symmetric encryption key with a rotation policy of 30 days.
var symmetric = new Scaleway.Keymanager.Key("symmetric", new()
{
Name = "my-kms-key",
Region = "fr-par",
ProjectId = "your-project-id",
Usage = "symmetric_encryption",
Algorithm = "aes_256_gcm",
Description = "Key for encrypting secrets",
Tags = new[]
{
"env:prod",
"kms",
},
Unprotected = true,
RotationPolicy = new Scaleway.Keymanager.Inputs.KeyRotationPolicyArgs
{
RotationPeriod = "720h",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.keymanager.Key;
import com.pulumi.scaleway.keymanager.KeyArgs;
import com.pulumi.scaleway.keymanager.inputs.KeyRotationPolicyArgs;
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) {
// Create a symmetric encryption key with a rotation policy of 30 days.
var symmetric = new Key("symmetric", KeyArgs.builder()
.name("my-kms-key")
.region("fr-par")
.projectId("your-project-id")
.usage("symmetric_encryption")
.algorithm("aes_256_gcm")
.description("Key for encrypting secrets")
.tags(
"env:prod",
"kms")
.unprotected(true)
.rotationPolicy(KeyRotationPolicyArgs.builder()
.rotationPeriod("720h")
.build())
.build());
}
}
resources:
# Create a symmetric encryption key with a rotation policy of 30 days.
symmetric:
type: scaleway:keymanager:Key
properties:
name: my-kms-key
region: fr-par
projectId: your-project-id
usage: symmetric_encryption
algorithm: aes_256_gcm
description: Key for encrypting secrets
tags:
- env:prod
- kms
unprotected: true
rotationPolicy:
rotationPeriod: 720h
pulumi {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
# Create a symmetric encryption key with a rotation policy of 30 days.
resource "scaleway_keymanager_key" "symmetric" {
name = "my-kms-key"
region = "fr-par"
project_id = "your-project-id"
usage = "symmetric_encryption"
algorithm = "aes_256_gcm"
description = "Key for encrypting secrets"
tags = ["env:prod", "kms"]
unprotected = true
rotation_policy = {
rotation_period = "720h"
}
}
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create a key with a dedicated protection level.
// In the example below, the key's cryptographic operations are performed within a dedicated Hardware Security Module (HSM).
const hsm = new scaleway.keymanager.Key("hsm", {
name: "my-kms-key-hsm",
usage: "symmetric_encryption",
algorithm: "aes_256_gcm",
protectionLevel: "hsm",
unprotected: true,
});
import pulumi
import pulumiverse_scaleway as scaleway
# Create a key with a dedicated protection level.
# In the example below, the key's cryptographic operations are performed within a dedicated Hardware Security Module (HSM).
hsm = scaleway.keymanager.Key("hsm",
name="my-kms-key-hsm",
usage="symmetric_encryption",
algorithm="aes_256_gcm",
protection_level="hsm",
unprotected=True)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/keymanager"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a key with a dedicated protection level.
// In the example below, the key's cryptographic operations are performed within a dedicated Hardware Security Module (HSM).
_, err := keymanager.NewKey(ctx, "hsm", &keymanager.KeyArgs{
Name: pulumi.String("my-kms-key-hsm"),
Usage: pulumi.String("symmetric_encryption"),
Algorithm: pulumi.String("aes_256_gcm"),
ProtectionLevel: pulumi.String("hsm"),
Unprotected: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
// Create a key with a dedicated protection level.
// In the example below, the key's cryptographic operations are performed within a dedicated Hardware Security Module (HSM).
var hsm = new Scaleway.Keymanager.Key("hsm", new()
{
Name = "my-kms-key-hsm",
Usage = "symmetric_encryption",
Algorithm = "aes_256_gcm",
ProtectionLevel = "hsm",
Unprotected = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.keymanager.Key;
import com.pulumi.scaleway.keymanager.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) {
// Create a key with a dedicated protection level.
// In the example below, the key's cryptographic operations are performed within a dedicated Hardware Security Module (HSM).
var hsm = new Key("hsm", KeyArgs.builder()
.name("my-kms-key-hsm")
.usage("symmetric_encryption")
.algorithm("aes_256_gcm")
.protectionLevel("hsm")
.unprotected(true)
.build());
}
}
resources:
# Create a key with a dedicated protection level.
# In the example below, the key's cryptographic operations are performed within a dedicated Hardware Security Module (HSM).
hsm:
type: scaleway:keymanager:Key
properties:
name: my-kms-key-hsm
usage: symmetric_encryption
algorithm: aes_256_gcm
protectionLevel: hsm
unprotected: true
pulumi {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
# Create a key with a dedicated protection level.
# In the example below, the key's cryptographic operations are performed within a dedicated Hardware Security Module (HSM).
resource "scaleway_keymanager_key" "hsm" {
name = "my-kms-key-hsm"
usage = "symmetric_encryption"
algorithm = "aes_256_gcm"
protection_level = "hsm"
unprotected = true
}
Notes
- Protection: By default, keys are protected and cannot be deleted. To allow deletion, set
unprotected = truewhen creating the key. - Rotation Policy: The
rotationPolicyblock allows you to set automatic rotation for your key. IfnextRotationAtis not set, the Key Manager API schedules the next rotation atrotationPeriodfrom the key’s creation, and reschedules it after each rotation. If you setnextRotationAtexplicitly, it must be in the future (the API rejects past dates). Once the scheduled rotation occurs, the API computes a newnextRotationAt, so the configured value becomes stale: update or remove it from the configuration (or useignoreChanges) to avoid a permanent diff. - Origin: The
originargument is optional and defaults toscalewayKms. Useexternalif you want to import an external key (see Scaleway documentation for details). - Project and Region: If not specified,
projectIdandregionwill default to the provider configuration. - Algorithm Validation: The provider checks at plan time that the specified
algorithmis one of the algorithms known to the Key Manager API and is compatible with theusagetype (a warning is emitted for unrecognized values).
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: KeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Key(resource_name: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[str] = None,
usage: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
origin: Optional[str] = None,
project_id: Optional[str] = None,
protection_level: Optional[str] = None,
region: Optional[str] = None,
rotation_policy: Optional[KeyRotationPolicyArgs] = None,
tags: Optional[Sequence[str]] = None,
unprotected: Optional[bool] = None)func NewKey(ctx *Context, name string, args KeyArgs, opts ...ResourceOption) (*Key, error)public Key(string name, KeyArgs args, CustomResourceOptions? opts = null)type: scaleway:keymanager:Key
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "scaleway_keymanager_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 scalewayKeyResource = new Scaleway.Keymanager.Key("scalewayKeyResource", new()
{
Algorithm = "string",
Usage = "string",
Description = "string",
Name = "string",
Origin = "string",
ProjectId = "string",
ProtectionLevel = "string",
Region = "string",
RotationPolicy = new Scaleway.Keymanager.Inputs.KeyRotationPolicyArgs
{
RotationPeriod = "string",
NextRotationAt = "string",
},
Tags = new[]
{
"string",
},
Unprotected = false,
});
example, err := keymanager.NewKey(ctx, "scalewayKeyResource", &keymanager.KeyArgs{
Algorithm: pulumi.String("string"),
Usage: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Origin: pulumi.String("string"),
ProjectId: pulumi.String("string"),
ProtectionLevel: pulumi.String("string"),
Region: pulumi.String("string"),
RotationPolicy: &keymanager.KeyRotationPolicyArgs{
RotationPeriod: pulumi.String("string"),
NextRotationAt: pulumi.String("string"),
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Unprotected: pulumi.Bool(false),
})
resource "scaleway_keymanager_key" "scalewayKeyResource" {
lifecycle {
create_before_destroy = true
}
algorithm = "string"
usage = "string"
description = "string"
name = "string"
origin = "string"
project_id = "string"
protection_level = "string"
region = "string"
rotation_policy = {
rotation_period = "string"
next_rotation_at = "string"
}
tags = ["string"]
unprotected = false
}
var scalewayKeyResource = new com.pulumi.scaleway.keymanager.Key("scalewayKeyResource", com.pulumi.scaleway.keymanager.KeyArgs.builder()
.algorithm("string")
.usage("string")
.description("string")
.name("string")
.origin("string")
.projectId("string")
.protectionLevel("string")
.region("string")
.rotationPolicy(KeyRotationPolicyArgs.builder()
.rotationPeriod("string")
.nextRotationAt("string")
.build())
.tags("string")
.unprotected(false)
.build());
scaleway_key_resource = scaleway.keymanager.Key("scalewayKeyResource",
algorithm="string",
usage="string",
description="string",
name="string",
origin="string",
project_id="string",
protection_level="string",
region="string",
rotation_policy={
"rotation_period": "string",
"next_rotation_at": "string",
},
tags=["string"],
unprotected=False)
const scalewayKeyResource = new scaleway.keymanager.Key("scalewayKeyResource", {
algorithm: "string",
usage: "string",
description: "string",
name: "string",
origin: "string",
projectId: "string",
protectionLevel: "string",
region: "string",
rotationPolicy: {
rotationPeriod: "string",
nextRotationAt: "string",
},
tags: ["string"],
unprotected: false,
});
type: scaleway:keymanager:Key
properties:
algorithm: string
description: string
name: string
origin: string
projectId: string
protectionLevel: string
region: string
rotationPolicy:
nextRotationAt: string
rotationPeriod: string
tags:
- string
unprotected: false
usage: 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:
- Algorithm string
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- Usage string
- – The usage type of the key. Valid values:
- Description string
- – A description for the key.
- Name string
- The name of the key.
- Origin string
- – The origin of the key. Valid values are:
- Project
Id string – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- Protection
Level string - – The protection level of the key. Valid values are:
- Region string
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - Rotation
Policy Pulumiverse.Scaleway. Keymanager. Inputs. Key Rotation Policy - – Rotation policy for the key:
- List<string>
- – A list of tags to assign to the key.
- Unprotected bool
- – If
true, the key can be deleted. Defaults tofalse(protected).
- Algorithm string
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- Usage string
- – The usage type of the key. Valid values:
- Description string
- – A description for the key.
- Name string
- The name of the key.
- Origin string
- – The origin of the key. Valid values are:
- Project
Id string – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- Protection
Level string - – The protection level of the key. Valid values are:
- Region string
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - Rotation
Policy KeyRotation Policy Args - – Rotation policy for the key:
- []string
- – A list of tags to assign to the key.
- Unprotected bool
- – If
true, the key can be deleted. Defaults tofalse(protected).
- algorithm string
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- usage string
- – The usage type of the key. Valid values:
- description string
- – A description for the key.
- name string
- The name of the key.
- origin string
- – The origin of the key. Valid values are:
- project_
id string – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protection_
level string - – The protection level of the key. Valid values are:
- region string
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotation_
policy object - – Rotation policy for the key:
- list(string)
- – A list of tags to assign to the key.
- unprotected bool
- – If
true, the key can be deleted. Defaults tofalse(protected).
- algorithm String
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- usage String
- – The usage type of the key. Valid values:
- description String
- – A description for the key.
- name String
- The name of the key.
- origin String
- – The origin of the key. Valid values are:
- project
Id String – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protection
Level String - – The protection level of the key. Valid values are:
- region String
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotation
Policy KeyRotation Policy - – Rotation policy for the key:
- List<String>
- – A list of tags to assign to the key.
- unprotected Boolean
- – If
true, the key can be deleted. Defaults tofalse(protected).
- algorithm string
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- usage string
- – The usage type of the key. Valid values:
- description string
- – A description for the key.
- name string
- The name of the key.
- origin string
- – The origin of the key. Valid values are:
- project
Id string – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protection
Level string - – The protection level of the key. Valid values are:
- region string
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotation
Policy KeyRotation Policy - – Rotation policy for the key:
- string[]
- – A list of tags to assign to the key.
- unprotected boolean
- – If
true, the key can be deleted. Defaults tofalse(protected).
- algorithm str
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- usage str
- – The usage type of the key. Valid values:
- description str
- – A description for the key.
- name str
- The name of the key.
- origin str
- – The origin of the key. Valid values are:
- project_
id str – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protection_
level str - – The protection level of the key. Valid values are:
- region str
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotation_
policy KeyRotation Policy Args - – Rotation policy for the key:
- Sequence[str]
- – A list of tags to assign to the key.
- unprotected bool
- – If
true, the key can be deleted. Defaults tofalse(protected).
- algorithm String
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- usage String
- – The usage type of the key. Valid values:
- description String
- – A description for the key.
- name String
- The name of the key.
- origin String
- – The origin of the key. Valid values are:
- project
Id String – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protection
Level String - – The protection level of the key. Valid values are:
- region String
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotation
Policy Property Map - – Rotation policy for the key:
- List<String>
- – A list of tags to assign to the key.
- unprotected Boolean
- – If
true, the key can be deleted. Defaults tofalse(protected).
Outputs
All input properties are implicitly available as output properties. Additionally, the Key resource produces the following output properties:
- Created
At string - The date and time when the key was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Locked bool
- Whether the key is locked.
- Protected bool
- Whether the key is protected from deletion.
- Rotated
At string - The date and time when the key was last rotated.
- Rotation
Count int - The number of times the key has been rotated.
- Srn string
- The Scaleway Resource Name (SRN) of the key.
- State string
- The state of the key (e.g.,
enabled). - Updated
At string - The date and time when the key was last updated.
- Created
At string - The date and time when the key was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Locked bool
- Whether the key is locked.
- Protected bool
- Whether the key is protected from deletion.
- Rotated
At string - The date and time when the key was last rotated.
- Rotation
Count int - The number of times the key has been rotated.
- Srn string
- The Scaleway Resource Name (SRN) of the key.
- State string
- The state of the key (e.g.,
enabled). - Updated
At string - The date and time when the key was last updated.
- created_
at string - The date and time when the key was created.
- id string
- The provider-assigned unique ID for this managed resource.
- locked bool
- Whether the key is locked.
- protected bool
- Whether the key is protected from deletion.
- rotated_
at string - The date and time when the key was last rotated.
- rotation_
count number - The number of times the key has been rotated.
- srn string
- The Scaleway Resource Name (SRN) of the key.
- state string
- The state of the key (e.g.,
enabled). - updated_
at string - The date and time when the key was last updated.
- created
At String - The date and time when the key was created.
- id String
- The provider-assigned unique ID for this managed resource.
- locked Boolean
- Whether the key is locked.
- protected_ Boolean
- Whether the key is protected from deletion.
- rotated
At String - The date and time when the key was last rotated.
- rotation
Count Integer - The number of times the key has been rotated.
- srn String
- The Scaleway Resource Name (SRN) of the key.
- state String
- The state of the key (e.g.,
enabled). - updated
At String - The date and time when the key was last updated.
- created
At string - The date and time when the key was created.
- id string
- The provider-assigned unique ID for this managed resource.
- locked boolean
- Whether the key is locked.
- protected boolean
- Whether the key is protected from deletion.
- rotated
At string - The date and time when the key was last rotated.
- rotation
Count number - The number of times the key has been rotated.
- srn string
- The Scaleway Resource Name (SRN) of the key.
- state string
- The state of the key (e.g.,
enabled). - updated
At string - The date and time when the key was last updated.
- created_
at str - The date and time when the key was created.
- id str
- The provider-assigned unique ID for this managed resource.
- locked bool
- Whether the key is locked.
- protected bool
- Whether the key is protected from deletion.
- rotated_
at str - The date and time when the key was last rotated.
- rotation_
count int - The number of times the key has been rotated.
- srn str
- The Scaleway Resource Name (SRN) of the key.
- state str
- The state of the key (e.g.,
enabled). - updated_
at str - The date and time when the key was last updated.
- created
At String - The date and time when the key was created.
- id String
- The provider-assigned unique ID for this managed resource.
- locked Boolean
- Whether the key is locked.
- protected Boolean
- Whether the key is protected from deletion.
- rotated
At String - The date and time when the key was last rotated.
- rotation
Count Number - The number of times the key has been rotated.
- srn String
- The Scaleway Resource Name (SRN) of the key.
- state String
- The state of the key (e.g.,
enabled). - updated
At String - The date and time when the key was last updated.
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,
algorithm: Optional[str] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
locked: Optional[bool] = None,
name: Optional[str] = None,
origin: Optional[str] = None,
project_id: Optional[str] = None,
protected: Optional[bool] = None,
protection_level: Optional[str] = None,
region: Optional[str] = None,
rotated_at: Optional[str] = None,
rotation_count: Optional[int] = None,
rotation_policy: Optional[KeyRotationPolicyArgs] = None,
srn: Optional[str] = None,
state: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
unprotected: Optional[bool] = None,
updated_at: Optional[str] = None,
usage: Optional[str] = None) -> Keyfunc 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:keymanager:Key get: id: ${id}import {
to = scaleway_keymanager_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.
- Algorithm string
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- Created
At string - The date and time when the key was created.
- Description string
- – A description for the key.
- Locked bool
- Whether the key is locked.
- Name string
- The name of the key.
- Origin string
- – The origin of the key. Valid values are:
- Project
Id string – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- Protected bool
- Whether the key is protected from deletion.
- Protection
Level string - – The protection level of the key. Valid values are:
- Region string
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - Rotated
At string - The date and time when the key was last rotated.
- Rotation
Count int - The number of times the key has been rotated.
- Rotation
Policy Pulumiverse.Scaleway. Keymanager. Inputs. Key Rotation Policy - – Rotation policy for the key:
- Srn string
- The Scaleway Resource Name (SRN) of the key.
- State string
- The state of the key (e.g.,
enabled). - List<string>
- – A list of tags to assign to the key.
- Unprotected bool
- – If
true, the key can be deleted. Defaults tofalse(protected). - Updated
At string - The date and time when the key was last updated.
- Usage string
- – The usage type of the key. Valid values:
- Algorithm string
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- Created
At string - The date and time when the key was created.
- Description string
- – A description for the key.
- Locked bool
- Whether the key is locked.
- Name string
- The name of the key.
- Origin string
- – The origin of the key. Valid values are:
- Project
Id string – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- Protected bool
- Whether the key is protected from deletion.
- Protection
Level string - – The protection level of the key. Valid values are:
- Region string
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - Rotated
At string - The date and time when the key was last rotated.
- Rotation
Count int - The number of times the key has been rotated.
- Rotation
Policy KeyRotation Policy Args - – Rotation policy for the key:
- Srn string
- The Scaleway Resource Name (SRN) of the key.
- State string
- The state of the key (e.g.,
enabled). - []string
- – A list of tags to assign to the key.
- Unprotected bool
- – If
true, the key can be deleted. Defaults tofalse(protected). - Updated
At string - The date and time when the key was last updated.
- Usage string
- – The usage type of the key. Valid values:
- algorithm string
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- created_
at string - The date and time when the key was created.
- description string
- – A description for the key.
- locked bool
- Whether the key is locked.
- name string
- The name of the key.
- origin string
- – The origin of the key. Valid values are:
- project_
id string – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protected bool
- Whether the key is protected from deletion.
- protection_
level string - – The protection level of the key. Valid values are:
- region string
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotated_
at string - The date and time when the key was last rotated.
- rotation_
count number - The number of times the key has been rotated.
- rotation_
policy object - – Rotation policy for the key:
- srn string
- The Scaleway Resource Name (SRN) of the key.
- state string
- The state of the key (e.g.,
enabled). - list(string)
- – A list of tags to assign to the key.
- unprotected bool
- – If
true, the key can be deleted. Defaults tofalse(protected). - updated_
at string - The date and time when the key was last updated.
- usage string
- – The usage type of the key. Valid values:
- algorithm String
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- created
At String - The date and time when the key was created.
- description String
- – A description for the key.
- locked Boolean
- Whether the key is locked.
- name String
- The name of the key.
- origin String
- – The origin of the key. Valid values are:
- project
Id String – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protected_ Boolean
- Whether the key is protected from deletion.
- protection
Level String - – The protection level of the key. Valid values are:
- region String
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotated
At String - The date and time when the key was last rotated.
- rotation
Count Integer - The number of times the key has been rotated.
- rotation
Policy KeyRotation Policy - – Rotation policy for the key:
- srn String
- The Scaleway Resource Name (SRN) of the key.
- state String
- The state of the key (e.g.,
enabled). - List<String>
- – A list of tags to assign to the key.
- unprotected Boolean
- – If
true, the key can be deleted. Defaults tofalse(protected). - updated
At String - The date and time when the key was last updated.
- usage String
- – The usage type of the key. Valid values:
- algorithm string
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- created
At string - The date and time when the key was created.
- description string
- – A description for the key.
- locked boolean
- Whether the key is locked.
- name string
- The name of the key.
- origin string
- – The origin of the key. Valid values are:
- project
Id string – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protected boolean
- Whether the key is protected from deletion.
- protection
Level string - – The protection level of the key. Valid values are:
- region string
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotated
At string - The date and time when the key was last rotated.
- rotation
Count number - The number of times the key has been rotated.
- rotation
Policy KeyRotation Policy - – Rotation policy for the key:
- srn string
- The Scaleway Resource Name (SRN) of the key.
- state string
- The state of the key (e.g.,
enabled). - string[]
- – A list of tags to assign to the key.
- unprotected boolean
- – If
true, the key can be deleted. Defaults tofalse(protected). - updated
At string - The date and time when the key was last updated.
- usage string
- – The usage type of the key. Valid values:
- algorithm str
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- created_
at str - The date and time when the key was created.
- description str
- – A description for the key.
- locked bool
- Whether the key is locked.
- name str
- The name of the key.
- origin str
- – The origin of the key. Valid values are:
- project_
id str – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protected bool
- Whether the key is protected from deletion.
- protection_
level str - – The protection level of the key. Valid values are:
- region str
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotated_
at str - The date and time when the key was last rotated.
- rotation_
count int - The number of times the key has been rotated.
- rotation_
policy KeyRotation Policy Args - – Rotation policy for the key:
- srn str
- The Scaleway Resource Name (SRN) of the key.
- state str
- The state of the key (e.g.,
enabled). - Sequence[str]
- – A list of tags to assign to the key.
- unprotected bool
- – If
true, the key can be deleted. Defaults tofalse(protected). - updated_
at str - The date and time when the key was last updated.
- usage str
- – The usage type of the key. Valid values:
- algorithm String
- – The cryptographic algorithm to use. The valid algorithms depend on the
usagetype; see the Key Manager cryptographic details for the full list. Valid values:- For
symmetricEncryption:
- For
- created
At String - The date and time when the key was created.
- description String
- – A description for the key.
- locked Boolean
- Whether the key is locked.
- name String
- The name of the key.
- origin String
- – The origin of the key. Valid values are:
- project
Id String – The ID of the project the key belongs to.
Key Usage and Algorithm (both required):
- protected Boolean
- Whether the key is protected from deletion.
- protection
Level String - – The protection level of the key. Valid values are:
- region String
- – The region in which to create the key (e.g.,
fr-par). If not specified, defaults to the provider configuration. - rotated
At String - The date and time when the key was last rotated.
- rotation
Count Number - The number of times the key has been rotated.
- rotation
Policy Property Map - – Rotation policy for the key:
- srn String
- The Scaleway Resource Name (SRN) of the key.
- state String
- The state of the key (e.g.,
enabled). - List<String>
- – A list of tags to assign to the key.
- unprotected Boolean
- – If
true, the key can be deleted. Defaults tofalse(protected). - updated
At String - The date and time when the key was last updated.
- usage String
- – The usage type of the key. Valid values:
Supporting Types
KeyRotationPolicy, KeyRotationPolicyArgs
- Rotation
Period string - – The period between key rotations (e.g.,
"720h"for 30 days). - Next
Rotation stringAt - – The date and time of the next scheduled rotation, in RFC 3339 format. If not set, it is computed by the Key Manager API from
rotationPeriod.
- Rotation
Period string - – The period between key rotations (e.g.,
"720h"for 30 days). - Next
Rotation stringAt - – The date and time of the next scheduled rotation, in RFC 3339 format. If not set, it is computed by the Key Manager API from
rotationPeriod.
- rotation_
period string - – The period between key rotations (e.g.,
"720h"for 30 days). - next_
rotation_ stringat - – The date and time of the next scheduled rotation, in RFC 3339 format. If not set, it is computed by the Key Manager API from
rotationPeriod.
- rotation
Period String - – The period between key rotations (e.g.,
"720h"for 30 days). - next
Rotation StringAt - – The date and time of the next scheduled rotation, in RFC 3339 format. If not set, it is computed by the Key Manager API from
rotationPeriod.
- rotation
Period string - – The period between key rotations (e.g.,
"720h"for 30 days). - next
Rotation stringAt - – The date and time of the next scheduled rotation, in RFC 3339 format. If not set, it is computed by the Key Manager API from
rotationPeriod.
- rotation_
period str - – The period between key rotations (e.g.,
"720h"for 30 days). - next_
rotation_ strat - – The date and time of the next scheduled rotation, in RFC 3339 format. If not set, it is computed by the Key Manager API from
rotationPeriod.
- rotation
Period String - – The period between key rotations (e.g.,
"720h"for 30 days). - next
Rotation StringAt - – The date and time of the next scheduled rotation, in RFC 3339 format. If not set, it is computed by the Key Manager API from
rotationPeriod.
Import
You can import a key using its ID and region:
$ pulumi import scaleway:keymanager/key:Key main fr-par/11111111-2222-3333-4444-555555555555
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
scalewayTerraform Provider.
published on Saturday, Oct 24, 2026 by pulumiverse