1. Packages
  2. Packages
  3. Gcore Provider
  4. API Docs
  5. StorageSshKey
Viewing docs for gcore 2.0.0-alpha.6
published on Monday, Apr 27, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.6
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:

    PublicKey string
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    Name string
    User-defined name for the SSH key
    PublicKey string
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    Name string
    User-defined name for the SSH key
    publicKey String
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    name String
    User-defined name for the SSH key
    publicKey string
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    name string
    User-defined name for the SSH key
    public_key str
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    name str
    User-defined name for the SSH key
    publicKey String
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    name String
    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:

    CreatedAt string
    ISO 8601 timestamp when the SSH key was created
    Id string
    The provider-assigned unique ID for this managed resource.
    StorageSshKeyId double
    Unique identifier for the SSH key
    CreatedAt string
    ISO 8601 timestamp when the SSH key was created
    Id string
    The provider-assigned unique ID for this managed resource.
    StorageSshKeyId float64
    Unique identifier for the SSH key
    createdAt String
    ISO 8601 timestamp when the SSH key was created
    id String
    The provider-assigned unique ID for this managed resource.
    storageSshKeyId Double
    Unique identifier for the SSH key
    createdAt string
    ISO 8601 timestamp when the SSH key was created
    id string
    The provider-assigned unique ID for this managed resource.
    storageSshKeyId number
    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_key_id float
    Unique identifier for the SSH key
    createdAt String
    ISO 8601 timestamp when the SSH key was created
    id String
    The provider-assigned unique ID for this managed resource.
    storageSshKeyId Number
    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) -> StorageSshKey
    func 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.
    The following state arguments are supported:
    CreatedAt string
    ISO 8601 timestamp when the SSH key was created
    Name string
    User-defined name for the SSH key
    PublicKey string
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    StorageSshKeyId double
    Unique identifier for the SSH key
    CreatedAt string
    ISO 8601 timestamp when the SSH key was created
    Name string
    User-defined name for the SSH key
    PublicKey string
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    StorageSshKeyId float64
    Unique identifier for the SSH key
    createdAt String
    ISO 8601 timestamp when the SSH key was created
    name String
    User-defined name for the SSH key
    publicKey String
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    storageSshKeyId Double
    Unique identifier for the SSH key
    createdAt string
    ISO 8601 timestamp when the SSH key was created
    name string
    User-defined name for the SSH key
    publicKey string
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    storageSshKeyId number
    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_key_id float
    Unique identifier for the SSH key
    createdAt String
    ISO 8601 timestamp when the SSH key was created
    name String
    User-defined name for the SSH key
    publicKey String
    The SSH public key content (ssh-rsa or ssh-ed25519 format)
    storageSshKeyId Number
    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 gcore Terraform Provider.
    Viewing docs for gcore 2.0.0-alpha.6
    published on Monday, Apr 27, 2026 by g-core
      Try Pulumi Cloud free. Your team will thank you.