1. Packages
  2. Gcore Provider
  3. API Docs
  4. getCloudSecrets
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 exampleCloudSecrets = gcore.getCloudSecrets({
        projectId: 1,
        regionId: 1,
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_cloud_secrets = gcore.get_cloud_secrets(project_id=1,
        region_id=1)
    
    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.GetCloudSecrets(ctx, &gcore.GetCloudSecretsArgs{
    			ProjectId: pulumi.Float64Ref(1),
    			RegionId:  pulumi.Float64Ref(1),
    		}, 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 exampleCloudSecrets = Gcore.GetCloudSecrets.Invoke(new()
        {
            ProjectId = 1,
            RegionId = 1,
        });
    
    });
    
    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.GetCloudSecretsArgs;
    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 exampleCloudSecrets = GcoreFunctions.getCloudSecrets(GetCloudSecretsArgs.builder()
                .projectId(1)
                .regionId(1)
                .build());
    
        }
    }
    
    variables:
      exampleCloudSecrets:
        fn::invoke:
          function: gcore:getCloudSecrets
          arguments:
            projectId: 1
            regionId: 1
    

    Using getCloudSecrets

    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 getCloudSecrets(args: GetCloudSecretsArgs, opts?: InvokeOptions): Promise<GetCloudSecretsResult>
    function getCloudSecretsOutput(args: GetCloudSecretsOutputArgs, opts?: InvokeOptions): Output<GetCloudSecretsResult>
    def get_cloud_secrets(max_items: Optional[float] = None,
                          project_id: Optional[float] = None,
                          region_id: Optional[float] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCloudSecretsResult
    def get_cloud_secrets_output(max_items: Optional[pulumi.Input[float]] = None,
                          project_id: Optional[pulumi.Input[float]] = None,
                          region_id: Optional[pulumi.Input[float]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCloudSecretsResult]
    func GetCloudSecrets(ctx *Context, args *GetCloudSecretsArgs, opts ...InvokeOption) (*GetCloudSecretsResult, error)
    func GetCloudSecretsOutput(ctx *Context, args *GetCloudSecretsOutputArgs, opts ...InvokeOption) GetCloudSecretsResultOutput

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

    public static class GetCloudSecrets 
    {
        public static Task<GetCloudSecretsResult> InvokeAsync(GetCloudSecretsArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudSecretsResult> Invoke(GetCloudSecretsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudSecretsResult> getCloudSecrets(GetCloudSecretsArgs args, InvokeOptions options)
    public static Output<GetCloudSecretsResult> getCloudSecrets(GetCloudSecretsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getCloudSecrets:getCloudSecrets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    MaxItems double
    Max items to fetch, default: 1000
    ProjectId double
    Project ID
    RegionId double
    Region ID
    MaxItems float64
    Max items to fetch, default: 1000
    ProjectId float64
    Project ID
    RegionId float64
    Region ID
    maxItems Double
    Max items to fetch, default: 1000
    projectId Double
    Project ID
    regionId Double
    Region ID
    maxItems number
    Max items to fetch, default: 1000
    projectId number
    Project ID
    regionId number
    Region ID
    max_items float
    Max items to fetch, default: 1000
    project_id float
    Project ID
    region_id float
    Region ID
    maxItems Number
    Max items to fetch, default: 1000
    projectId Number
    Project ID
    regionId Number
    Region ID

    getCloudSecrets Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetCloudSecretsItem>
    The items returned by the data source
    MaxItems double
    Max items to fetch, default: 1000
    ProjectId double
    Project ID
    RegionId double
    Region ID
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetCloudSecretsItem
    The items returned by the data source
    MaxItems float64
    Max items to fetch, default: 1000
    ProjectId float64
    Project ID
    RegionId float64
    Region ID
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetCloudSecretsItem>
    The items returned by the data source
    maxItems Double
    Max items to fetch, default: 1000
    projectId Double
    Project ID
    regionId Double
    Region ID
    id string
    The provider-assigned unique ID for this managed resource.
    items GetCloudSecretsItem[]
    The items returned by the data source
    maxItems number
    Max items to fetch, default: 1000
    projectId number
    Project ID
    regionId number
    Region ID
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[GetCloudSecretsItem]
    The items returned by the data source
    max_items float
    Max items to fetch, default: 1000
    project_id float
    Project ID
    region_id float
    Region ID
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    The items returned by the data source
    maxItems Number
    Max items to fetch, default: 1000
    projectId Number
    Project ID
    regionId Number
    Region ID

    Supporting Types

    GetCloudSecretsItem

    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 uuid
    Mode string
    Metadata provided by a user or system for informational purposes. Defaults to None
    Name string
    Secret name
    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
    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 uuid
    Mode string
    Metadata provided by a user or system for informational purposes. Defaults to None
    Name string
    Secret name
    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
    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 uuid
    mode String
    Metadata provided by a user or system for informational purposes. Defaults to None
    name String
    Secret name
    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
    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 uuid
    mode string
    Metadata provided by a user or system for informational purposes. Defaults to None
    name string
    Secret name
    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
    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 uuid
    mode str
    Metadata provided by a user or system for informational purposes. Defaults to None
    name str
    Secret name
    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
    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 uuid
    mode String
    Metadata provided by a user or system for informational purposes. Defaults to None
    name String
    Secret name
    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

    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.