Scaleway v1.40.0 published on Friday, Dec 19, 2025 by pulumiverse
Scaleway v1.40.0 published on Friday, Dec 19, 2025 by pulumiverse
Gets information about a Key Manager Key. For more information, refer to the Key Manager API documentation.
Example Usage
Create a key and get its information
The following commands allow you to:
- create a key named
my-kms-key - retrieve the key’s information using the key’s ID
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create a key
const symmetric = new scaleway.KeyManagerKey("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",
},
});
// Get the key information by its ID
const byID = scaleway.getKeyManagerKey({
keyId: "11111111-1111-1111-1111-111111111111",
});
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway
# Create a key
symmetric = scaleway.KeyManagerKey("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",
})
# Get the key information by its ID
by_id = scaleway.get_key_manager_key(key_id="11111111-1111-1111-1111-111111111111")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a key
_, err := scaleway.NewKeyManagerKey(ctx, "symmetric", &scaleway.KeyManagerKeyArgs{
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: &scaleway.KeyManagerKeyRotationPolicyArgs{
RotationPeriod: pulumi.String("720h"),
},
})
if err != nil {
return err
}
// Get the key information by its ID
_, err = scaleway.LookupKeyManagerKey(ctx, &scaleway.LookupKeyManagerKeyArgs{
KeyId: "11111111-1111-1111-1111-111111111111",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
// Create a key
var symmetric = new Scaleway.KeyManagerKey("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.Inputs.KeyManagerKeyRotationPolicyArgs
{
RotationPeriod = "720h",
},
});
// Get the key information by its ID
var byID = Scaleway.GetKeyManagerKey.Invoke(new()
{
KeyId = "11111111-1111-1111-1111-111111111111",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.KeyManagerKey;
import com.pulumi.scaleway.KeyManagerKeyArgs;
import com.pulumi.scaleway.inputs.KeyManagerKeyRotationPolicyArgs;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetKeyManagerKeyArgs;
import java.util.List;
import java.util.ArrayList;
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
var symmetric = new KeyManagerKey("symmetric", KeyManagerKeyArgs.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(KeyManagerKeyRotationPolicyArgs.builder()
.rotationPeriod("720h")
.build())
.build());
// Get the key information by its ID
final var byID = ScalewayFunctions.getKeyManagerKey(GetKeyManagerKeyArgs.builder()
.keyId("11111111-1111-1111-1111-111111111111")
.build());
}
}
resources:
# Create a key
symmetric:
type: scaleway:KeyManagerKey
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
variables:
# Get the key information by its ID
byID:
fn::invoke:
function: scaleway:getKeyManagerKey
arguments:
keyId: 11111111-1111-1111-1111-111111111111
Using getKeyManagerKey
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 getKeyManagerKey(args: GetKeyManagerKeyArgs, opts?: InvokeOptions): Promise<GetKeyManagerKeyResult>
function getKeyManagerKeyOutput(args: GetKeyManagerKeyOutputArgs, opts?: InvokeOptions): Output<GetKeyManagerKeyResult>def get_key_manager_key(key_id: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKeyManagerKeyResult
def get_key_manager_key_output(key_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKeyManagerKeyResult]func LookupKeyManagerKey(ctx *Context, args *LookupKeyManagerKeyArgs, opts ...InvokeOption) (*LookupKeyManagerKeyResult, error)
func LookupKeyManagerKeyOutput(ctx *Context, args *LookupKeyManagerKeyOutputArgs, opts ...InvokeOption) LookupKeyManagerKeyResultOutput> Note: This function is named LookupKeyManagerKey in the Go SDK.
public static class GetKeyManagerKey
{
public static Task<GetKeyManagerKeyResult> InvokeAsync(GetKeyManagerKeyArgs args, InvokeOptions? opts = null)
public static Output<GetKeyManagerKeyResult> Invoke(GetKeyManagerKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetKeyManagerKeyResult> getKeyManagerKey(GetKeyManagerKeyArgs args, InvokeOptions options)
public static Output<GetKeyManagerKeyResult> getKeyManagerKey(GetKeyManagerKeyArgs args, InvokeOptions options)
fn::invoke:
function: scaleway:index/getKeyManagerKey:getKeyManagerKey
arguments:
# arguments dictionaryThe following arguments are supported:
getKeyManagerKey Result
The following output properties are available:
- Algorithm string
- Created
At string - Description string
- Id string
- Key
Id string - Locked bool
- Name string
- Origin string
- Project
Id string - Protected bool
- Rotated
At string - Rotation
Count int - Rotation
Policies List<Pulumiverse.Scaleway. Outputs. Get Key Manager Key Rotation Policy> - State string
- List<string>
- Unprotected bool
- Updated
At string - Usage string
- Region string
- Algorithm string
- Created
At string - Description string
- Id string
- Key
Id string - Locked bool
- Name string
- Origin string
- Project
Id string - Protected bool
- Rotated
At string - Rotation
Count int - Rotation
Policies []GetKey Manager Key Rotation Policy - State string
- []string
- Unprotected bool
- Updated
At string - Usage string
- Region string
- algorithm String
- created
At String - description String
- id String
- key
Id String - locked Boolean
- name String
- origin String
- project
Id String - protected_ Boolean
- rotated
At String - rotation
Count Integer - rotation
Policies List<GetKey Manager Key Rotation Policy> - state String
- List<String>
- unprotected Boolean
- updated
At String - usage String
- region String
- algorithm string
- created
At string - description string
- id string
- key
Id string - locked boolean
- name string
- origin string
- project
Id string - protected boolean
- rotated
At string - rotation
Count number - rotation
Policies GetKey Manager Key Rotation Policy[] - state string
- string[]
- unprotected boolean
- updated
At string - usage string
- region string
- algorithm str
- created_
at str - description str
- id str
- key_
id str - locked bool
- name str
- origin str
- project_
id str - protected bool
- rotated_
at str - rotation_
count int - rotation_
policies Sequence[GetKey Manager Key Rotation Policy] - state str
- Sequence[str]
- unprotected bool
- updated_
at str - usage str
- region str
- algorithm String
- created
At String - description String
- id String
- key
Id String - locked Boolean
- name String
- origin String
- project
Id String - protected Boolean
- rotated
At String - rotation
Count Number - rotation
Policies List<Property Map> - state String
- List<String>
- unprotected Boolean
- updated
At String - usage String
- region String
Supporting Types
GetKeyManagerKeyRotationPolicy
- Next
Rotation stringAt - Timestamp indicating the next scheduled rotation.
- Rotation
Period string - Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
- Next
Rotation stringAt - Timestamp indicating the next scheduled rotation.
- Rotation
Period string - Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
- next
Rotation StringAt - Timestamp indicating the next scheduled rotation.
- rotation
Period String - Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
- next
Rotation stringAt - Timestamp indicating the next scheduled rotation.
- rotation
Period string - Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
- next_
rotation_ strat - Timestamp indicating the next scheduled rotation.
- rotation_
period str - Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
- next
Rotation StringAt - Timestamp indicating the next scheduled rotation.
- rotation
Period String - Time interval between two key rotations. The minimum duration is 24 hours and the maximum duration is 1 year (876000 hours).
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scalewayTerraform Provider.
Scaleway v1.40.0 published on Friday, Dec 19, 2025 by pulumiverse
