published on Monday, Apr 27, 2026 by g-core
published on Monday, Apr 27, 2026 by g-core
SSH keys enable secure access to SFTP storage by associating public keys with user accounts for authentication.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const exampleStorageSshKey = new gcore.StorageSshKey("example_storage_ssh_key", {
name: "my-production-key",
publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com",
});
import pulumi
import pulumi_gcore as gcore
example_storage_ssh_key = gcore.StorageSshKey("example_storage_ssh_key",
name="my-production-key",
public_key="ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com")
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.NewStorageSshKey(ctx, "example_storage_ssh_key", &gcore.StorageSshKeyArgs{
Name: pulumi.String("my-production-key"),
PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com"),
})
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 exampleStorageSshKey = new Gcore.StorageSshKey("example_storage_ssh_key", new()
{
Name = "my-production-key",
PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.StorageSshKey;
import com.pulumi.gcore.StorageSshKeyArgs;
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 exampleStorageSshKey = new StorageSshKey("exampleStorageSshKey", StorageSshKeyArgs.builder()
.name("my-production-key")
.publicKey("ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com")
.build());
}
}
resources:
exampleStorageSshKey:
type: gcore:StorageSshKey
name: example_storage_ssh_key
properties:
name: my-production-key
publicKey: ssh-rsa AAAAB3NzaC1yc2EAAA... user@example.com
Create StorageSshKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new StorageSshKey(name: string, args: StorageSshKeyArgs, opts?: CustomResourceOptions);@overload
def StorageSshKey(resource_name: str,
args: StorageSshKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def StorageSshKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
public_key: Optional[str] = None,
name: Optional[str] = None)func NewStorageSshKey(ctx *Context, name string, args StorageSshKeyArgs, opts ...ResourceOption) (*StorageSshKey, error)public StorageSshKey(string name, StorageSshKeyArgs args, CustomResourceOptions? opts = null)
public StorageSshKey(String name, StorageSshKeyArgs args)
public StorageSshKey(String name, StorageSshKeyArgs args, CustomResourceOptions options)
type: gcore:StorageSshKey
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 StorageSshKeyArgs
- 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 StorageSshKeyArgs
- 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 StorageSshKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args StorageSshKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args StorageSshKeyArgs
- 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 storageSshKeyResource = new Gcore.StorageSshKey("storageSshKeyResource", new()
{
PublicKey = "string",
Name = "string",
});
example, err := gcore.NewStorageSshKey(ctx, "storageSshKeyResource", &gcore.StorageSshKeyArgs{
PublicKey: pulumi.String("string"),
Name: pulumi.String("string"),
})
var storageSshKeyResource = new StorageSshKey("storageSshKeyResource", StorageSshKeyArgs.builder()
.publicKey("string")
.name("string")
.build());
storage_ssh_key_resource = gcore.StorageSshKey("storageSshKeyResource",
public_key="string",
name="string")
const storageSshKeyResource = new gcore.StorageSshKey("storageSshKeyResource", {
publicKey: "string",
name: "string",
});
type: gcore:StorageSshKey
properties:
name: string
publicKey: string
StorageSshKey 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 StorageSshKey resource accepts the following input properties:
- public_
key str - The SSH public key content (ssh-rsa or ssh-ed25519 format)
- name str
- User-defined name for the SSH key
Outputs
All input properties are implicitly available as output properties. Additionally, the StorageSshKey resource produces the following output properties:
- Created
At string - ISO 8601 timestamp when the SSH key was created
- Id string
- The provider-assigned unique ID for this managed resource.
- Storage
Ssh doubleKey Id - Unique identifier for the SSH key
- Created
At string - ISO 8601 timestamp when the SSH key was created
- Id string
- The provider-assigned unique ID for this managed resource.
- Storage
Ssh float64Key Id - Unique identifier for the SSH key
- created
At String - ISO 8601 timestamp when the SSH key was created
- id String
- The provider-assigned unique ID for this managed resource.
- storage
Ssh DoubleKey Id - Unique identifier for the SSH key
- created
At string - ISO 8601 timestamp when the SSH key was created
- id string
- The provider-assigned unique ID for this managed resource.
- storage
Ssh numberKey Id - Unique identifier for the SSH key
- created_
at str - ISO 8601 timestamp when the SSH key was created
- id str
- The provider-assigned unique ID for this managed resource.
- storage_
ssh_ floatkey_ id - Unique identifier for the SSH key
- created
At String - ISO 8601 timestamp when the SSH key was created
- id String
- The provider-assigned unique ID for this managed resource.
- storage
Ssh NumberKey Id - Unique identifier for the SSH key
Look up Existing StorageSshKey Resource
Get an existing StorageSshKey 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?: StorageSshKeyState, opts?: CustomResourceOptions): StorageSshKey@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
name: Optional[str] = None,
public_key: Optional[str] = None,
storage_ssh_key_id: Optional[float] = None) -> StorageSshKeyfunc GetStorageSshKey(ctx *Context, name string, id IDInput, state *StorageSshKeyState, opts ...ResourceOption) (*StorageSshKey, error)public static StorageSshKey Get(string name, Input<string> id, StorageSshKeyState? state, CustomResourceOptions? opts = null)public static StorageSshKey get(String name, Output<String> id, StorageSshKeyState state, CustomResourceOptions options)resources: _: type: gcore:StorageSshKey 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.
- Created
At string - ISO 8601 timestamp when the SSH key was created
- Name string
- User-defined name for the SSH key
- Public
Key string - The SSH public key content (ssh-rsa or ssh-ed25519 format)
- Storage
Ssh doubleKey Id - Unique identifier for the SSH key
- Created
At string - ISO 8601 timestamp when the SSH key was created
- Name string
- User-defined name for the SSH key
- Public
Key string - The SSH public key content (ssh-rsa or ssh-ed25519 format)
- Storage
Ssh float64Key Id - Unique identifier for the SSH key
- created
At String - ISO 8601 timestamp when the SSH key was created
- name String
- User-defined name for the SSH key
- public
Key String - The SSH public key content (ssh-rsa or ssh-ed25519 format)
- storage
Ssh DoubleKey Id - Unique identifier for the SSH key
- created
At string - ISO 8601 timestamp when the SSH key was created
- name string
- User-defined name for the SSH key
- public
Key string - The SSH public key content (ssh-rsa or ssh-ed25519 format)
- storage
Ssh numberKey Id - Unique identifier for the SSH key
- created_
at str - ISO 8601 timestamp when the SSH key was created
- name str
- User-defined name for the SSH key
- public_
key str - The SSH public key content (ssh-rsa or ssh-ed25519 format)
- storage_
ssh_ floatkey_ id - Unique identifier for the SSH key
- created
At String - ISO 8601 timestamp when the SSH key was created
- name String
- User-defined name for the SSH key
- public
Key String - The SSH public key content (ssh-rsa or ssh-ed25519 format)
- storage
Ssh NumberKey Id - Unique identifier for the SSH key
Import
The pulumi import command can be used, for example:
$ pulumi import gcore:index/storageSshKey:StorageSshKey example '<ssh_key_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 Monday, Apr 27, 2026 by g-core
