published on Tuesday, Mar 24, 2026 by g-core
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
Create CloudSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CloudSecret(name: string, args: CloudSecretArgs, opts?: CustomResourceOptions);@overload
def CloudSecret(resource_name: str,
args: CloudSecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CloudSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
payload: Optional[CloudSecretPayloadArgs] = None,
payload_wo_version: Optional[float] = None,
expiration: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
region_id: Optional[float] = None)func NewCloudSecret(ctx *Context, name string, args CloudSecretArgs, opts ...ResourceOption) (*CloudSecret, error)public CloudSecret(string name, CloudSecretArgs args, CustomResourceOptions? opts = null)
public CloudSecret(String name, CloudSecretArgs args)
public CloudSecret(String name, CloudSecretArgs args, CustomResourceOptions options)
type: gcore:CloudSecret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CloudSecretArgs
- 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 CloudSecretArgs
- 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 CloudSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CloudSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CloudSecretArgs
- 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 cloudSecretResource = new Gcore.CloudSecret("cloudSecretResource", new()
{
Payload = new Gcore.Inputs.CloudSecretPayloadArgs
{
CertificateChainWo = "string",
CertificateWo = "string",
PrivateKeyWo = "string",
},
PayloadWoVersion = 0,
Expiration = "string",
Name = "string",
ProjectId = 0,
RegionId = 0,
});
example, err := gcore.NewCloudSecret(ctx, "cloudSecretResource", &gcore.CloudSecretArgs{
Payload: &gcore.CloudSecretPayloadArgs{
CertificateChainWo: pulumi.String("string"),
CertificateWo: pulumi.String("string"),
PrivateKeyWo: pulumi.String("string"),
},
PayloadWoVersion: pulumi.Float64(0),
Expiration: pulumi.String("string"),
Name: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
RegionId: pulumi.Float64(0),
})
var cloudSecretResource = new CloudSecret("cloudSecretResource", CloudSecretArgs.builder()
.payload(CloudSecretPayloadArgs.builder()
.certificateChainWo("string")
.certificateWo("string")
.privateKeyWo("string")
.build())
.payloadWoVersion(0.0)
.expiration("string")
.name("string")
.projectId(0.0)
.regionId(0.0)
.build());
cloud_secret_resource = gcore.CloudSecret("cloudSecretResource",
payload={
"certificate_chain_wo": "string",
"certificate_wo": "string",
"private_key_wo": "string",
},
payload_wo_version=0,
expiration="string",
name="string",
project_id=0,
region_id=0)
const cloudSecretResource = new gcore.CloudSecret("cloudSecretResource", {
payload: {
certificateChainWo: "string",
certificateWo: "string",
privateKeyWo: "string",
},
payloadWoVersion: 0,
expiration: "string",
name: "string",
projectId: 0,
regionId: 0,
});
type: gcore:CloudSecret
properties:
expiration: string
name: string
payload:
certificateChainWo: string
certificateWo: string
privateKeyWo: string
payloadWoVersion: 0
projectId: 0
regionId: 0
CloudSecret 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 CloudSecret resource accepts the following input properties:
- Payload
Cloud
Secret Payload - Secret payload.
- Payload
Wo doubleVersion - Expiration string
- Datetime when the secret will expire. Defaults to None
- Name string
- Secret name
- Project
Id double - Project ID
- Region
Id double - Region ID
- Payload
Cloud
Secret Payload Args - Secret payload.
- Payload
Wo float64Version - Expiration string
- Datetime when the secret will expire. Defaults to None
- Name string
- Secret name
- Project
Id float64 - Project ID
- Region
Id float64 - Region ID
- payload
Cloud
Secret Payload - Secret payload.
- payload
Wo DoubleVersion - expiration String
- Datetime when the secret will expire. Defaults to None
- name String
- Secret name
- project
Id Double - Project ID
- region
Id Double - Region ID
- payload
Cloud
Secret Payload - Secret payload.
- payload
Wo numberVersion - expiration string
- Datetime when the secret will expire. Defaults to None
- name string
- Secret name
- project
Id number - Project ID
- region
Id number - Region ID
- payload
Cloud
Secret Payload Args - Secret payload.
- payload_
wo_ floatversion - expiration str
- Datetime when the secret will expire. Defaults to None
- name str
- Secret name
- project_
id float - Project ID
- region_
id float - Region ID
- payload Property Map
- Secret payload.
- payload
Wo NumberVersion - expiration String
- Datetime when the secret will expire. Defaults to None
- name String
- Secret name
- project
Id Number - Project ID
- region
Id Number - Region ID
Outputs
All input properties are implicitly available as output properties. Additionally, the CloudSecret resource produces the following output properties:
- Algorithm string
- Metadata provided by a user or system for informational purposes. Defaults to None
- Bit
Length double - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- Content
Types 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
- Id string
- The provider-assigned unique ID for this managed resource.
- Mode string
- Metadata provided by a user or system for informational purposes. Defaults to None
- Secret
Type 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
- Bit
Length float64 - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- Content
Types 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
- Id string
- The provider-assigned unique ID for this managed resource.
- Mode string
- Metadata provided by a user or system for informational purposes. Defaults to None
- Secret
Type 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
- bit
Length Double - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- content
Types 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
- id String
- The provider-assigned unique ID for this managed resource.
- mode String
- Metadata provided by a user or system for informational purposes. Defaults to None
- secret
Type 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
- bit
Length number - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- content
Types {[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
- id string
- The provider-assigned unique ID for this managed resource.
- mode string
- Metadata provided by a user or system for informational purposes. Defaults to None
- secret
Type 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
- id str
- The provider-assigned unique ID for this managed resource.
- mode str
- Metadata provided by a user or system for informational purposes. Defaults to None
- 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
- bit
Length Number - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- content
Types 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
- id String
- The provider-assigned unique ID for this managed resource.
- mode String
- Metadata provided by a user or system for informational purposes. Defaults to None
- secret
Type 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
Look up Existing CloudSecret Resource
Get an existing CloudSecret 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?: CloudSecretState, opts?: CustomResourceOptions): CloudSecret@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
algorithm: Optional[str] = None,
bit_length: Optional[float] = None,
content_types: Optional[Mapping[str, str]] = None,
created: Optional[str] = None,
expiration: Optional[str] = None,
mode: Optional[str] = None,
name: Optional[str] = None,
payload: Optional[CloudSecretPayloadArgs] = None,
payload_wo_version: Optional[float] = None,
project_id: Optional[float] = None,
region_id: Optional[float] = None,
secret_type: Optional[str] = None,
status: Optional[str] = None) -> CloudSecretfunc GetCloudSecret(ctx *Context, name string, id IDInput, state *CloudSecretState, opts ...ResourceOption) (*CloudSecret, error)public static CloudSecret Get(string name, Input<string> id, CloudSecretState? state, CustomResourceOptions? opts = null)public static CloudSecret get(String name, Output<String> id, CloudSecretState state, CustomResourceOptions options)resources: _: type: gcore:CloudSecret get: id: ${id}- 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.
- Algorithm string
- Metadata provided by a user or system for informational purposes. Defaults to None
- Bit
Length double - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- Content
Types 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. Defaults to None
- Mode string
- Metadata provided by a user or system for informational purposes. Defaults to None
- Name string
- Secret name
- Payload
Cloud
Secret Payload - Secret payload.
- Payload
Wo doubleVersion - Project
Id double - Project ID
- Region
Id double - Region ID
- Secret
Type 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
- Bit
Length float64 - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- Content
Types 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. Defaults to None
- Mode string
- Metadata provided by a user or system for informational purposes. Defaults to None
- Name string
- Secret name
- Payload
Cloud
Secret Payload Args - Secret payload.
- Payload
Wo float64Version - Project
Id float64 - Project ID
- Region
Id float64 - Region ID
- Secret
Type 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
- bit
Length Double - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- content
Types 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. Defaults to None
- mode String
- Metadata provided by a user or system for informational purposes. Defaults to None
- name String
- Secret name
- payload
Cloud
Secret Payload - Secret payload.
- payload
Wo DoubleVersion - project
Id Double - Project ID
- region
Id Double - Region ID
- secret
Type 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
- bit
Length number - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- content
Types {[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. Defaults to None
- mode string
- Metadata provided by a user or system for informational purposes. Defaults to None
- name string
- Secret name
- payload
Cloud
Secret Payload - Secret payload.
- payload
Wo numberVersion - project
Id number - Project ID
- region
Id number - Region ID
- secret
Type 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. Defaults to None
- mode str
- Metadata provided by a user or system for informational purposes. Defaults to None
- name str
- Secret name
- payload
Cloud
Secret Payload Args - Secret payload.
- payload_
wo_ floatversion - project_
id float - Project ID
- region_
id float - Region 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
- algorithm String
- Metadata provided by a user or system for informational purposes. Defaults to None
- bit
Length Number - Metadata provided by a user or system for informational purposes. Value must be greater than zero. Defaults to None
- content
Types 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. Defaults to None
- mode String
- Metadata provided by a user or system for informational purposes. Defaults to None
- name String
- Secret name
- payload Property Map
- Secret payload.
- payload
Wo NumberVersion - project
Id Number - Project ID
- region
Id Number - Region ID
- secret
Type 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
Supporting Types
CloudSecretPayload, CloudSecretPayloadArgs
- Certificate
Chain stringWo - SSL certificate chain of intermediates and root certificates in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- Certificate
Wo string - SSL certificate in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- Private
Key stringWo - SSL private key in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- Certificate
Chain stringWo - SSL certificate chain of intermediates and root certificates in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- Certificate
Wo string - SSL certificate in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- Private
Key stringWo - SSL private key in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- certificate
Chain StringWo - SSL certificate chain of intermediates and root certificates in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- certificate
Wo String - SSL certificate in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- private
Key StringWo - SSL private key in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- certificate
Chain stringWo - SSL certificate chain of intermediates and root certificates in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- certificate
Wo string - SSL certificate in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- private
Key stringWo - SSL private key in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- certificate_
chain_ strwo - SSL certificate chain of intermediates and root certificates in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- certificate_
wo str - SSL certificate in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- private_
key_ strwo - SSL private key in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- certificate
Chain StringWo - SSL certificate chain of intermediates and root certificates in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- certificate
Wo String - SSL certificate in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
- private
Key StringWo - SSL private key in PEM format. This is a write-only field — it will be sent to the API but never stored in state.
Import
$ pulumi import gcore:index/cloudSecret:CloudSecret example '<project_id>/<region_id>/<secret_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcoreTerraform Provider.
published on Tuesday, Mar 24, 2026 by g-core
