aws.lightsail.KeyPair
Explore with Pulumi AI
Provides a Lightsail Key Pair, for use with Lightsail Instances. These key pairs are separate from EC2 Key Pairs, and must be created or imported for use with Lightsail.
Note: Lightsail is currently only supported in a limited number of AWS Regions, please see “Regions and Availability Zones in Amazon Lightsail” for more details
Example Usage
Create New Key Pair
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create a new Lightsail Key Pair
const lgKeyPair = new aws.lightsail.KeyPair("lg_key_pair", {name: "lg_key_pair"});
import pulumi
import pulumi_aws as aws
# Create a new Lightsail Key Pair
lg_key_pair = aws.lightsail.KeyPair("lg_key_pair", name="lg_key_pair")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new Lightsail Key Pair
		_, err := lightsail.NewKeyPair(ctx, "lg_key_pair", &lightsail.KeyPairArgs{
			Name: pulumi.String("lg_key_pair"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    // Create a new Lightsail Key Pair
    var lgKeyPair = new Aws.LightSail.KeyPair("lg_key_pair", new()
    {
        Name = "lg_key_pair",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lightsail.KeyPair;
import com.pulumi.aws.lightsail.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) {
        // Create a new Lightsail Key Pair
        var lgKeyPair = new KeyPair("lgKeyPair", KeyPairArgs.builder()
            .name("lg_key_pair")
            .build());
    }
}
resources:
  # Create a new Lightsail Key Pair
  lgKeyPair:
    type: aws:lightsail:KeyPair
    name: lg_key_pair
    properties:
      name: lg_key_pair
Create New Key Pair with PGP Encrypted Private Key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const lgKeyPair = new aws.lightsail.KeyPair("lg_key_pair", {
    name: "lg_key_pair",
    pgpKey: "keybase:keybaseusername",
});
import pulumi
import pulumi_aws as aws
lg_key_pair = aws.lightsail.KeyPair("lg_key_pair",
    name="lg_key_pair",
    pgp_key="keybase:keybaseusername")
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := lightsail.NewKeyPair(ctx, "lg_key_pair", &lightsail.KeyPairArgs{
			Name:   pulumi.String("lg_key_pair"),
			PgpKey: pulumi.String("keybase:keybaseusername"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var lgKeyPair = new Aws.LightSail.KeyPair("lg_key_pair", new()
    {
        Name = "lg_key_pair",
        PgpKey = "keybase:keybaseusername",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lightsail.KeyPair;
import com.pulumi.aws.lightsail.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 lgKeyPair = new KeyPair("lgKeyPair", KeyPairArgs.builder()
            .name("lg_key_pair")
            .pgpKey("keybase:keybaseusername")
            .build());
    }
}
resources:
  lgKeyPair:
    type: aws:lightsail:KeyPair
    name: lg_key_pair
    properties:
      name: lg_key_pair
      pgpKey: keybase:keybaseusername
Existing Public Key Import
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const lgKeyPair = new aws.lightsail.KeyPair("lg_key_pair", {
    name: "importing",
    publicKey: std.file({
        input: "~/.ssh/id_rsa.pub",
    }).then(invoke => invoke.result),
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
lg_key_pair = aws.lightsail.KeyPair("lg_key_pair",
    name="importing",
    public_key=std.file(input="~/.ssh/id_rsa.pub").result)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		invokeFile, err := std.File(ctx, &std.FileArgs{
			Input: "~/.ssh/id_rsa.pub",
		}, nil)
		if err != nil {
			return err
		}
		_, err = lightsail.NewKeyPair(ctx, "lg_key_pair", &lightsail.KeyPairArgs{
			Name:      pulumi.String("importing"),
			PublicKey: pulumi.String(invokeFile.Result),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() => 
{
    var lgKeyPair = new Aws.LightSail.KeyPair("lg_key_pair", new()
    {
        Name = "importing",
        PublicKey = Std.File.Invoke(new()
        {
            Input = "~/.ssh/id_rsa.pub",
        }).Apply(invoke => invoke.Result),
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lightsail.KeyPair;
import com.pulumi.aws.lightsail.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 lgKeyPair = new KeyPair("lgKeyPair", KeyPairArgs.builder()
            .name("importing")
            .publicKey(StdFunctions.file(FileArgs.builder()
                .input("~/.ssh/id_rsa.pub")
                .build()).result())
            .build());
    }
}
resources:
  lgKeyPair:
    type: aws:lightsail:KeyPair
    name: lg_key_pair
    properties:
      name: importing
      publicKey:
        fn::invoke:
          function: std:file
          arguments:
            input: ~/.ssh/id_rsa.pub
          return: result
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,
            name_prefix: Optional[str] = None,
            pgp_key: Optional[str] = None,
            public_key: Optional[str] = None,
            tags: 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: aws:lightsail:KeyPair
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 KeyPairArgs
- 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 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 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 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 String
- The unique name of the resource.
- args 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 awsKeyPairResource = new Aws.LightSail.KeyPair("awsKeyPairResource", new()
{
    Name = "string",
    NamePrefix = "string",
    PgpKey = "string",
    PublicKey = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
example, err := lightsail.NewKeyPair(ctx, "awsKeyPairResource", &lightsail.KeyPairArgs{
	Name:       pulumi.String("string"),
	NamePrefix: pulumi.String("string"),
	PgpKey:     pulumi.String("string"),
	PublicKey:  pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
var awsKeyPairResource = new KeyPair("awsKeyPairResource", KeyPairArgs.builder()
    .name("string")
    .namePrefix("string")
    .pgpKey("string")
    .publicKey("string")
    .tags(Map.of("string", "string"))
    .build());
aws_key_pair_resource = aws.lightsail.KeyPair("awsKeyPairResource",
    name="string",
    name_prefix="string",
    pgp_key="string",
    public_key="string",
    tags={
        "string": "string",
    })
const awsKeyPairResource = new aws.lightsail.KeyPair("awsKeyPairResource", {
    name: "string",
    namePrefix: "string",
    pgpKey: "string",
    publicKey: "string",
    tags: {
        string: "string",
    },
});
type: aws:lightsail:KeyPair
properties:
    name: string
    namePrefix: string
    pgpKey: string
    publicKey: string
    tags:
        string: string
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 string
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- NamePrefix string
- PgpKey string
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- PublicKey string
- The public key material. This public key will be imported into Lightsail
- Dictionary<string, string>
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- Name string
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- NamePrefix string
- PgpKey string
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- PublicKey string
- The public key material. This public key will be imported into Lightsail
- map[string]string
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- name String
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- namePrefix String
- pgpKey String
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- publicKey String
- The public key material. This public key will be imported into Lightsail
- Map<String,String>
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- name string
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- namePrefix string
- pgpKey string
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- publicKey string
- The public key material. This public key will be imported into Lightsail
- {[key: string]: string}
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- name str
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- name_prefix str
- pgp_key str
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- public_key str
- The public key material. This public key will be imported into Lightsail
- Mapping[str, str]
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- name String
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- namePrefix String
- pgpKey String
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- publicKey String
- The public key material. This public key will be imported into Lightsail
- Map<String>
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
Outputs
All input properties are implicitly available as output properties. Additionally, the KeyPair resource produces the following output properties:
- Arn string
- The ARN of the Lightsail key pair.
- EncryptedFingerprint string
- The MD5 public key fingerprint for the encrypted private key.
- EncryptedPrivate stringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- Fingerprint string
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- Id string
- The provider-assigned unique ID for this managed resource.
- PrivateKey string
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- Dictionary<string, string>
- Arn string
- The ARN of the Lightsail key pair.
- EncryptedFingerprint string
- The MD5 public key fingerprint for the encrypted private key.
- EncryptedPrivate stringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- Fingerprint string
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- Id string
- The provider-assigned unique ID for this managed resource.
- PrivateKey string
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- map[string]string
- arn String
- The ARN of the Lightsail key pair.
- encryptedFingerprint String
- The MD5 public key fingerprint for the encrypted private key.
- encryptedPrivate StringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- fingerprint String
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- id String
- The provider-assigned unique ID for this managed resource.
- privateKey String
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- Map<String,String>
- arn string
- The ARN of the Lightsail key pair.
- encryptedFingerprint string
- The MD5 public key fingerprint for the encrypted private key.
- encryptedPrivate stringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- fingerprint string
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- id string
- The provider-assigned unique ID for this managed resource.
- privateKey string
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- {[key: string]: string}
- arn str
- The ARN of the Lightsail key pair.
- encrypted_fingerprint str
- The MD5 public key fingerprint for the encrypted private key.
- encrypted_private_ strkey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- fingerprint str
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- id str
- The provider-assigned unique ID for this managed resource.
- private_key str
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- Mapping[str, str]
- arn String
- The ARN of the Lightsail key pair.
- encryptedFingerprint String
- The MD5 public key fingerprint for the encrypted private key.
- encryptedPrivate StringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- fingerprint String
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- id String
- The provider-assigned unique ID for this managed resource.
- privateKey String
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- Map<String>
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,
        arn: Optional[str] = None,
        encrypted_fingerprint: Optional[str] = None,
        encrypted_private_key: Optional[str] = None,
        fingerprint: Optional[str] = None,
        name: Optional[str] = None,
        name_prefix: Optional[str] = None,
        pgp_key: Optional[str] = None,
        private_key: Optional[str] = None,
        public_key: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None) -> KeyPairfunc 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: aws:lightsail:KeyPair    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.
- Arn string
- The ARN of the Lightsail key pair.
- EncryptedFingerprint string
- The MD5 public key fingerprint for the encrypted private key.
- EncryptedPrivate stringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- Fingerprint string
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- Name string
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- NamePrefix string
- PgpKey string
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- PrivateKey string
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- PublicKey string
- The public key material. This public key will be imported into Lightsail
- Dictionary<string, string>
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- Dictionary<string, string>
- Arn string
- The ARN of the Lightsail key pair.
- EncryptedFingerprint string
- The MD5 public key fingerprint for the encrypted private key.
- EncryptedPrivate stringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- Fingerprint string
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- Name string
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- NamePrefix string
- PgpKey string
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- PrivateKey string
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- PublicKey string
- The public key material. This public key will be imported into Lightsail
- map[string]string
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- map[string]string
- arn String
- The ARN of the Lightsail key pair.
- encryptedFingerprint String
- The MD5 public key fingerprint for the encrypted private key.
- encryptedPrivate StringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- fingerprint String
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- name String
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- namePrefix String
- pgpKey String
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- privateKey String
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- publicKey String
- The public key material. This public key will be imported into Lightsail
- Map<String,String>
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- Map<String,String>
- arn string
- The ARN of the Lightsail key pair.
- encryptedFingerprint string
- The MD5 public key fingerprint for the encrypted private key.
- encryptedPrivate stringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- fingerprint string
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- name string
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- namePrefix string
- pgpKey string
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- privateKey string
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- publicKey string
- The public key material. This public key will be imported into Lightsail
- {[key: string]: string}
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- {[key: string]: string}
- arn str
- The ARN of the Lightsail key pair.
- encrypted_fingerprint str
- The MD5 public key fingerprint for the encrypted private key.
- encrypted_private_ strkey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- fingerprint str
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- name str
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- name_prefix str
- pgp_key str
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- private_key str
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- public_key str
- The public key material. This public key will be imported into Lightsail
- Mapping[str, str]
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- Mapping[str, str]
- arn String
- The ARN of the Lightsail key pair.
- encryptedFingerprint String
- The MD5 public key fingerprint for the encrypted private key.
- encryptedPrivate StringKey 
- the private key material, base 64 encoded and encrypted with the given pgp_key. This is only populated when creating a new key andpgp_keyis supplied.
- fingerprint String
- The MD5 public key fingerprint as specified in section 4 of RFC 4716.
- name String
- The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
- namePrefix String
- pgpKey String
- An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
- privateKey String
- the private key, base64 encoded. This is only populated when creating a new key, and when no pgp_keyis provided.
- publicKey String
- The public key material. This public key will be imported into Lightsail
- Map<String>
- A map of tags to assign to the collection. To create a key-only tag, use an empty string as the value. If configured with a provider - default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.- NOTE: a PGP key is not required, however it is strongly encouraged. Without a PGP key, the private key material will be stored in state unencrypted. - pgp_keyis ignored if- public_keyis supplied.
- Map<String>
Import
You cannot import Lightsail Key Pairs because the private and public key are only available on initial creation.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.