published on Thursday, May 14, 2026 by Equinix
published on Thursday, May 14, 2026 by Equinix
Deprecation Notice Equinix Metal will reach end of life on June 30, 2026. All Metal data sources will be removed in version 5.0.0 of this provider. Use version 4.x of this provider for continued use through sunset. See https://docs.equinix.com/metal/ for more information.
Use this datasource to retrieve attributes of a Project SSH Key API resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@pulumi/equinix";
const myKey = equinix.metal.getProjectSshKey({
search: "username@hostname",
projectId: local.project_id,
});
import pulumi
import pulumi_equinix as equinix
my_key = equinix.metal.get_project_ssh_key(search="username@hostname",
project_id=local["project_id"])
package main
import (
"github.com/equinix/pulumi-equinix/sdk/go/equinix/metal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := metal.LookupProjectSshKey(ctx, &metal.LookupProjectSshKeyArgs{
Search: pulumi.StringRef("username@hostname"),
ProjectId: local.Project_id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;
return await Deployment.RunAsync(() =>
{
var myKey = Equinix.Metal.GetProjectSshKey.Invoke(new()
{
Search = "username@hostname",
ProjectId = local.Project_id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.equinix.metal.MetalFunctions;
import com.pulumi.equinix.metal.inputs.GetProjectSshKeyArgs;
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 myKey = MetalFunctions.getProjectSshKey(GetProjectSshKeyArgs.builder()
.search("username@hostname")
.projectId(local.project_id())
.build());
}
}
variables:
myKey:
fn::invoke:
function: equinix:metal:getProjectSshKey
arguments:
search: username@hostname
projectId: ${local.project_id}
Example coming soon!
Using getProjectSshKey
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 getProjectSshKey(args: GetProjectSshKeyArgs, opts?: InvokeOptions): Promise<GetProjectSshKeyResult>
function getProjectSshKeyOutput(args: GetProjectSshKeyOutputArgs, opts?: InvokeOptions): Output<GetProjectSshKeyResult>def get_project_ssh_key(id: Optional[str] = None,
project_id: Optional[str] = None,
search: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectSshKeyResult
def get_project_ssh_key_output(id: pulumi.Input[Optional[str]] = None,
project_id: pulumi.Input[Optional[str]] = None,
search: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProjectSshKeyResult]func LookupProjectSshKey(ctx *Context, args *LookupProjectSshKeyArgs, opts ...InvokeOption) (*LookupProjectSshKeyResult, error)
func LookupProjectSshKeyOutput(ctx *Context, args *LookupProjectSshKeyOutputArgs, opts ...InvokeOption) LookupProjectSshKeyResultOutput> Note: This function is named LookupProjectSshKey in the Go SDK.
public static class GetProjectSshKey
{
public static Task<GetProjectSshKeyResult> InvokeAsync(GetProjectSshKeyArgs args, InvokeOptions? opts = null)
public static Output<GetProjectSshKeyResult> Invoke(GetProjectSshKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetProjectSshKeyResult> getProjectSshKey(GetProjectSshKeyArgs args, InvokeOptions options)
public static Output<GetProjectSshKeyResult> getProjectSshKey(GetProjectSshKeyArgs args, InvokeOptions options)
fn::invoke:
function: equinix:metal/getProjectSshKey:getProjectSshKey
arguments:
# arguments dictionarydata "equinix_metal_getprojectsshkey" "name" {
# arguments
}The following arguments are supported:
- Project
Id string The Equinix Metal project id of the Equinix Metal SSH Key.
NOTE: One of either
searchoridmust be provided along withproject_id.- Id string
- The id of the SSH Key to search for in the Equinix Metal project.
- Search string
- The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project.
- Project
Id string The Equinix Metal project id of the Equinix Metal SSH Key.
NOTE: One of either
searchoridmust be provided along withproject_id.- Id string
- The id of the SSH Key to search for in the Equinix Metal project.
- Search string
- The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project.
- project_
id string The Equinix Metal project id of the Equinix Metal SSH Key.
NOTE: One of either
searchoridmust be provided along withproject_id.- id string
- The id of the SSH Key to search for in the Equinix Metal project.
- search string
- The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project.
- project
Id String The Equinix Metal project id of the Equinix Metal SSH Key.
NOTE: One of either
searchoridmust be provided along withproject_id.- id String
- The id of the SSH Key to search for in the Equinix Metal project.
- search String
- The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project.
- project
Id string The Equinix Metal project id of the Equinix Metal SSH Key.
NOTE: One of either
searchoridmust be provided along withproject_id.- id string
- The id of the SSH Key to search for in the Equinix Metal project.
- search string
- The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project.
- project_
id str The Equinix Metal project id of the Equinix Metal SSH Key.
NOTE: One of either
searchoridmust be provided along withproject_id.- id str
- The id of the SSH Key to search for in the Equinix Metal project.
- search str
- The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project.
- project
Id String The Equinix Metal project id of the Equinix Metal SSH Key.
NOTE: One of either
searchoridmust be provided along withproject_id.- id String
- The id of the SSH Key to search for in the Equinix Metal project.
- search String
- The name, fingerprint, or public_key of the SSH Key to search for in the Equinix Metal project.
getProjectSshKey Result
The following output properties are available:
- Created string
- The timestamp for when the SSH key was created.
- Fingerprint string
- The fingerprint of the SSH key.
- Id string
- The unique ID of the key.
- Name string
- The name of the SSH key.
- Owner
Id string - The ID of parent project (same as project_id).
- Project
Id string - The ID of parent project.
- Public
Key string - The text of the public key.
- Updated string
- The timestamp for the last time the SSH key was updated.
- Search string
- Created string
- The timestamp for when the SSH key was created.
- Fingerprint string
- The fingerprint of the SSH key.
- Id string
- The unique ID of the key.
- Name string
- The name of the SSH key.
- Owner
Id string - The ID of parent project (same as project_id).
- Project
Id string - The ID of parent project.
- Public
Key string - The text of the public key.
- Updated string
- The timestamp for the last time the SSH key was updated.
- Search string
- created string
- The timestamp for when the SSH key was created.
- fingerprint string
- The fingerprint of the SSH key.
- id string
- The unique ID of the key.
- name string
- The name of the SSH key.
- owner_
id string - The ID of parent project (same as project_id).
- project_
id string - The ID of parent project.
- public_
key string - The text of the public key.
- updated string
- The timestamp for the last time the SSH key was updated.
- search string
- created String
- The timestamp for when the SSH key was created.
- fingerprint String
- The fingerprint of the SSH key.
- id String
- The unique ID of the key.
- name String
- The name of the SSH key.
- owner
Id String - The ID of parent project (same as project_id).
- project
Id String - The ID of parent project.
- public
Key String - The text of the public key.
- updated String
- The timestamp for the last time the SSH key was updated.
- search String
- created string
- The timestamp for when the SSH key was created.
- fingerprint string
- The fingerprint of the SSH key.
- id string
- The unique ID of the key.
- name string
- The name of the SSH key.
- owner
Id string - The ID of parent project (same as project_id).
- project
Id string - The ID of parent project.
- public
Key string - The text of the public key.
- updated string
- The timestamp for the last time the SSH key was updated.
- search string
- created str
- The timestamp for when the SSH key was created.
- fingerprint str
- The fingerprint of the SSH key.
- id str
- The unique ID of the key.
- name str
- The name of the SSH key.
- owner_
id str - The ID of parent project (same as project_id).
- project_
id str - The ID of parent project.
- public_
key str - The text of the public key.
- updated str
- The timestamp for the last time the SSH key was updated.
- search str
- created String
- The timestamp for when the SSH key was created.
- fingerprint String
- The fingerprint of the SSH key.
- id String
- The unique ID of the key.
- name String
- The name of the SSH key.
- owner
Id String - The ID of parent project (same as project_id).
- project
Id String - The ID of parent project.
- public
Key String - The text of the public key.
- updated String
- The timestamp for the last time the SSH key was updated.
- search String
Package Details
- Repository
- equinix equinix/pulumi-equinix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
equinixTerraform Provider.
published on Thursday, May 14, 2026 by Equinix
