published on Friday, Nov 13, 2026 by pulumiverse
published on Friday, Nov 13, 2026 by pulumiverse
The scaleway.secrets.Secret resource allows you to create and manage secrets in Scaleway Secret Manager.
Refer to the Secret Manager product documentation and API documentation for more information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create a secret
const main = new scaleway.secrets.Secret("main", {
name: "foo",
description: "barr",
tags: [
"foo",
"terraform",
],
});
import pulumi
import pulumiverse_scaleway as scaleway
# Create a secret
main = scaleway.secrets.Secret("main",
name="foo",
description="barr",
tags=[
"foo",
"terraform",
])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/secrets"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a secret
_, err := secrets.NewSecret(ctx, "main", &secrets.SecretArgs{
Name: pulumi.String("foo"),
Description: pulumi.String("barr"),
Tags: pulumi.StringArray{
pulumi.String("foo"),
pulumi.String("terraform"),
},
})
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 secret
var main = new Scaleway.Secrets.Secret("main", new()
{
Name = "foo",
Description = "barr",
Tags = new[]
{
"foo",
"terraform",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.secrets.Secret;
import com.pulumi.scaleway.secrets.SecretArgs;
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 secret
var main = new Secret("main", SecretArgs.builder()
.name("foo")
.description("barr")
.tags(
"foo",
"terraform")
.build());
}
}
resources:
# Create a secret
main:
type: scaleway:secrets:Secret
properties:
name: foo
description: barr
tags:
- foo
- terraform
terraform {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
# Create a secret
resource "scaleway_secrets_secret" "main" {
lifecycle {
create_before_destroy = true
}
name = "foo"
description = "barr"
tags = ["foo", "terraform"]
}
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Apply an ephemeral policy on your secret named `foo`.
// In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed.
const ephemeral = new scaleway.secrets.Secret("ephemeral", {
name: "foo",
ephemeralPolicies: [{
ttl: "24h",
expiresOnceAccessed: true,
action: "disable",
}],
});
import pulumi
import pulumiverse_scaleway as scaleway
# Apply an ephemeral policy on your secret named `foo`.
# In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed.
ephemeral = scaleway.secrets.Secret("ephemeral",
name="foo",
ephemeral_policies=[{
"ttl": "24h",
"expires_once_accessed": True,
"action": "disable",
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/secrets"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Apply an ephemeral policy on your secret named `foo`.
// In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed.
_, err := secrets.NewSecret(ctx, "ephemeral", &secrets.SecretArgs{
Name: pulumi.String("foo"),
EphemeralPolicies: secrets.SecretEphemeralPolicyArray{
&secrets.SecretEphemeralPolicyArgs{
Ttl: pulumi.String("24h"),
ExpiresOnceAccessed: pulumi.Bool(true),
Action: pulumi.String("disable"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
// Apply an ephemeral policy on your secret named `foo`.
// In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed.
var ephemeral = new Scaleway.Secrets.Secret("ephemeral", new()
{
Name = "foo",
EphemeralPolicies = new[]
{
new Scaleway.Secrets.Inputs.SecretEphemeralPolicyArgs
{
Ttl = "24h",
ExpiresOnceAccessed = true,
Action = "disable",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.secrets.Secret;
import com.pulumi.scaleway.secrets.SecretArgs;
import com.pulumi.scaleway.secrets.inputs.SecretEphemeralPolicyArgs;
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) {
// Apply an ephemeral policy on your secret named `foo`.
// In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed.
var ephemeral = new Secret("ephemeral", SecretArgs.builder()
.name("foo")
.ephemeralPolicies(SecretEphemeralPolicyArgs.builder()
.ttl("24h")
.expiresOnceAccessed(true)
.action("disable")
.build())
.build());
}
}
resources:
# Apply an ephemeral policy on your secret named `foo`.
# In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed.
ephemeral:
type: scaleway:secrets:Secret
properties:
name: foo
ephemeralPolicies:
- ttl: 24h
expiresOnceAccessed: true
action: disable
terraform {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
# Apply an ephemeral policy on your secret named `foo`.
# In the example below, your secret's lifetime is of 24 hours, your secret versions will expire once they are accessed, and they are disabled after being accessed.
resource "scaleway_secrets_secret" "ephemeral" {
lifecycle {
create_before_destroy = true
}
name = "foo"
ephemeral_policies {
ttl = "24h"
expires_once_accessed = true
action = "disable"
}
}
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Create a secret with your own Key Manager encryption key
const main = new scaleway.keymanager.Key("main", {
name: "my-kms-key",
usage: "symmetric_encryption",
algorithm: "aes_256_gcm",
unprotected: true,
});
const kms = new scaleway.secrets.Secret("kms", {
name: "foo",
keyId: main.id,
});
import pulumi
import pulumiverse_scaleway as scaleway
# Create a secret with your own Key Manager encryption key
main = scaleway.keymanager.Key("main",
name="my-kms-key",
usage="symmetric_encryption",
algorithm="aes_256_gcm",
unprotected=True)
kms = scaleway.secrets.Secret("kms",
name="foo",
key_id=main.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/keymanager"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/secrets"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a secret with your own Key Manager encryption key
main, 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
}
_, err = secrets.NewSecret(ctx, "kms", &secrets.SecretArgs{
Name: pulumi.String("foo"),
KeyId: main.ID(),
})
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 secret with your own Key Manager encryption key
var main = new Scaleway.Keymanager.Key("main", new()
{
Name = "my-kms-key",
Usage = "symmetric_encryption",
Algorithm = "aes_256_gcm",
Unprotected = true,
});
var kms = new Scaleway.Secrets.Secret("kms", new()
{
Name = "foo",
KeyId = main.Id,
});
});
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.secrets.Secret;
import com.pulumi.scaleway.secrets.SecretArgs;
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 secret with your own Key Manager encryption key
var main = new Key("main", KeyArgs.builder()
.name("my-kms-key")
.usage("symmetric_encryption")
.algorithm("aes_256_gcm")
.unprotected(true)
.build());
var kms = new Secret("kms", SecretArgs.builder()
.name("foo")
.keyId(main.id())
.build());
}
}
resources:
# Create a secret with your own Key Manager encryption key
main:
type: scaleway:keymanager:Key
properties:
name: my-kms-key
usage: symmetric_encryption
algorithm: aes_256_gcm
unprotected: true
kms:
type: scaleway:secrets:Secret
properties:
name: foo
keyId: ${main.id}
terraform {
required_providers {
scaleway = {
source = "pulumi/scaleway"
}
}
}
# Create a secret with your own Key Manager encryption key
resource "scaleway_keymanager_key" "main" {
lifecycle {
create_before_destroy = true
}
name = "my-kms-key"
usage = "symmetric_encryption"
algorithm = "aes_256_gcm"
unprotected = true
}
resource "scaleway_secrets_secret" "kms" {
lifecycle {
create_before_destroy = true
}
name = "foo"
key_id = scaleway_keymanager_key.main.id
}
Create Secret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Secret(name: string, args?: SecretArgs, opts?: CustomResourceOptions);@overload
def Secret(resource_name: str,
args: Optional[SecretArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Secret(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
ephemeral_policies: Optional[Sequence[SecretEphemeralPolicyArgs]] = None,
key_id: Optional[str] = None,
name: Optional[str] = None,
path: Optional[str] = None,
project_id: Optional[str] = None,
protected: Optional[bool] = None,
region: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
type: Optional[str] = None)func NewSecret(ctx *Context, name string, args *SecretArgs, opts ...ResourceOption) (*Secret, error)public Secret(string name, SecretArgs? args = null, CustomResourceOptions? opts = null)
public Secret(String name, SecretArgs args)
public Secret(String name, SecretArgs args, CustomResourceOptions options)
type: scaleway:secrets:Secret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "scaleway_secrets_secret" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SecretArgs
- 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 SecretArgs
- 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 SecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretArgs
- 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 secretResource = new Scaleway.Secrets.Secret("secretResource", new()
{
Description = "string",
EphemeralPolicies = new[]
{
new Scaleway.Secrets.Inputs.SecretEphemeralPolicyArgs
{
Action = "string",
ExpiresOnceAccessed = false,
Ttl = "string",
},
},
KeyId = "string",
Name = "string",
Path = "string",
ProjectId = "string",
Protected = false,
Region = "string",
Tags = new[]
{
"string",
},
Type = "string",
});
example, err := secrets.NewSecret(ctx, "secretResource", &secrets.SecretArgs{
Description: pulumi.String("string"),
EphemeralPolicies: secrets.SecretEphemeralPolicyArray{
&secrets.SecretEphemeralPolicyArgs{
Action: pulumi.String("string"),
ExpiresOnceAccessed: pulumi.Bool(false),
Ttl: pulumi.String("string"),
},
},
KeyId: pulumi.String("string"),
Name: pulumi.String("string"),
Path: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Protected: pulumi.Bool(false),
Region: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Type: pulumi.String("string"),
})
resource "scaleway_secrets_secret" "secretResource" {
lifecycle {
create_before_destroy = true
}
description = "string"
ephemeral_policies {
action = "string"
expires_once_accessed = false
ttl = "string"
}
key_id = "string"
name = "string"
path = "string"
project_id = "string"
protected = false
region = "string"
tags = ["string"]
type = "string"
}
var secretResource = new Secret("secretResource", SecretArgs.builder()
.description("string")
.ephemeralPolicies(SecretEphemeralPolicyArgs.builder()
.action("string")
.expiresOnceAccessed(false)
.ttl("string")
.build())
.keyId("string")
.name("string")
.path("string")
.projectId("string")
.protected_(false)
.region("string")
.tags("string")
.type("string")
.build());
secret_resource = scaleway.secrets.Secret("secretResource",
description="string",
ephemeral_policies=[{
"action": "string",
"expires_once_accessed": False,
"ttl": "string",
}],
key_id="string",
name="string",
path="string",
project_id="string",
protected=False,
region="string",
tags=["string"],
type="string")
const secretResource = new scaleway.secrets.Secret("secretResource", {
description: "string",
ephemeralPolicies: [{
action: "string",
expiresOnceAccessed: false,
ttl: "string",
}],
keyId: "string",
name: "string",
path: "string",
projectId: "string",
"protected": false,
region: "string",
tags: ["string"],
type: "string",
});
type: scaleway:secrets:Secret
properties:
description: string
ephemeralPolicies:
- action: string
expiresOnceAccessed: false
ttl: string
keyId: string
name: string
path: string
projectId: string
protected: false
region: string
tags:
- string
type: string
Secret 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 Secret resource accepts the following input properties:
- Description string
- Description of the secret (e.g.
my-new-description). - Ephemeral
Policies List<Pulumiverse.Scaleway. Secrets. Inputs. Secret Ephemeral Policy> - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- Key
Id string - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - Name string
- Name of the secret (e.g.
my-secret). - Path string
- Path of the secret, defaults to
/. - Project
Id string - The project ID containing is the secret.
- Protected bool
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- Region string
region) The region in which the resource exists.- List<string>
- Tags of the secret (e.g.
["tag", "secret"]). - Type string
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- Description string
- Description of the secret (e.g.
my-new-description). - Ephemeral
Policies []SecretEphemeral Policy Args - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- Key
Id string - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - Name string
- Name of the secret (e.g.
my-secret). - Path string
- Path of the secret, defaults to
/. - Project
Id string - The project ID containing is the secret.
- Protected bool
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- Region string
region) The region in which the resource exists.- []string
- Tags of the secret (e.g.
["tag", "secret"]). - Type string
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- description string
- Description of the secret (e.g.
my-new-description). - ephemeral_
policies list(object) - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key_
id string - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name string
- Name of the secret (e.g.
my-secret). - path string
- Path of the secret, defaults to
/. - project_
id string - The project ID containing is the secret.
- protected bool
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region string
region) The region in which the resource exists.- list(string)
- Tags of the secret (e.g.
["tag", "secret"]). - type string
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- description String
- Description of the secret (e.g.
my-new-description). - ephemeral
Policies List<SecretEphemeral Policy> - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key
Id String - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name String
- Name of the secret (e.g.
my-secret). - path String
- Path of the secret, defaults to
/. - project
Id String - The project ID containing is the secret.
- protected_ Boolean
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region String
region) The region in which the resource exists.- List<String>
- Tags of the secret (e.g.
["tag", "secret"]). - type String
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- description string
- Description of the secret (e.g.
my-new-description). - ephemeral
Policies SecretEphemeral Policy[] - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key
Id string - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name string
- Name of the secret (e.g.
my-secret). - path string
- Path of the secret, defaults to
/. - project
Id string - The project ID containing is the secret.
- protected boolean
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region string
region) The region in which the resource exists.- string[]
- Tags of the secret (e.g.
["tag", "secret"]). - type string
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- description str
- Description of the secret (e.g.
my-new-description). - ephemeral_
policies Sequence[SecretEphemeral Policy Args] - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key_
id str - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name str
- Name of the secret (e.g.
my-secret). - path str
- Path of the secret, defaults to
/. - project_
id str - The project ID containing is the secret.
- protected bool
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region str
region) The region in which the resource exists.- Sequence[str]
- Tags of the secret (e.g.
["tag", "secret"]). - type str
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- description String
- Description of the secret (e.g.
my-new-description). - ephemeral
Policies List<Property Map> - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key
Id String - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name String
- Name of the secret (e.g.
my-secret). - path String
- Path of the secret, defaults to
/. - project
Id String - The project ID containing is the secret.
- protected Boolean
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region String
region) The region in which the resource exists.- List<String>
- Tags of the secret (e.g.
["tag", "secret"]). - type String
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
- Created
At string - Date and time of the secret's creation (in RFC 3339 format).
- Id string
- The provider-assigned unique ID for this managed resource.
- Srn string
- The Scaleway Resource Name (SRN) of the secret.
- Status string
- The status of the secret.
- Updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- Version
Count int - The amount of secret versions.
- Versions
List<Pulumiverse.
Scaleway. Secrets. Outputs. Secret Version> - List of the versions of the secret
- Created
At string - Date and time of the secret's creation (in RFC 3339 format).
- Id string
- The provider-assigned unique ID for this managed resource.
- Srn string
- The Scaleway Resource Name (SRN) of the secret.
- Status string
- The status of the secret.
- Updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- Version
Count int - The amount of secret versions.
- Versions
[]Secret
Version - List of the versions of the secret
- created_
at string - Date and time of the secret's creation (in RFC 3339 format).
- id string
- The provider-assigned unique ID for this managed resource.
- srn string
- The Scaleway Resource Name (SRN) of the secret.
- status string
- The status of the secret.
- updated_
at string - Date and time of the secret's last update (in RFC 3339 format).
- version_
count number - The amount of secret versions.
- versions list(object)
- List of the versions of the secret
- created
At String - Date and time of the secret's creation (in RFC 3339 format).
- id String
- The provider-assigned unique ID for this managed resource.
- srn String
- The Scaleway Resource Name (SRN) of the secret.
- status String
- The status of the secret.
- updated
At String - Date and time of the secret's last update (in RFC 3339 format).
- version
Count Integer - The amount of secret versions.
- versions
List<Secret
Version> - List of the versions of the secret
- created
At string - Date and time of the secret's creation (in RFC 3339 format).
- id string
- The provider-assigned unique ID for this managed resource.
- srn string
- The Scaleway Resource Name (SRN) of the secret.
- status string
- The status of the secret.
- updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- version
Count number - The amount of secret versions.
- versions
Secret
Version[] - List of the versions of the secret
- created_
at str - Date and time of the secret's creation (in RFC 3339 format).
- id str
- The provider-assigned unique ID for this managed resource.
- srn str
- The Scaleway Resource Name (SRN) of the secret.
- status str
- The status of the secret.
- updated_
at str - Date and time of the secret's last update (in RFC 3339 format).
- version_
count int - The amount of secret versions.
- versions
Sequence[Secret
Version] - List of the versions of the secret
- created
At String - Date and time of the secret's creation (in RFC 3339 format).
- id String
- The provider-assigned unique ID for this managed resource.
- srn String
- The Scaleway Resource Name (SRN) of the secret.
- status String
- The status of the secret.
- updated
At String - Date and time of the secret's last update (in RFC 3339 format).
- version
Count Number - The amount of secret versions.
- versions List<Property Map>
- List of the versions of the secret
Look up Existing Secret Resource
Get an existing Secret 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?: SecretState, opts?: CustomResourceOptions): Secret@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
ephemeral_policies: Optional[Sequence[SecretEphemeralPolicyArgs]] = None,
key_id: Optional[str] = None,
name: Optional[str] = None,
path: Optional[str] = None,
project_id: Optional[str] = None,
protected: Optional[bool] = None,
region: Optional[str] = None,
srn: Optional[str] = None,
status: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
type: Optional[str] = None,
updated_at: Optional[str] = None,
version_count: Optional[int] = None,
versions: Optional[Sequence[SecretVersionArgs]] = None) -> Secretfunc GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)public static Secret Get(string name, Input<string> id, SecretState? state, CustomResourceOptions? opts = null)public static Secret get(String name, Output<String> id, SecretState state, CustomResourceOptions options)resources: existingSecret: type: scaleway:secrets:Secret get: id: ${id}import {
to = scaleway_secrets_secret.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state SecretState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state SecretState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state SecretState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state SecretState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Created
At string - Date and time of the secret's creation (in RFC 3339 format).
- Description string
- Description of the secret (e.g.
my-new-description). - Ephemeral
Policies List<Pulumiverse.Scaleway. Secrets. Inputs. Secret Ephemeral Policy> - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- Key
Id string - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - Name string
- Name of the secret (e.g.
my-secret). - Path string
- Path of the secret, defaults to
/. - Project
Id string - The project ID containing is the secret.
- Protected bool
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- Region string
region) The region in which the resource exists.- Srn string
- The Scaleway Resource Name (SRN) of the secret.
- Status string
- The status of the secret.
- List<string>
- Tags of the secret (e.g.
["tag", "secret"]). - Type string
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- Updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- Version
Count int - The amount of secret versions.
- Versions
List<Pulumiverse.
Scaleway. Secrets. Inputs. Secret Version> - List of the versions of the secret
- Created
At string - Date and time of the secret's creation (in RFC 3339 format).
- Description string
- Description of the secret (e.g.
my-new-description). - Ephemeral
Policies []SecretEphemeral Policy Args - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- Key
Id string - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - Name string
- Name of the secret (e.g.
my-secret). - Path string
- Path of the secret, defaults to
/. - Project
Id string - The project ID containing is the secret.
- Protected bool
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- Region string
region) The region in which the resource exists.- Srn string
- The Scaleway Resource Name (SRN) of the secret.
- Status string
- The status of the secret.
- []string
- Tags of the secret (e.g.
["tag", "secret"]). - Type string
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- Updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- Version
Count int - The amount of secret versions.
- Versions
[]Secret
Version Args - List of the versions of the secret
- created_
at string - Date and time of the secret's creation (in RFC 3339 format).
- description string
- Description of the secret (e.g.
my-new-description). - ephemeral_
policies list(object) - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key_
id string - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name string
- Name of the secret (e.g.
my-secret). - path string
- Path of the secret, defaults to
/. - project_
id string - The project ID containing is the secret.
- protected bool
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region string
region) The region in which the resource exists.- srn string
- The Scaleway Resource Name (SRN) of the secret.
- status string
- The status of the secret.
- list(string)
- Tags of the secret (e.g.
["tag", "secret"]). - type string
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- updated_
at string - Date and time of the secret's last update (in RFC 3339 format).
- version_
count number - The amount of secret versions.
- versions list(object)
- List of the versions of the secret
- created
At String - Date and time of the secret's creation (in RFC 3339 format).
- description String
- Description of the secret (e.g.
my-new-description). - ephemeral
Policies List<SecretEphemeral Policy> - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key
Id String - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name String
- Name of the secret (e.g.
my-secret). - path String
- Path of the secret, defaults to
/. - project
Id String - The project ID containing is the secret.
- protected_ Boolean
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region String
region) The region in which the resource exists.- srn String
- The Scaleway Resource Name (SRN) of the secret.
- status String
- The status of the secret.
- List<String>
- Tags of the secret (e.g.
["tag", "secret"]). - type String
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- updated
At String - Date and time of the secret's last update (in RFC 3339 format).
- version
Count Integer - The amount of secret versions.
- versions
List<Secret
Version> - List of the versions of the secret
- created
At string - Date and time of the secret's creation (in RFC 3339 format).
- description string
- Description of the secret (e.g.
my-new-description). - ephemeral
Policies SecretEphemeral Policy[] - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key
Id string - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name string
- Name of the secret (e.g.
my-secret). - path string
- Path of the secret, defaults to
/. - project
Id string - The project ID containing is the secret.
- protected boolean
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region string
region) The region in which the resource exists.- srn string
- The Scaleway Resource Name (SRN) of the secret.
- status string
- The status of the secret.
- string[]
- Tags of the secret (e.g.
["tag", "secret"]). - type string
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- version
Count number - The amount of secret versions.
- versions
Secret
Version[] - List of the versions of the secret
- created_
at str - Date and time of the secret's creation (in RFC 3339 format).
- description str
- Description of the secret (e.g.
my-new-description). - ephemeral_
policies Sequence[SecretEphemeral Policy Args] - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key_
id str - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name str
- Name of the secret (e.g.
my-secret). - path str
- Path of the secret, defaults to
/. - project_
id str - The project ID containing is the secret.
- protected bool
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region str
region) The region in which the resource exists.- srn str
- The Scaleway Resource Name (SRN) of the secret.
- status str
- The status of the secret.
- Sequence[str]
- Tags of the secret (e.g.
["tag", "secret"]). - type str
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- updated_
at str - Date and time of the secret's last update (in RFC 3339 format).
- version_
count int - The amount of secret versions.
- versions
Sequence[Secret
Version Args] - List of the versions of the secret
- created
At String - Date and time of the secret's creation (in RFC 3339 format).
- description String
- Description of the secret (e.g.
my-new-description). - ephemeral
Policies List<Property Map> - Ephemeral policy of the secret. Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
- key
Id String - ID of the Key Manager key used to encrypt and decrypt the secret's versions. Can be a UUID or a localized ID (
region/UUID). If not set, Secret Manager uses a Key Manager internal key. - name String
- Name of the secret (e.g.
my-secret). - path String
- Path of the secret, defaults to
/. - project
Id String - The project ID containing is the secret.
- protected Boolean
- True if secret protection is enabled on the secret. A protected secret cannot be deleted, terraform will fail to destroy unless this is set to false.
- region String
region) The region in which the resource exists.- srn String
- The Scaleway Resource Name (SRN) of the secret.
- status String
- The status of the secret.
- List<String>
- Tags of the secret (e.g.
["tag", "secret"]). - type String
- Type of the secret. If not specified, the type is Opaque. Available values can be found in SDK Constants.
- updated
At String - Date and time of the secret's last update (in RFC 3339 format).
- version
Count Number - The amount of secret versions.
- versions List<Property Map>
- List of the versions of the secret
Supporting Types
SecretEphemeralPolicy, SecretEphemeralPolicyArgs
- Action string
- Action to perform when the version of a secret expires. Available values can be found in SDK constants.
- Expires
Once boolAccessed - True if the secret version expires after a single user access.
- Ttl string
- Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in Go Duration format (ex: "30m", "24h").
- Action string
- Action to perform when the version of a secret expires. Available values can be found in SDK constants.
- Expires
Once boolAccessed - True if the secret version expires after a single user access.
- Ttl string
- Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in Go Duration format (ex: "30m", "24h").
- action string
- Action to perform when the version of a secret expires. Available values can be found in SDK constants.
- expires_
once_ boolaccessed - True if the secret version expires after a single user access.
- ttl string
- Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in Go Duration format (ex: "30m", "24h").
- action String
- Action to perform when the version of a secret expires. Available values can be found in SDK constants.
- expires
Once BooleanAccessed - True if the secret version expires after a single user access.
- ttl String
- Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in Go Duration format (ex: "30m", "24h").
- action string
- Action to perform when the version of a secret expires. Available values can be found in SDK constants.
- expires
Once booleanAccessed - True if the secret version expires after a single user access.
- ttl string
- Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in Go Duration format (ex: "30m", "24h").
- action str
- Action to perform when the version of a secret expires. Available values can be found in SDK constants.
- expires_
once_ boolaccessed - True if the secret version expires after a single user access.
- ttl str
- Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in Go Duration format (ex: "30m", "24h").
- action String
- Action to perform when the version of a secret expires. Available values can be found in SDK constants.
- expires
Once BooleanAccessed - True if the secret version expires after a single user access.
- ttl String
- Time frame, from one second and up to one year, during which the secret's versions are valid. Has to be specified in Go Duration format (ex: "30m", "24h").
SecretVersion, SecretVersionArgs
- Created
At string - Date and time of the secret's creation (in RFC 3339 format).
- Description string
- Description of the secret (e.g.
my-new-description). - Latest bool
- Returns true if the version is the latest.
- Revision string
- The revision of secret version
- Secret
Id string - The secret ID associated with this version
- Status string
- The status of the secret.
- Updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- Created
At string - Date and time of the secret's creation (in RFC 3339 format).
- Description string
- Description of the secret (e.g.
my-new-description). - Latest bool
- Returns true if the version is the latest.
- Revision string
- The revision of secret version
- Secret
Id string - The secret ID associated with this version
- Status string
- The status of the secret.
- Updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- created_
at string - Date and time of the secret's creation (in RFC 3339 format).
- description string
- Description of the secret (e.g.
my-new-description). - latest bool
- Returns true if the version is the latest.
- revision string
- The revision of secret version
- secret_
id string - The secret ID associated with this version
- status string
- The status of the secret.
- updated_
at string - Date and time of the secret's last update (in RFC 3339 format).
- created
At String - Date and time of the secret's creation (in RFC 3339 format).
- description String
- Description of the secret (e.g.
my-new-description). - latest Boolean
- Returns true if the version is the latest.
- revision String
- The revision of secret version
- secret
Id String - The secret ID associated with this version
- status String
- The status of the secret.
- updated
At String - Date and time of the secret's last update (in RFC 3339 format).
- created
At string - Date and time of the secret's creation (in RFC 3339 format).
- description string
- Description of the secret (e.g.
my-new-description). - latest boolean
- Returns true if the version is the latest.
- revision string
- The revision of secret version
- secret
Id string - The secret ID associated with this version
- status string
- The status of the secret.
- updated
At string - Date and time of the secret's last update (in RFC 3339 format).
- created_
at str - Date and time of the secret's creation (in RFC 3339 format).
- description str
- Description of the secret (e.g.
my-new-description). - latest bool
- Returns true if the version is the latest.
- revision str
- The revision of secret version
- secret_
id str - The secret ID associated with this version
- status str
- The status of the secret.
- updated_
at str - Date and time of the secret's last update (in RFC 3339 format).
- created
At String - Date and time of the secret's creation (in RFC 3339 format).
- description String
- Description of the secret (e.g.
my-new-description). - latest Boolean
- Returns true if the version is the latest.
- revision String
- The revision of secret version
- secret
Id String - The secret ID associated with this version
- status String
- The status of the secret.
- updated
At String - Date and time of the secret's last update (in RFC 3339 format).
Import
This section explains how to import a secret using the {region}/{id} format.
$ pulumi import scaleway:secrets/secret:Secret main fr-par/11111111-1111-1111-1111-111111111111
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 Friday, Nov 13, 2026 by pulumiverse