1. Packages
  2. Scaleway
  3. API Docs
  4. Secret
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

scaleway.Secret

Explore with Pulumi AI

scaleway logo
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

    Creates and manages Scaleway Secrets. For more information, see the documentation.

    Examples

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@lbrlabs/pulumi-scaleway";
    
    const main = new scaleway.Secret("main", {
        description: "barr",
        tags: [
            "foo",
            "terraform",
        ],
    });
    
    import pulumi
    import lbrlabs_pulumi_scaleway as scaleway
    
    main = scaleway.Secret("main",
        description="barr",
        tags=[
            "foo",
            "terraform",
        ])
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.Secret("main", new()
        {
            Description = "barr",
            Tags = new[]
            {
                "foo",
                "terraform",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewSecret(ctx, "main", &scaleway.SecretArgs{
    			Description: pulumi.String("barr"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo"),
    				pulumi.String("terraform"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.Secret;
    import com.pulumi.scaleway.SecretArgs;
    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) {
            var main = new Secret("main", SecretArgs.builder()        
                .description("barr")
                .tags(            
                    "foo",
                    "terraform")
                .build());
    
        }
    }
    
    resources:
      main:
        type: scaleway:Secret
        properties:
          description: barr
          tags:
            - foo
            - terraform
    

    Create Secret Resource

    new Secret(name: string, args?: SecretArgs, opts?: CustomResourceOptions);
    @overload
    def Secret(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               name: Optional[str] = None,
               project_id: Optional[str] = None,
               region: Optional[str] = None,
               tags: Optional[Sequence[str]] = None)
    @overload
    def Secret(resource_name: str,
               args: Optional[SecretArgs] = None,
               opts: Optional[ResourceOptions] = 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:Secret
    properties: # The arguments to resource properties.
    options: # 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.
    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.

    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

    The Secret resource accepts the following input properties:

    Description string

    Description of the secret (e.g. my-new-description).

    Name string

    Name of the secret (e.g. my-secret).

    ProjectId string

    The project ID containing is the secret.

    Region string

    region) The region in which the resource exists.

    Tags List<string>

    Tags of the secret (e.g. ["tag", "secret"]).

    Description string

    Description of the secret (e.g. my-new-description).

    Name string

    Name of the secret (e.g. my-secret).

    ProjectId string

    The project ID containing is the secret.

    Region string

    region) The region in which the resource exists.

    Tags []string

    Tags of the secret (e.g. ["tag", "secret"]).

    description String

    Description of the secret (e.g. my-new-description).

    name String

    Name of the secret (e.g. my-secret).

    projectId String

    The project ID containing is the secret.

    region String

    region) The region in which the resource exists.

    tags List<String>

    Tags of the secret (e.g. ["tag", "secret"]).

    description string

    Description of the secret (e.g. my-new-description).

    name string

    Name of the secret (e.g. my-secret).

    projectId string

    The project ID containing is the secret.

    region string

    region) The region in which the resource exists.

    tags string[]

    Tags of the secret (e.g. ["tag", "secret"]).

    description str

    Description of the secret (e.g. my-new-description).

    name str

    Name of the secret (e.g. my-secret).

    project_id str

    The project ID containing is the secret.

    region str

    region) The region in which the resource exists.

    tags Sequence[str]

    Tags of the secret (e.g. ["tag", "secret"]).

    description String

    Description of the secret (e.g. my-new-description).

    name String

    Name of the secret (e.g. my-secret).

    projectId String

    The project ID containing is the secret.

    region String

    region) The region in which the resource exists.

    tags List<String>

    Tags of the secret (e.g. ["tag", "secret"]).

    Outputs

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

    CreatedAt string

    Date and time of secret's creation (RFC 3339 format).

    Id string

    The provider-assigned unique ID for this managed resource.

    Status string

    The status of the Secret.

    UpdatedAt string

    Date and time of secret's last update (RFC 3339 format).

    VersionCount int

    The number of versions for this Secret.

    CreatedAt string

    Date and time of secret's creation (RFC 3339 format).

    Id string

    The provider-assigned unique ID for this managed resource.

    Status string

    The status of the Secret.

    UpdatedAt string

    Date and time of secret's last update (RFC 3339 format).

    VersionCount int

    The number of versions for this Secret.

    createdAt String

    Date and time of secret's creation (RFC 3339 format).

    id String

    The provider-assigned unique ID for this managed resource.

    status String

    The status of the Secret.

    updatedAt String

    Date and time of secret's last update (RFC 3339 format).

    versionCount Integer

    The number of versions for this Secret.

    createdAt string

    Date and time of secret's creation (RFC 3339 format).

    id string

    The provider-assigned unique ID for this managed resource.

    status string

    The status of the Secret.

    updatedAt string

    Date and time of secret's last update (RFC 3339 format).

    versionCount number

    The number of versions for this Secret.

    created_at str

    Date and time of secret's creation (RFC 3339 format).

    id str

    The provider-assigned unique ID for this managed resource.

    status str

    The status of the Secret.

    updated_at str

    Date and time of secret's last update (RFC 3339 format).

    version_count int

    The number of versions for this Secret.

    createdAt String

    Date and time of secret's creation (RFC 3339 format).

    id String

    The provider-assigned unique ID for this managed resource.

    status String

    The status of the Secret.

    updatedAt String

    Date and time of secret's last update (RFC 3339 format).

    versionCount Number

    The number of versions for this 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,
            name: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            updated_at: Optional[str] = None,
            version_count: Optional[int] = None) -> Secret
    func 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string

    Date and time of secret's creation (RFC 3339 format).

    Description string

    Description of the secret (e.g. my-new-description).

    Name string

    Name of the secret (e.g. my-secret).

    ProjectId string

    The project ID containing is the secret.

    Region string

    region) The region in which the resource exists.

    Status string

    The status of the Secret.

    Tags List<string>

    Tags of the secret (e.g. ["tag", "secret"]).

    UpdatedAt string

    Date and time of secret's last update (RFC 3339 format).

    VersionCount int

    The number of versions for this Secret.

    CreatedAt string

    Date and time of secret's creation (RFC 3339 format).

    Description string

    Description of the secret (e.g. my-new-description).

    Name string

    Name of the secret (e.g. my-secret).

    ProjectId string

    The project ID containing is the secret.

    Region string

    region) The region in which the resource exists.

    Status string

    The status of the Secret.

    Tags []string

    Tags of the secret (e.g. ["tag", "secret"]).

    UpdatedAt string

    Date and time of secret's last update (RFC 3339 format).

    VersionCount int

    The number of versions for this Secret.

    createdAt String

    Date and time of secret's creation (RFC 3339 format).

    description String

    Description of the secret (e.g. my-new-description).

    name String

    Name of the secret (e.g. my-secret).

    projectId String

    The project ID containing is the secret.

    region String

    region) The region in which the resource exists.

    status String

    The status of the Secret.

    tags List<String>

    Tags of the secret (e.g. ["tag", "secret"]).

    updatedAt String

    Date and time of secret's last update (RFC 3339 format).

    versionCount Integer

    The number of versions for this Secret.

    createdAt string

    Date and time of secret's creation (RFC 3339 format).

    description string

    Description of the secret (e.g. my-new-description).

    name string

    Name of the secret (e.g. my-secret).

    projectId string

    The project ID containing is the secret.

    region string

    region) The region in which the resource exists.

    status string

    The status of the Secret.

    tags string[]

    Tags of the secret (e.g. ["tag", "secret"]).

    updatedAt string

    Date and time of secret's last update (RFC 3339 format).

    versionCount number

    The number of versions for this Secret.

    created_at str

    Date and time of secret's creation (RFC 3339 format).

    description str

    Description of the secret (e.g. my-new-description).

    name str

    Name of the secret (e.g. my-secret).

    project_id str

    The project ID containing is the secret.

    region str

    region) The region in which the resource exists.

    status str

    The status of the Secret.

    tags Sequence[str]

    Tags of the secret (e.g. ["tag", "secret"]).

    updated_at str

    Date and time of secret's last update (RFC 3339 format).

    version_count int

    The number of versions for this Secret.

    createdAt String

    Date and time of secret's creation (RFC 3339 format).

    description String

    Description of the secret (e.g. my-new-description).

    name String

    Name of the secret (e.g. my-secret).

    projectId String

    The project ID containing is the secret.

    region String

    region) The region in which the resource exists.

    status String

    The status of the Secret.

    tags List<String>

    Tags of the secret (e.g. ["tag", "secret"]).

    updatedAt String

    Date and time of secret's last update (RFC 3339 format).

    versionCount Number

    The number of versions for this Secret.

    Import

    The Secret can be imported using the {region}/{id}, e.g. bash

     $ pulumi import scaleway:index/secret:Secret main fr-par/11111111-1111-1111-1111-111111111111
    

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the scaleway Terraform Provider.

    scaleway logo
    Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs