1. Packages
  2. Gcore Provider
  3. API Docs
  4. getCloudSecret
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
gcore logo
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core

    Secrets store sensitive data such as TLS certificates and private keys in encrypted form within a cloud region.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleCloudSecret = gcore.getCloudSecret({
        projectId: 1,
        regionId: 1,
        secretId: "bfc7824b-31b6-4a28-a0c4-7df137139215",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_cloud_secret = gcore.get_cloud_secret(project_id=1,
        region_id=1,
        secret_id="bfc7824b-31b6-4a28-a0c4-7df137139215")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.LookupCloudSecret(ctx, &gcore.LookupCloudSecretArgs{
    			ProjectId: pulumi.Float64Ref(1),
    			RegionId:  pulumi.Float64Ref(1),
    			SecretId:  "bfc7824b-31b6-4a28-a0c4-7df137139215",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleCloudSecret = Gcore.GetCloudSecret.Invoke(new()
        {
            ProjectId = 1,
            RegionId = 1,
            SecretId = "bfc7824b-31b6-4a28-a0c4-7df137139215",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetCloudSecretArgs;
    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) {
            final var exampleCloudSecret = GcoreFunctions.getCloudSecret(GetCloudSecretArgs.builder()
                .projectId(1)
                .regionId(1)
                .secretId("bfc7824b-31b6-4a28-a0c4-7df137139215")
                .build());
    
        }
    }
    
    variables:
      exampleCloudSecret:
        fn::invoke:
          function: gcore:getCloudSecret
          arguments:
            projectId: 1
            regionId: 1
            secretId: bfc7824b-31b6-4a28-a0c4-7df137139215
    

    Using getCloudSecret

    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 getCloudSecret(args: GetCloudSecretArgs, opts?: InvokeOptions): Promise<GetCloudSecretResult>
    function getCloudSecretOutput(args: GetCloudSecretOutputArgs, opts?: InvokeOptions): Output<GetCloudSecretResult>
    def get_cloud_secret(project_id: Optional[float] = None,
                         region_id: Optional[float] = None,
                         secret_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCloudSecretResult
    def get_cloud_secret_output(project_id: Optional[pulumi.Input[float]] = None,
                         region_id: Optional[pulumi.Input[float]] = None,
                         secret_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCloudSecretResult]
    func LookupCloudSecret(ctx *Context, args *LookupCloudSecretArgs, opts ...InvokeOption) (*LookupCloudSecretResult, error)
    func LookupCloudSecretOutput(ctx *Context, args *LookupCloudSecretOutputArgs, opts ...InvokeOption) LookupCloudSecretResultOutput

    > Note: This function is named LookupCloudSecret in the Go SDK.

    public static class GetCloudSecret 
    {
        public static Task<GetCloudSecretResult> InvokeAsync(GetCloudSecretArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudSecretResult> Invoke(GetCloudSecretInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudSecretResult> getCloudSecret(GetCloudSecretArgs args, InvokeOptions options)
    public static Output<GetCloudSecretResult> getCloudSecret(GetCloudSecretArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getCloudSecret:getCloudSecret
      arguments:
        # arguments dictionary

    The following arguments are supported:

    SecretId string
    Secret ID
    ProjectId double
    Project ID
    RegionId double
    Region ID
    SecretId string
    Secret ID
    ProjectId float64
    Project ID
    RegionId float64
    Region ID
    secretId String
    Secret ID
    projectId Double
    Project ID
    regionId Double
    Region ID
    secretId string
    Secret ID
    projectId number
    Project ID
    regionId number
    Region ID
    secret_id str
    Secret ID
    project_id float
    Project ID
    region_id float
    Region ID
    secretId String
    Secret ID
    projectId Number
    Project ID
    regionId Number
    Region ID

    getCloudSecret Result

    The following output properties are available:

    Algorithm string
    Metadata provided by a user or system for informational purposes. Defaults to None
    BitLength double
    Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
    ContentTypes Dictionary<string, string>
    Describes the content-types that can be used to retrieve the payload. The content-type used with symmetric secrets is application/octet-stream
    Created string
    Datetime when the secret was created. The format is 2020-01-01T12:00:00+00:00
    Expiration string
    Datetime when the secret will expire. The format is 2020-01-01T12:00:00+00:00. Defaults to None
    Id string
    Secret ID
    Mode string
    Metadata provided by a user or system for informational purposes. Defaults to None
    Name string
    Secret name
    SecretId string
    Secret ID
    SecretType string
    Secret type, base64 encoded. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API Available values: "certificate", "opaque", "passphrase", "private", "public", "symmetric".
    Status string
    Status
    ProjectId double
    Project ID
    RegionId double
    Region ID
    Algorithm string
    Metadata provided by a user or system for informational purposes. Defaults to None
    BitLength float64
    Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
    ContentTypes map[string]string
    Describes the content-types that can be used to retrieve the payload. The content-type used with symmetric secrets is application/octet-stream
    Created string
    Datetime when the secret was created. The format is 2020-01-01T12:00:00+00:00
    Expiration string
    Datetime when the secret will expire. The format is 2020-01-01T12:00:00+00:00. Defaults to None
    Id string
    Secret ID
    Mode string
    Metadata provided by a user or system for informational purposes. Defaults to None
    Name string
    Secret name
    SecretId string
    Secret ID
    SecretType string
    Secret type, base64 encoded. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API Available values: "certificate", "opaque", "passphrase", "private", "public", "symmetric".
    Status string
    Status
    ProjectId float64
    Project ID
    RegionId float64
    Region ID
    algorithm String
    Metadata provided by a user or system for informational purposes. Defaults to None
    bitLength Double
    Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
    contentTypes Map<String,String>
    Describes the content-types that can be used to retrieve the payload. The content-type used with symmetric secrets is application/octet-stream
    created String
    Datetime when the secret was created. The format is 2020-01-01T12:00:00+00:00
    expiration String
    Datetime when the secret will expire. The format is 2020-01-01T12:00:00+00:00. Defaults to None
    id String
    Secret ID
    mode String
    Metadata provided by a user or system for informational purposes. Defaults to None
    name String
    Secret name
    secretId String
    Secret ID
    secretType String
    Secret type, base64 encoded. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API Available values: "certificate", "opaque", "passphrase", "private", "public", "symmetric".
    status String
    Status
    projectId Double
    Project ID
    regionId Double
    Region ID
    algorithm string
    Metadata provided by a user or system for informational purposes. Defaults to None
    bitLength number
    Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
    contentTypes {[key: string]: string}
    Describes the content-types that can be used to retrieve the payload. The content-type used with symmetric secrets is application/octet-stream
    created string
    Datetime when the secret was created. The format is 2020-01-01T12:00:00+00:00
    expiration string
    Datetime when the secret will expire. The format is 2020-01-01T12:00:00+00:00. Defaults to None
    id string
    Secret ID
    mode string
    Metadata provided by a user or system for informational purposes. Defaults to None
    name string
    Secret name
    secretId string
    Secret ID
    secretType string
    Secret type, base64 encoded. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API Available values: "certificate", "opaque", "passphrase", "private", "public", "symmetric".
    status string
    Status
    projectId number
    Project ID
    regionId number
    Region ID
    algorithm str
    Metadata provided by a user or system for informational purposes. Defaults to None
    bit_length float
    Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
    content_types Mapping[str, str]
    Describes the content-types that can be used to retrieve the payload. The content-type used with symmetric secrets is application/octet-stream
    created str
    Datetime when the secret was created. The format is 2020-01-01T12:00:00+00:00
    expiration str
    Datetime when the secret will expire. The format is 2020-01-01T12:00:00+00:00. Defaults to None
    id str
    Secret ID
    mode str
    Metadata provided by a user or system for informational purposes. Defaults to None
    name str
    Secret name
    secret_id str
    Secret ID
    secret_type str
    Secret type, base64 encoded. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API Available values: "certificate", "opaque", "passphrase", "private", "public", "symmetric".
    status str
    Status
    project_id float
    Project ID
    region_id float
    Region ID
    algorithm String
    Metadata provided by a user or system for informational purposes. Defaults to None
    bitLength Number
    Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
    contentTypes Map<String>
    Describes the content-types that can be used to retrieve the payload. The content-type used with symmetric secrets is application/octet-stream
    created String
    Datetime when the secret was created. The format is 2020-01-01T12:00:00+00:00
    expiration String
    Datetime when the secret will expire. The format is 2020-01-01T12:00:00+00:00. Defaults to None
    id String
    Secret ID
    mode String
    Metadata provided by a user or system for informational purposes. Defaults to None
    name String
    Secret name
    secretId String
    Secret ID
    secretType String
    Secret type, base64 encoded. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API Available values: "certificate", "opaque", "passphrase", "private", "public", "symmetric".
    status String
    Status
    projectId Number
    Project ID
    regionId Number
    Region ID

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    Viewing docs for gcore 2.0.0-alpha.2
    published on Tuesday, Mar 24, 2026 by g-core
      Try Pulumi Cloud free. Your team will thank you.