GetKeypair

Use this data source to get the ID and public key of an OpenStack keypair.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var kp = Output.Create(OpenStack.Compute.GetKeypair.InvokeAsync(new OpenStack.Compute.GetKeypairArgs
        {
            Name = "sand",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

kp = openstack.compute.get_keypair(name="sand")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const kp = pulumi.output(openstack.compute.getKeypair({
    name: "sand",
}, { async: true }));

Using GetKeypair

function getKeypair(args: GetKeypairArgs, opts?: InvokeOptions): Promise<GetKeypairResult>
function  get_keypair(name=None, region=None, opts=None)
func LookupKeypair(ctx *Context, args *LookupKeypairArgs, opts ...InvokeOption) (*LookupKeypairResult, error)

Note: This function is named LookupKeypair in the Go SDK.

public static class GetKeypair {
    public static Task<GetKeypairResult> InvokeAsync(GetKeypairArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The unique name of the keypair.

Region string

The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.

Name string

The unique name of the keypair.

Region string

The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.

name string

The unique name of the keypair.

region string

The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.

name str

The unique name of the keypair.

region str

The region in which to obtain the V2 Compute client. If omitted, the region argument of the provider is used.

GetKeypair Result

The following output properties are available:

Fingerprint string

The fingerprint of the OpenSSH key.

Id string

The provider-assigned unique ID for this managed resource.

Name string

See Argument Reference above.

PublicKey string

The OpenSSH-formatted public key of the keypair.

Region string

See Argument Reference above.

Fingerprint string

The fingerprint of the OpenSSH key.

Id string

The provider-assigned unique ID for this managed resource.

Name string

See Argument Reference above.

PublicKey string

The OpenSSH-formatted public key of the keypair.

Region string

See Argument Reference above.

fingerprint string

The fingerprint of the OpenSSH key.

id string

The provider-assigned unique ID for this managed resource.

name string

See Argument Reference above.

publicKey string

The OpenSSH-formatted public key of the keypair.

region string

See Argument Reference above.

fingerprint str

The fingerprint of the OpenSSH key.

id str

The provider-assigned unique ID for this managed resource.

name str

See Argument Reference above.

public_key str

The OpenSSH-formatted public key of the keypair.

region str

See Argument Reference above.

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.