Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse
published on Saturday, Oct 24, 2026 by pulumiverse
Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse
published on Saturday, Oct 24, 2026 by pulumiverse
Gets information about a Key Manager Key. For more information, refer to the Key Manager API documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create a key and get its information.
// In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
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",
},
});
const byID = scaleway.keymanager.getKey({
keyId: "11111111-1111-1111-1111-111111111111",
});
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway
# Create a key and get its information.
# In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
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",
})
by_id = scaleway.keymanager.get_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/keymanager"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a key and get its information.
// In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
_, 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
}
_, err = keymanager.LookupKey(ctx, &keymanager.LookupKeyArgs{
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 = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
// Create a key and get its information.
// In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
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",
},
});
var byID = Scaleway.Keymanager.GetKey.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.keymanager.Key;
import com.pulumi.scaleway.keymanager.KeyArgs;
import com.pulumi.scaleway.keymanager.inputs.KeyRotationPolicyArgs;
import com.pulumi.scaleway.keymanager.KeymanagerFunctions;
import com.pulumi.scaleway.keymanager.inputs.GetKeyArgs;
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 and get its information.
// In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
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());
final var byID = KeymanagerFunctions.getKey(GetKeyArgs.builder()
.keyId("11111111-1111-1111-1111-111111111111")
.build());
}
}
resources:
# Create a key and get its information.
# In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
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
variables:
byID:
fn::invoke:
function: scaleway:keymanager:getKey
arguments:
keyId: 11111111-1111-1111-1111-111111111111
pulumi {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
data "scaleway_keymanager_getkey" "byID" {
key_id = "11111111-1111-1111-1111-111111111111"
}
# Create a key and get its information.
# In the example below, a key named `my-kms-key` is created, and its information is retrieved using the key's ID.
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"
}
}
Using getKey
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 getKey(args: GetKeyArgs, opts?: InvokeOptions): Promise<GetKeyResult>
function getKeyOutput(args: GetKeyOutputArgs, opts?: InvokeOutputOptions): Output<GetKeyResult>def get_key(key_id: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKeyResult
def get_key_output(key_id: pulumi.Input[Optional[str]] = None,
region: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetKeyResult]func LookupKey(ctx *Context, args *LookupKeyArgs, opts ...InvokeOption) (*LookupKeyResult, error)
func LookupKeyOutput(ctx *Context, args *LookupKeyOutputArgs, opts ...InvokeOption) LookupKeyResultOutput> Note: This function is named LookupKey in the Go SDK.
public static class GetKey
{
public static Task<GetKeyResult> InvokeAsync(GetKeyArgs args, InvokeOptions? opts = null)
public static Output<GetKeyResult> Invoke(GetKeyInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetKeyResult> Invoke(GetKeyInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetKeyResult> getKey(GetKeyArgs args, InvokeOptions options)
public static Output<GetKeyResult> getKey(GetKeyArgs args, InvokeOptions options)
public static Output<GetKeyResult> getKey(GetKeyArgs args, InvokeOutputOptions options)
fn::invoke:
function: scaleway:keymanager/getKey:getKey
arguments:
# arguments dictionarydata "scaleway_keymanager_get_key" "name" {
# arguments
}The following arguments are supported:
getKey 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
- Protection
Level string - Rotated
At string - Rotation
Count int - Rotation
Policies List<Pulumiverse.Scaleway. Keymanager. Outputs. Get Key Rotation Policy> - Srn string
- 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
- Protection
Level string - Rotated
At string - Rotation
Count int - Rotation
Policies []GetKey Rotation Policy - Srn string
- 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 bool
- name string
- origin string
- project_
id string - protected bool
- protection_
level string - rotated_
at string - rotation_
count number - rotation_
policies list(object) - srn string
- 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 Boolean
- name String
- origin String
- project
Id String - protected_ Boolean
- protection
Level String - rotated
At String - rotation
Count Integer - rotation
Policies List<GetKey Rotation Policy> - srn String
- 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
- protection
Level string - rotated
At string - rotation
Count number - rotation
Policies GetKey Rotation Policy[] - srn string
- 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
- protection_
level str - rotated_
at str - rotation_
count int - rotation_
policies Sequence[GetKey Rotation Policy] - srn str
- 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
- protection
Level String - rotated
At String - rotation
Count Number - rotation
Policies List<Property Map> - srn String
- state String
- List<String>
- unprotected Boolean
- updated
At String - usage String
- region String
Supporting Types
GetKeyRotationPolicy
- Next
Rotation stringAt - Timestamp indicating the next scheduled rotation. Computed from rotationPeriod if not set.
- 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. Computed from rotationPeriod if not set.
- 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. Computed from rotationPeriod if not set.
- 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. Computed from rotationPeriod if not set.
- 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. Computed from rotationPeriod if not set.
- 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. Computed from rotationPeriod if not set.
- 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. Computed from rotationPeriod if not set.
- 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.
Viewing docs for Scaleway v1.60.0
published on Saturday, Oct 24, 2026 by pulumiverse
published on Saturday, Oct 24, 2026 by pulumiverse