1. Packages
  2. Openstack Provider
  3. API Docs
  4. compute
  5. Keypair
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.compute.Keypair

Explore with Pulumi AI

Example Usage

Import an Existing Public Key

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const test_keypair = new openstack.compute.Keypair("test-keypair", {
    name: "my-keypair",
    publicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLotBCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAnOfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZqd9LvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TaIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIF61p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB",
});
Copy
import pulumi
import pulumi_openstack as openstack

test_keypair = openstack.compute.Keypair("test-keypair",
    name="my-keypair",
    public_key="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLotBCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAnOfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZqd9LvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TaIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIF61p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB")
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.NewKeypair(ctx, "test-keypair", &compute.KeypairArgs{
			Name:      pulumi.String("my-keypair"),
			PublicKey: pulumi.String("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLotBCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAnOfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZqd9LvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TaIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIF61p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var test_keypair = new OpenStack.Compute.Keypair("test-keypair", new()
    {
        Name = "my-keypair",
        PublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLotBCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAnOfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZqd9LvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TaIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIF61p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.compute.Keypair;
import com.pulumi.openstack.compute.KeypairArgs;
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 test_keypair = new Keypair("test-keypair", KeypairArgs.builder()
            .name("my-keypair")
            .publicKey("ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLotBCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAnOfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZqd9LvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TaIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIF61p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB")
            .build());

    }
}
Copy
resources:
  test-keypair:
    type: openstack:compute:Keypair
    properties:
      name: my-keypair
      publicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAjpC1hwiOCCmKEWxJ4qzTTsJbKzndLotBCz5PcwtUnflmU+gHJtWMZKpuEGVi29h0A/+ydKek1O18k10Ff+4tyFjiHDQAnOfgWf7+b1yK+qDip3X1C0UPMbwHlTfSGWLGZqd9LvEFx9k3h/M+VtMvwR1lJ9LUyTAImnNjWG7TaIPmui30HvM2UiFEmqkr4ijq45MyX2+fLIePLRIF61p4whjHAQYufqyno3BS48icQb4p6iVEZPo4AE2o9oIyQvj2mx4dk5Y8CgSETOZTYDOR3rU2fZTRDRgPJDH9FWvQjF5tA0p3d9CoWWd2s6GKKbfoUIi8R/Db1BSPJwkqB
Copy

Generate a Public/Private Key Pair

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const test_keypair = new openstack.compute.Keypair("test-keypair", {name: "my-keypair"});
Copy
import pulumi
import pulumi_openstack as openstack

test_keypair = openstack.compute.Keypair("test-keypair", name="my-keypair")
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := compute.NewKeypair(ctx, "test-keypair", &compute.KeypairArgs{
			Name: pulumi.String("my-keypair"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var test_keypair = new OpenStack.Compute.Keypair("test-keypair", new()
    {
        Name = "my-keypair",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.compute.Keypair;
import com.pulumi.openstack.compute.KeypairArgs;
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 test_keypair = new Keypair("test-keypair", KeypairArgs.builder()
            .name("my-keypair")
            .build());

    }
}
Copy
resources:
  test-keypair:
    type: openstack:compute:Keypair
    properties:
      name: my-keypair
Copy

Create Keypair Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Keypair(name: string, args?: KeypairArgs, opts?: CustomResourceOptions);
@overload
def Keypair(resource_name: str,
            args: Optional[KeypairArgs] = None,
            opts: Optional[ResourceOptions] = None)

@overload
def Keypair(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            public_key: Optional[str] = None,
            region: Optional[str] = None,
            user_id: Optional[str] = None,
            value_specs: Optional[Mapping[str, str]] = None)
func NewKeypair(ctx *Context, name string, args *KeypairArgs, opts ...ResourceOption) (*Keypair, error)
public Keypair(string name, KeypairArgs? args = null, CustomResourceOptions? opts = null)
public Keypair(String name, KeypairArgs args)
public Keypair(String name, KeypairArgs args, CustomResourceOptions options)
type: openstack:compute:Keypair
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args KeypairArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args KeypairArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args KeypairArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args KeypairArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. KeypairArgs
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 keypairResource = new OpenStack.Compute.Keypair("keypairResource", new()
{
    Name = "string",
    PublicKey = "string",
    Region = "string",
    UserId = "string",
    ValueSpecs = 
    {
        { "string", "string" },
    },
});
Copy
example, err := compute.NewKeypair(ctx, "keypairResource", &compute.KeypairArgs{
	Name:      pulumi.String("string"),
	PublicKey: pulumi.String("string"),
	Region:    pulumi.String("string"),
	UserId:    pulumi.String("string"),
	ValueSpecs: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var keypairResource = new Keypair("keypairResource", KeypairArgs.builder()
    .name("string")
    .publicKey("string")
    .region("string")
    .userId("string")
    .valueSpecs(Map.of("string", "string"))
    .build());
Copy
keypair_resource = openstack.compute.Keypair("keypairResource",
    name="string",
    public_key="string",
    region="string",
    user_id="string",
    value_specs={
        "string": "string",
    })
Copy
const keypairResource = new openstack.compute.Keypair("keypairResource", {
    name: "string",
    publicKey: "string",
    region: "string",
    userId: "string",
    valueSpecs: {
        string: "string",
    },
});
Copy
type: openstack:compute:Keypair
properties:
    name: string
    publicKey: string
    region: string
    userId: string
    valueSpecs:
        string: string
Copy

Keypair 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 Keypair resource accepts the following input properties:

Name Changes to this property will trigger replacement. string
A unique name for the keypair. Changing this creates a new keypair.
PublicKey Changes to this property will trigger replacement. string
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
UserId Changes to this property will trigger replacement. string
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
ValueSpecs Changes to this property will trigger replacement. Dictionary<string, string>
Map of additional options.
Name Changes to this property will trigger replacement. string
A unique name for the keypair. Changing this creates a new keypair.
PublicKey Changes to this property will trigger replacement. string
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
UserId Changes to this property will trigger replacement. string
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
ValueSpecs Changes to this property will trigger replacement. map[string]string
Map of additional options.
name Changes to this property will trigger replacement. String
A unique name for the keypair. Changing this creates a new keypair.
publicKey Changes to this property will trigger replacement. String
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
userId Changes to this property will trigger replacement. String
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
valueSpecs Changes to this property will trigger replacement. Map<String,String>
Map of additional options.
name Changes to this property will trigger replacement. string
A unique name for the keypair. Changing this creates a new keypair.
publicKey Changes to this property will trigger replacement. string
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
userId Changes to this property will trigger replacement. string
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
valueSpecs Changes to this property will trigger replacement. {[key: string]: string}
Map of additional options.
name Changes to this property will trigger replacement. str
A unique name for the keypair. Changing this creates a new keypair.
public_key Changes to this property will trigger replacement. str
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
region Changes to this property will trigger replacement. str
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
user_id Changes to this property will trigger replacement. str
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
value_specs Changes to this property will trigger replacement. Mapping[str, str]
Map of additional options.
name Changes to this property will trigger replacement. String
A unique name for the keypair. Changing this creates a new keypair.
publicKey Changes to this property will trigger replacement. String
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
userId Changes to this property will trigger replacement. String
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
valueSpecs Changes to this property will trigger replacement. Map<String>
Map of additional options.

Outputs

All input properties are implicitly available as output properties. Additionally, the Keypair resource produces the following output properties:

Fingerprint string
The fingerprint of the public key.
Id string
The provider-assigned unique ID for this managed resource.
PrivateKey string
The generated private key when no public key is specified.
Fingerprint string
The fingerprint of the public key.
Id string
The provider-assigned unique ID for this managed resource.
PrivateKey string
The generated private key when no public key is specified.
fingerprint String
The fingerprint of the public key.
id String
The provider-assigned unique ID for this managed resource.
privateKey String
The generated private key when no public key is specified.
fingerprint string
The fingerprint of the public key.
id string
The provider-assigned unique ID for this managed resource.
privateKey string
The generated private key when no public key is specified.
fingerprint str
The fingerprint of the public key.
id str
The provider-assigned unique ID for this managed resource.
private_key str
The generated private key when no public key is specified.
fingerprint String
The fingerprint of the public key.
id String
The provider-assigned unique ID for this managed resource.
privateKey String
The generated private key when no public key is specified.

Look up Existing Keypair Resource

Get an existing Keypair 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?: KeypairState, opts?: CustomResourceOptions): Keypair
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        fingerprint: Optional[str] = None,
        name: Optional[str] = None,
        private_key: Optional[str] = None,
        public_key: Optional[str] = None,
        region: Optional[str] = None,
        user_id: Optional[str] = None,
        value_specs: Optional[Mapping[str, str]] = None) -> Keypair
func GetKeypair(ctx *Context, name string, id IDInput, state *KeypairState, opts ...ResourceOption) (*Keypair, error)
public static Keypair Get(string name, Input<string> id, KeypairState? state, CustomResourceOptions? opts = null)
public static Keypair get(String name, Output<String> id, KeypairState state, CustomResourceOptions options)
resources:  _:    type: openstack:compute:Keypair    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Fingerprint string
The fingerprint of the public key.
Name Changes to this property will trigger replacement. string
A unique name for the keypair. Changing this creates a new keypair.
PrivateKey string
The generated private key when no public key is specified.
PublicKey Changes to this property will trigger replacement. string
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
UserId Changes to this property will trigger replacement. string
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
ValueSpecs Changes to this property will trigger replacement. Dictionary<string, string>
Map of additional options.
Fingerprint string
The fingerprint of the public key.
Name Changes to this property will trigger replacement. string
A unique name for the keypair. Changing this creates a new keypair.
PrivateKey string
The generated private key when no public key is specified.
PublicKey Changes to this property will trigger replacement. string
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
UserId Changes to this property will trigger replacement. string
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
ValueSpecs Changes to this property will trigger replacement. map[string]string
Map of additional options.
fingerprint String
The fingerprint of the public key.
name Changes to this property will trigger replacement. String
A unique name for the keypair. Changing this creates a new keypair.
privateKey String
The generated private key when no public key is specified.
publicKey Changes to this property will trigger replacement. String
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
userId Changes to this property will trigger replacement. String
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
valueSpecs Changes to this property will trigger replacement. Map<String,String>
Map of additional options.
fingerprint string
The fingerprint of the public key.
name Changes to this property will trigger replacement. string
A unique name for the keypair. Changing this creates a new keypair.
privateKey string
The generated private key when no public key is specified.
publicKey Changes to this property will trigger replacement. string
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
region Changes to this property will trigger replacement. string
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
userId Changes to this property will trigger replacement. string
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
valueSpecs Changes to this property will trigger replacement. {[key: string]: string}
Map of additional options.
fingerprint str
The fingerprint of the public key.
name Changes to this property will trigger replacement. str
A unique name for the keypair. Changing this creates a new keypair.
private_key str
The generated private key when no public key is specified.
public_key Changes to this property will trigger replacement. str
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
region Changes to this property will trigger replacement. str
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
user_id Changes to this property will trigger replacement. str
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
value_specs Changes to this property will trigger replacement. Mapping[str, str]
Map of additional options.
fingerprint String
The fingerprint of the public key.
name Changes to this property will trigger replacement. String
A unique name for the keypair. Changing this creates a new keypair.
privateKey String
The generated private key when no public key is specified.
publicKey Changes to this property will trigger replacement. String
A pregenerated OpenSSH-formatted public key. Changing this creates a new keypair. If a public key is not specified, then a public/private key pair will be automatically generated. If a pair is created, then destroying this resource means you will lose access to that keypair forever.
region Changes to this property will trigger replacement. String
The region in which to obtain the V2 Compute client. Keypairs are associated with accounts, but a Compute client is needed to create one. If omitted, the region argument of the provider is used. Changing this creates a new keypair.
userId Changes to this property will trigger replacement. String
This allows administrative users to operate key-pairs of specified user ID. For this feature your need to have openstack microversion 2.10 (Liberty) or later.
valueSpecs Changes to this property will trigger replacement. Map<String>
Map of additional options.

Import

Keypairs can be imported using the name, e.g.

$ pulumi import openstack:compute/keypair:Keypair my-keypair test-keypair
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
OpenStack pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.