Module lightsail
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
Others
- DomainArgs
- DomainState
- InstanceArgs
- InstanceState
- KeyPairArgs
- KeyPairState
- StaticIpArgs
- StaticIpAttachmentArgs
- StaticIpAttachmentState
- StaticIpState
Resources
Resource Domain
class Domain extends CustomResourceCreates a domain resource for the specified domain (e.g., example.com). You cannot register a new domain name using Lightsail. You must register a domain name using Amazon Route 53 or another domain name registrar. If you have already registered your domain, you can enter its name in this parameter to manage the DNS records for that domain.
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
Creating A New Domain
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const domainTest = new aws.lightsail.Domain("domain_test", {
domainName: "mydomain.com",
});constructor
new Domain(name: string, args: DomainArgs, opts?: pulumi.CustomResourceOptions)Create a Domain resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DomainState, opts?: pulumi.CustomResourceOptions): DomainGet an existing Domain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DomainReturns true if the given object is an instance of Domain. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the Lightsail domain
property domainName
public domainName: pulumi.Output<string>;The name of the Lightsail domain to manage
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Instance
class Instance extends CustomResourceProvides a Lightsail Instance. Amazon Lightsail is a service to provide easy virtual private servers with custom software already setup. See What is Amazon Lightsail? for more information.
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// Create a new GitLab Lightsail Instance
const gitlabTest = new aws.lightsail.Instance("gitlab_test", {
availabilityZone: "us-east-1b",
blueprintId: "string",
bundleId: "string",
keyPairName: "some_key_name",
tags: {
foo: "bar",
},
});Availability Zones
Lightsail currently supports the following Availability Zones (e.g. us-east-1a):
ap-northeast-1{a,c,d}ap-northeast-2{a,c}ap-south-1{a,b}ap-southeast-1{a,b,c}ap-southeast-2{a,b,c}ca-central-1{a,b}eu-central-1{a,b,c}eu-west-1{a,b,c}eu-west-2{a,b,c}eu-west-3{a,b,c}us-east-1{a,b,c,d,e,f}us-east-2{a,b,c}us-west-2{a,b,c}
Blueprints
Lightsail currently supports the following Blueprint IDs:
OS Only
amazonLinux20180302centos7190101debian87debian95freebsd111opensuse422ubuntu16042ubuntu1804
Apps and OS
drupal856gitlab11141joomla3811lamp56372lamp71201magento225mean401nginx11401nodejs1080pleskUbuntu178111redmine346wordpress498wordpressMultisite498
Bundles
Lightsail currently supports the following Bundle IDs (e.g. an instance in ap-northeast-1 would use small20):
Prefix
A Bundle ID starts with one of the below size prefixes:
nano_micro_small_medium_large_xlarge_2xlarge_
Suffix
A Bundle ID ends with one of the following suffixes depending on Availability Zone:
- ap-northeast-1:
20 - ap-northeast-2:
20 - ap-south-1:
21 - ap-southeast-1:
20 - ap-southeast-2:
22 - ca-central-1:
20 - eu-central-1:
20 - eu-west-1:
20 - eu-west-2:
20 - eu-west-3:
20 - us-east-1:
20 - us-east-2:
20 - us-west-2:
20
constructor
new Instance(name: string, args: InstanceArgs, opts?: pulumi.CustomResourceOptions)Create a Instance resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceState, opts?: pulumi.CustomResourceOptions): InstanceGet an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is InstanceReturns true if the given object is an instance of Instance. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the Lightsail instance (matches id).
property availabilityZone
public availabilityZone: pulumi.Output<string>;The Availability Zone in which to create your instance (see list below)
property blueprintId
public blueprintId: pulumi.Output<string>;The ID for a virtual private server image (see list below)
property bundleId
public bundleId: pulumi.Output<string>;The bundle of specification information (see list below)
property cpuCount
public cpuCount: pulumi.Output<number>;property createdAt
public createdAt: pulumi.Output<string>;The timestamp when the instance was created.
* availabilityZone
* blueprintId
* bundleId
* keyPairName
* userData
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property ipv6Address
public ipv6Address: pulumi.Output<string>;property isStaticIp
public isStaticIp: pulumi.Output<boolean>;property keyPairName
public keyPairName: pulumi.Output<string | undefined>;The name of your key pair. Created in the
Lightsail console (cannot use aws.ec2.KeyPair at this time)
property name
public name: pulumi.Output<string>;The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
property privateIpAddress
public privateIpAddress: pulumi.Output<string>;property publicIpAddress
public publicIpAddress: pulumi.Output<string>;property ramSize
public ramSize: pulumi.Output<number>;property tags
public tags: pulumi.Output<{[key: string]: any} | undefined>;A map of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property userData
public userData: pulumi.Output<string | undefined>;launch script to configure server with additional user data
property username
public username: pulumi.Output<string>;Resource KeyPair
class KeyPair extends CustomResourceProvides 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
Creating A 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", {});Create new Key Pair, encrypting the private key with a PGP Key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const lgKeyPair = new aws.lightsail.KeyPair("lg_key_pair", {
pgpKey: "keybase:keybaseusername",
});Import an existing public key
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as fs from "fs";
const lgKeyPair = new aws.lightsail.KeyPair("lg_key_pair", {
publicKey: fs.readFileSync("~/.ssh/id_rsa.pub", "utf-8"),
});constructor
new KeyPair(name: string, args?: KeyPairArgs, opts?: pulumi.CustomResourceOptions)Create a KeyPair resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: KeyPairState, opts?: pulumi.CustomResourceOptions): KeyPairGet an existing KeyPair resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is KeyPairReturns true if the given object is an instance of KeyPair. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the Lightsail key pair
property encryptedFingerprint
public encryptedFingerprint: pulumi.Output<string>;The MD5 public key fingerprint for the encrypted private key
property encryptedPrivateKey
public encryptedPrivateKey: pulumi.Output<string>;the private key material, base 64 encoded and
encrypted with the given pgpKey. This is only populated when creating a new
key and pgpKey is supplied
property fingerprint
public fingerprint: pulumi.Output<string>;The MD5 public key fingerprint as specified in section 4 of RFC 4716.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property name
public name: pulumi.Output<string>;The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
property namePrefix
public namePrefix: pulumi.Output<string | undefined>;property pgpKey
public pgpKey: pulumi.Output<string | undefined>;An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
property privateKey
public privateKey: pulumi.Output<string>;the private key, base64 encoded. This is only populated
when creating a new key, and when no pgpKey is provided
property publicKey
public publicKey: pulumi.Output<string>;The public key material. This public key will be imported into Lightsail
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource StaticIp
class StaticIp extends CustomResourceAllocates a static IP address.
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.lightsail.StaticIp("test", {});constructor
new StaticIp(name: string, args?: StaticIpArgs, opts?: pulumi.CustomResourceOptions)Create a StaticIp resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: StaticIpState, opts?: pulumi.CustomResourceOptions): StaticIpGet an existing StaticIp resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is StaticIpReturns true if the given object is an instance of StaticIp. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property arn
public arn: pulumi.Output<string>;The ARN of the Lightsail static IP
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property ipAddress
public ipAddress: pulumi.Output<string>;The allocated static IP address
property name
public name: pulumi.Output<string>;The name for the allocated static IP
property supportCode
public supportCode: pulumi.Output<string>;The support code.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource StaticIpAttachment
class StaticIpAttachment extends CustomResourceProvides a static IP address attachment - relationship between a Lightsail static IP & Lightsail instance.
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testStaticIp = new aws.lightsail.StaticIp("test", {});
const testInstance = new aws.lightsail.Instance("test", {
availabilityZone: "us-east-1b",
blueprintId: "string",
bundleId: "string",
keyPairName: "some_key_name",
});
const testStaticIpAttachment = new aws.lightsail.StaticIpAttachment("test", {
instanceName: testInstance.id,
staticIpName: testStaticIp.id,
});constructor
new StaticIpAttachment(name: string, args: StaticIpAttachmentArgs, opts?: pulumi.CustomResourceOptions)Create a StaticIpAttachment resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: StaticIpAttachmentState, opts?: pulumi.CustomResourceOptions): StaticIpAttachmentGet an existing StaticIpAttachment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is StaticIpAttachmentReturns true if the given object is an instance of StaticIpAttachment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property instanceName
public instanceName: pulumi.Output<string>;The name of the Lightsail instance to attach the IP to
property ipAddress
public ipAddress: pulumi.Output<string>;The allocated static IP address
property staticIpName
public staticIpName: pulumi.Output<string>;The name of the allocated static IP
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Others
interface DomainArgs
interface DomainArgsThe set of arguments for constructing a Domain resource.
property domainName
domainName: pulumi.Input<string>;The name of the Lightsail domain to manage
interface DomainState
interface DomainStateInput properties used for looking up and filtering Domain resources.
property arn
arn?: pulumi.Input<string>;The ARN of the Lightsail domain
property domainName
domainName?: pulumi.Input<string>;The name of the Lightsail domain to manage
interface InstanceArgs
interface InstanceArgsThe set of arguments for constructing a Instance resource.
property availabilityZone
availabilityZone: pulumi.Input<string>;The Availability Zone in which to create your instance (see list below)
property blueprintId
blueprintId: pulumi.Input<string>;The ID for a virtual private server image (see list below)
property bundleId
bundleId: pulumi.Input<string>;The bundle of specification information (see list below)
property keyPairName
keyPairName?: pulumi.Input<string>;The name of your key pair. Created in the
Lightsail console (cannot use aws.ec2.KeyPair at this time)
property name
name?: pulumi.Input<string>;The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
property userData
userData?: pulumi.Input<string>;launch script to configure server with additional user data
interface InstanceState
interface InstanceStateInput properties used for looking up and filtering Instance resources.
property arn
arn?: pulumi.Input<string>;The ARN of the Lightsail instance (matches id).
property availabilityZone
availabilityZone?: pulumi.Input<string>;The Availability Zone in which to create your instance (see list below)
property blueprintId
blueprintId?: pulumi.Input<string>;The ID for a virtual private server image (see list below)
property bundleId
bundleId?: pulumi.Input<string>;The bundle of specification information (see list below)
property cpuCount
cpuCount?: pulumi.Input<number>;property createdAt
createdAt?: pulumi.Input<string>;The timestamp when the instance was created.
* availabilityZone
* blueprintId
* bundleId
* keyPairName
* userData
property ipv6Address
ipv6Address?: pulumi.Input<string>;property isStaticIp
isStaticIp?: pulumi.Input<boolean>;property keyPairName
keyPairName?: pulumi.Input<string>;The name of your key pair. Created in the
Lightsail console (cannot use aws.ec2.KeyPair at this time)
property name
name?: pulumi.Input<string>;The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
property privateIpAddress
privateIpAddress?: pulumi.Input<string>;property publicIpAddress
publicIpAddress?: pulumi.Input<string>;property ramSize
ramSize?: pulumi.Input<number>;property tags
tags?: pulumi.Input<{[key: string]: any}>;A map of tags to assign to the resource.
property userData
userData?: pulumi.Input<string>;launch script to configure server with additional user data
property username
username?: pulumi.Input<string>;interface KeyPairArgs
interface KeyPairArgsThe set of arguments for constructing a KeyPair resource.
property name
name?: pulumi.Input<string>;The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
property namePrefix
namePrefix?: pulumi.Input<string>;property pgpKey
pgpKey?: pulumi.Input<string>;An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
property publicKey
publicKey?: pulumi.Input<string>;The public key material. This public key will be imported into Lightsail
interface KeyPairState
interface KeyPairStateInput properties used for looking up and filtering KeyPair resources.
property arn
arn?: pulumi.Input<string>;The ARN of the Lightsail key pair
property encryptedFingerprint
encryptedFingerprint?: pulumi.Input<string>;The MD5 public key fingerprint for the encrypted private key
property encryptedPrivateKey
encryptedPrivateKey?: pulumi.Input<string>;the private key material, base 64 encoded and
encrypted with the given pgpKey. This is only populated when creating a new
key and pgpKey is supplied
property fingerprint
fingerprint?: pulumi.Input<string>;The MD5 public key fingerprint as specified in section 4 of RFC 4716.
property name
name?: pulumi.Input<string>;The name of the Lightsail Key Pair. If omitted, a unique name will be generated by this provider
property namePrefix
namePrefix?: pulumi.Input<string>;property pgpKey
pgpKey?: pulumi.Input<string>;An optional PGP key to encrypt the resulting private key material. Only used when creating a new key pair
property privateKey
privateKey?: pulumi.Input<string>;the private key, base64 encoded. This is only populated
when creating a new key, and when no pgpKey is provided
property publicKey
publicKey?: pulumi.Input<string>;The public key material. This public key will be imported into Lightsail
interface StaticIpArgs
interface StaticIpArgsThe set of arguments for constructing a StaticIp resource.
property name
name?: pulumi.Input<string>;The name for the allocated static IP
interface StaticIpAttachmentArgs
interface StaticIpAttachmentArgsThe set of arguments for constructing a StaticIpAttachment resource.
property instanceName
instanceName: pulumi.Input<string>;The name of the Lightsail instance to attach the IP to
property staticIpName
staticIpName: pulumi.Input<string>;The name of the allocated static IP
interface StaticIpAttachmentState
interface StaticIpAttachmentStateInput properties used for looking up and filtering StaticIpAttachment resources.
property instanceName
instanceName?: pulumi.Input<string>;The name of the Lightsail instance to attach the IP to
property ipAddress
ipAddress?: pulumi.Input<string>;The allocated static IP address
property staticIpName
staticIpName?: pulumi.Input<string>;The name of the allocated static IP
interface StaticIpState
interface StaticIpStateInput properties used for looking up and filtering StaticIp resources.
property arn
arn?: pulumi.Input<string>;The ARN of the Lightsail static IP
property ipAddress
ipAddress?: pulumi.Input<string>;The allocated static IP address
property name
name?: pulumi.Input<string>;The name for the allocated static IP
property supportCode
supportCode?: pulumi.Input<string>;The support code.