Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
SSH key pairs provide secure authentication to cloud instances, supporting both generated and imported public keys.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const exampleCloudSshKey = gcore.getCloudSshKey({
projectId: 1,
sshKeyId: "36a7a97a-0672-4911-8f2b-92cd4e5b0d91",
});
import pulumi
import pulumi_gcore as gcore
example_cloud_ssh_key = gcore.get_cloud_ssh_key(project_id=1,
ssh_key_id="36a7a97a-0672-4911-8f2b-92cd4e5b0d91")
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.LookupCloudSshKey(ctx, &gcore.LookupCloudSshKeyArgs{
ProjectId: pulumi.Float64Ref(1),
SshKeyId: pulumi.StringRef("36a7a97a-0672-4911-8f2b-92cd4e5b0d91"),
}, 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 exampleCloudSshKey = Gcore.GetCloudSshKey.Invoke(new()
{
ProjectId = 1,
SshKeyId = "36a7a97a-0672-4911-8f2b-92cd4e5b0d91",
});
});
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.GetCloudSshKeyArgs;
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 exampleCloudSshKey = GcoreFunctions.getCloudSshKey(GetCloudSshKeyArgs.builder()
.projectId(1)
.sshKeyId("36a7a97a-0672-4911-8f2b-92cd4e5b0d91")
.build());
}
}
variables:
exampleCloudSshKey:
fn::invoke:
function: gcore:getCloudSshKey
arguments:
projectId: 1
sshKeyId: 36a7a97a-0672-4911-8f2b-92cd4e5b0d91
Using getCloudSshKey
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 getCloudSshKey(args: GetCloudSshKeyArgs, opts?: InvokeOptions): Promise<GetCloudSshKeyResult>
function getCloudSshKeyOutput(args: GetCloudSshKeyOutputArgs, opts?: InvokeOptions): Output<GetCloudSshKeyResult>def get_cloud_ssh_key(find_one_by: Optional[GetCloudSshKeyFindOneBy] = None,
project_id: Optional[float] = None,
ssh_key_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudSshKeyResult
def get_cloud_ssh_key_output(find_one_by: Optional[pulumi.Input[GetCloudSshKeyFindOneByArgs]] = None,
project_id: Optional[pulumi.Input[float]] = None,
ssh_key_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudSshKeyResult]func LookupCloudSshKey(ctx *Context, args *LookupCloudSshKeyArgs, opts ...InvokeOption) (*LookupCloudSshKeyResult, error)
func LookupCloudSshKeyOutput(ctx *Context, args *LookupCloudSshKeyOutputArgs, opts ...InvokeOption) LookupCloudSshKeyResultOutput> Note: This function is named LookupCloudSshKey in the Go SDK.
public static class GetCloudSshKey
{
public static Task<GetCloudSshKeyResult> InvokeAsync(GetCloudSshKeyArgs args, InvokeOptions? opts = null)
public static Output<GetCloudSshKeyResult> Invoke(GetCloudSshKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudSshKeyResult> getCloudSshKey(GetCloudSshKeyArgs args, InvokeOptions options)
public static Output<GetCloudSshKeyResult> getCloudSshKey(GetCloudSshKeyArgs args, InvokeOptions options)
fn::invoke:
function: gcore:index/getCloudSshKey:getCloudSshKey
arguments:
# arguments dictionaryThe following arguments are supported:
- Find
One GetBy Cloud Ssh Key Find One By - Project
Id double - Project ID
- Ssh
Key stringId - SSH key ID
- Find
One GetBy Cloud Ssh Key Find One By - Project
Id float64 - Project ID
- Ssh
Key stringId - SSH key ID
- find
One GetBy Cloud Ssh Key Find One By - project
Id Double - Project ID
- ssh
Key StringId - SSH key ID
- find
One GetBy Cloud Ssh Key Find One By - project
Id number - Project ID
- ssh
Key stringId - SSH key ID
- find_
one_ Getby Cloud Ssh Key Find One By - project_
id float - Project ID
- ssh_
key_ strid - SSH key ID
- find
One Property MapBy - project
Id Number - Project ID
- ssh
Key StringId - SSH key ID
getCloudSshKey Result
The following output properties are available:
- Created
At string - SSH key creation time
- Fingerprint string
- Fingerprint
- Id string
- SSH key ID
- Name string
- SSH key name
- Public
Key string - The public part of an SSH key is the shareable portion of an SSH key pair. It can be safely sent to servers or services to grant access. It does not contain sensitive information.
- bool
- SSH key will be visible to all users in the project
- State string
- SSH key state Available values: "ACTIVE", "DELETING".
- Find
One GetBy Cloud Ssh Key Find One By - Project
Id double - Project ID
- Ssh
Key stringId - SSH key ID
- Created
At string - SSH key creation time
- Fingerprint string
- Fingerprint
- Id string
- SSH key ID
- Name string
- SSH key name
- Public
Key string - The public part of an SSH key is the shareable portion of an SSH key pair. It can be safely sent to servers or services to grant access. It does not contain sensitive information.
- bool
- SSH key will be visible to all users in the project
- State string
- SSH key state Available values: "ACTIVE", "DELETING".
- Find
One GetBy Cloud Ssh Key Find One By - Project
Id float64 - Project ID
- Ssh
Key stringId - SSH key ID
- created
At String - SSH key creation time
- fingerprint String
- Fingerprint
- id String
- SSH key ID
- name String
- SSH key name
- public
Key String - The public part of an SSH key is the shareable portion of an SSH key pair. It can be safely sent to servers or services to grant access. It does not contain sensitive information.
- Boolean
- SSH key will be visible to all users in the project
- state String
- SSH key state Available values: "ACTIVE", "DELETING".
- find
One GetBy Cloud Ssh Key Find One By - project
Id Double - Project ID
- ssh
Key StringId - SSH key ID
- created
At string - SSH key creation time
- fingerprint string
- Fingerprint
- id string
- SSH key ID
- name string
- SSH key name
- public
Key string - The public part of an SSH key is the shareable portion of an SSH key pair. It can be safely sent to servers or services to grant access. It does not contain sensitive information.
- boolean
- SSH key will be visible to all users in the project
- state string
- SSH key state Available values: "ACTIVE", "DELETING".
- find
One GetBy Cloud Ssh Key Find One By - project
Id number - Project ID
- ssh
Key stringId - SSH key ID
- created_
at str - SSH key creation time
- fingerprint str
- Fingerprint
- id str
- SSH key ID
- name str
- SSH key name
- public_
key str - The public part of an SSH key is the shareable portion of an SSH key pair. It can be safely sent to servers or services to grant access. It does not contain sensitive information.
- bool
- SSH key will be visible to all users in the project
- state str
- SSH key state Available values: "ACTIVE", "DELETING".
- find_
one_ Getby Cloud Ssh Key Find One By - project_
id float - Project ID
- ssh_
key_ strid - SSH key ID
- created
At String - SSH key creation time
- fingerprint String
- Fingerprint
- id String
- SSH key ID
- name String
- SSH key name
- public
Key String - The public part of an SSH key is the shareable portion of an SSH key pair. It can be safely sent to servers or services to grant access. It does not contain sensitive information.
- Boolean
- SSH key will be visible to all users in the project
- state String
- SSH key state Available values: "ACTIVE", "DELETING".
- find
One Property MapBy - project
Id Number - Project ID
- ssh
Key StringId - SSH key ID
Supporting Types
GetCloudSshKeyFindOneBy
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcoreTerraform Provider.
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
published on Tuesday, Mar 24, 2026 by g-core
