aws.lightsail.KeyPair
Explore with Pulumi AI
Manages a Lightsail Key Pair for use with Lightsail Instances. Use this resource to create or import key pairs that are separate from EC2 Key Pairs and required for Lightsail instances.
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";
const example = new aws.lightsail.KeyPair("example", {name: "example"});
import pulumi
import pulumi_aws as aws
example = aws.lightsail.KeyPair("example", name="example")
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, "example", &lightsail.KeyPairArgs{
Name: pulumi.String("example"),
})
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 example = new Aws.LightSail.KeyPair("example", new()
{
Name = "example",
});
});
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 example = new KeyPair("example", KeyPairArgs.builder()
.name("example")
.build());
}
}
resources:
example:
type: aws:lightsail:KeyPair
properties:
name: example
Create New Key Pair with PGP Encrypted Private Key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lightsail.KeyPair("example", {
name: "example",
pgpKey: "keybase:keybaseusername",
});
import pulumi
import pulumi_aws as aws
example = aws.lightsail.KeyPair("example",
name="example",
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, "example", &lightsail.KeyPairArgs{
Name: pulumi.String("example"),
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 example = new Aws.LightSail.KeyPair("example", new()
{
Name = "example",
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 example = new KeyPair("example", KeyPairArgs.builder()
.name("example")
.pgpKey("keybase:keybaseusername")
.build());
}
}
resources:
example:
type: aws:lightsail:KeyPair
properties:
name: example
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 example = new aws.lightsail.KeyPair("example", {
name: "example",
publicKey: std.file({
input: "~/.ssh/id_rsa.pub",
}).then(invoke => invoke.result),
});
import pulumi
import pulumi_aws as aws
import pulumi_std as std
example = aws.lightsail.KeyPair("example",
name="example",
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, "example", &lightsail.KeyPairArgs{
Name: pulumi.String("example"),
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 example = new Aws.LightSail.KeyPair("example", new()
{
Name = "example",
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 com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.FileArgs;
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 example = new KeyPair("example", KeyPairArgs.builder()
.name("example")
.publicKey(StdFunctions.file(FileArgs.builder()
.input("~/.ssh/id_rsa.pub")
.build()).result())
.build());
}
}
resources:
example:
type: aws:lightsail:KeyPair
properties:
name: example
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 com.pulumi.aws.lightsail.KeyPair("awsKeyPairResource", com.pulumi.aws.lightsail.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
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Pgp
Key string - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- Public
Key string - Public key material. This public key will be imported into Lightsail.
- Dictionary<string, string>
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.
- Name string
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Pgp
Key string - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- Public
Key string - Public key material. This public key will be imported into Lightsail.
- map[string]string
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.
- name String
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - pgp
Key String - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- public
Key String - Public key material. This public key will be imported into Lightsail.
- Map<String,String>
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.
- name string
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - pgp
Key string - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- public
Key string - Public key material. This public key will be imported into Lightsail.
- {[key: string]: string}
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.
- name str
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - name_
prefix str - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - pgp_
key str - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- public_
key str - Public key material. This public key will be imported into Lightsail.
- Mapping[str, str]
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.
- name String
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - pgp
Key String - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- public
Key String - Public key material. This public key will be imported into Lightsail.
- Map<String>
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.
Outputs
All input properties are implicitly available as output properties. Additionally, the KeyPair resource produces the following output properties:
- Arn string
- ARN of the Lightsail key pair.
- Encrypted
Fingerprint string - MD5 public key fingerprint for the encrypted private key.
- Encrypted
Private stringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - Fingerprint string
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- Id string
- The provider-assigned unique ID for this managed resource.
- Private
Key string - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- ARN of the Lightsail key pair.
- Encrypted
Fingerprint string - MD5 public key fingerprint for the encrypted private key.
- Encrypted
Private stringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - Fingerprint string
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- Id string
- The provider-assigned unique ID for this managed resource.
- Private
Key string - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the Lightsail key pair.
- encrypted
Fingerprint String - MD5 public key fingerprint for the encrypted private key.
- encrypted
Private StringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - fingerprint String
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- id String
- The provider-assigned unique ID for this managed resource.
- private
Key String - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- ARN of the Lightsail key pair.
- encrypted
Fingerprint string - MD5 public key fingerprint for the encrypted private key.
- encrypted
Private stringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - fingerprint string
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- id string
- The provider-assigned unique ID for this managed resource.
- private
Key string - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- ARN of the Lightsail key pair.
- encrypted_
fingerprint str - MD5 public key fingerprint for the encrypted private key.
- encrypted_
private_ strkey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - fingerprint str
- 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 - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the Lightsail key pair.
- encrypted
Fingerprint String - MD5 public key fingerprint for the encrypted private key.
- encrypted
Private StringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - fingerprint String
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- id String
- The provider-assigned unique ID for this managed resource.
- private
Key String - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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) -> 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: 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
- ARN of the Lightsail key pair.
- Encrypted
Fingerprint string - MD5 public key fingerprint for the encrypted private key.
- Encrypted
Private stringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - Fingerprint string
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- Name string
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Pgp
Key string - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- Private
Key string - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - Public
Key string - Public key material. This public key will be imported into Lightsail.
- Dictionary<string, string>
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- ARN of the Lightsail key pair.
- Encrypted
Fingerprint string - MD5 public key fingerprint for the encrypted private key.
- Encrypted
Private stringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - Fingerprint string
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- Name string
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - Name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - Pgp
Key string - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- Private
Key string - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - Public
Key string - Public key material. This public key will be imported into Lightsail.
- map[string]string
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the Lightsail key pair.
- encrypted
Fingerprint String - MD5 public key fingerprint for the encrypted private key.
- encrypted
Private StringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - fingerprint String
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- name String
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - pgp
Key String - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- private
Key String - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - public
Key String - Public key material. This public key will be imported into Lightsail.
- Map<String,String>
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- ARN of the Lightsail key pair.
- encrypted
Fingerprint string - MD5 public key fingerprint for the encrypted private key.
- encrypted
Private stringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - fingerprint string
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- name string
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - name
Prefix string - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - pgp
Key string - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- private
Key string - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - public
Key string - Public key material. This public key will be imported into Lightsail.
- {[key: string]: string}
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- ARN of the Lightsail key pair.
- encrypted_
fingerprint str - MD5 public key fingerprint for the encrypted private key.
- encrypted_
private_ strkey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - fingerprint str
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- name str
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - name_
prefix str - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - pgp_
key str - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- private_
key str - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - public_
key str - Public key material. This public key will be imported into Lightsail.
- Mapping[str, str]
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- ARN of the Lightsail key pair.
- encrypted
Fingerprint String - MD5 public key fingerprint for the encrypted private key.
- encrypted
Private StringKey - Private key material, base 64 encoded and encrypted with the given
pgp_key
. This is only populated when creating a new key andpgp_key
is supplied. - fingerprint String
- MD5 public key fingerprint as specified in section 4 of RFC 4716.
- name String
- Name of the Lightsail Key Pair. If omitted, the provider will assign a random, unique name. Conflicts with
name_prefix
. - name
Prefix String - Creates a unique name beginning with the specified prefix. Conflicts with
name
. - pgp
Key String - PGP key to encrypt the resulting private key material. Only used when creating a new key pair.
- private
Key String - Private key, base64 encoded. This is only populated when creating a new key, and when no
pgp_key
is provided. - public
Key String - Public key material. This public key will be imported into Lightsail.
- Map<String>
Map of tags to assign to the resource. To create a key-only tag, use an empty string as the value. If configured with a provider
default_tags
configuration 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_key
is ignored ifpublic_key
is supplied.- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
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
aws
Terraform Provider.