Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶
type Domain struct { pulumi.CustomResourceState // The ARN of the Lightsail domain Arn pulumi.StringOutput `pulumi:"arn"` // The name of the Lightsail domain to manage DomainName pulumi.StringOutput `pulumi:"domainName"` }
Creates 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"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details
## Example Usage ### Creating A New Domain
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lightsail" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lightsail.NewDomain(ctx, "domainTest", &lightsail.DomainArgs{ DomainName: pulumi.String("mydomain.com"), }) if err != nil { return err } return nil }) }
```
func GetDomain ¶
func GetDomain(ctx *pulumi.Context, name string, id pulumi.IDInput, state *DomainState, opts ...pulumi.ResourceOption) (*Domain, error)
GetDomain gets an existing Domain resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewDomain ¶
func NewDomain(ctx *pulumi.Context, name string, args *DomainArgs, opts ...pulumi.ResourceOption) (*Domain, error)
NewDomain registers a new resource with the given unique name, arguments, and options.
type DomainArgs ¶
type DomainArgs struct { // The name of the Lightsail domain to manage DomainName pulumi.StringInput }
The set of arguments for constructing a Domain resource.
func (DomainArgs) ElementType ¶
func (DomainArgs) ElementType() reflect.Type
type DomainState ¶
type DomainState struct { // The ARN of the Lightsail domain Arn pulumi.StringPtrInput // The name of the Lightsail domain to manage DomainName pulumi.StringPtrInput }
func (DomainState) ElementType ¶
func (DomainState) ElementType() reflect.Type
type Instance ¶
type Instance struct { pulumi.CustomResourceState // The ARN of the Lightsail instance (matches `id`). Arn pulumi.StringOutput `pulumi:"arn"` // The Availability Zone in which to create your // instance (see list below) AvailabilityZone pulumi.StringOutput `pulumi:"availabilityZone"` // The ID for a virtual private server image // (see list below) BlueprintId pulumi.StringOutput `pulumi:"blueprintId"` // The bundle of specification information (see list below) BundleId pulumi.StringOutput `pulumi:"bundleId"` CpuCount pulumi.IntOutput `pulumi:"cpuCount"` // The timestamp when the instance was created. // * `availabilityZone` // * `blueprintId` // * `bundleId` // * `keyPairName` // * `userData` CreatedAt pulumi.StringOutput `pulumi:"createdAt"` Ipv6Address pulumi.StringOutput `pulumi:"ipv6Address"` IsStaticIp pulumi.BoolOutput `pulumi:"isStaticIp"` // The name of your key pair. Created in the // Lightsail console (cannot use `ec2.KeyPair` at this time) KeyPairName pulumi.StringPtrOutput `pulumi:"keyPairName"` // The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account. Name pulumi.StringOutput `pulumi:"name"` PrivateIpAddress pulumi.StringOutput `pulumi:"privateIpAddress"` PublicIpAddress pulumi.StringOutput `pulumi:"publicIpAddress"` RamSize pulumi.Float64Output `pulumi:"ramSize"` // A map of tags to assign to the resource. Tags pulumi.StringMapOutput `pulumi:"tags"` // launch script to configure server with additional user data UserData pulumi.StringPtrOutput `pulumi:"userData"` Username pulumi.StringOutput `pulumi:"username"` }
Provides a Lightsail Instance. Amazon Lightsail is a service to provide easy virtual private servers with custom software already setup. See [What is Amazon Lightsail?](https://lightsail.aws.amazon.com/ls/docs/getting-started/article/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"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lightsail" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lightsail.NewInstance(ctx, "gitlabTest", &lightsail.InstanceArgs{ AvailabilityZone: pulumi.String("us-east-1b"), BlueprintId: pulumi.String("string"), BundleId: pulumi.String("string"), KeyPairName: pulumi.String("some_key_name"), Tags: pulumi.StringMap{ "foo": pulumi.String("bar"), }, }) if err != nil { return err } return nil }) }
``` ## 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
- `amazonLinux20180302` - `centos7190101` - `debian87` - `debian95` - `freebsd111` - `opensuse422` - `ubuntu16042` - `ubuntu1804`
### Apps and OS
- `drupal856` - `gitlab11141` - `joomla3811` - `lamp56372` - `lamp71201` - `magento225` - `mean401` - `nginx11401` - `nodejs1080` - `pleskUbuntu178111` - `redmine346` - `wordpress498` - `wordpressMultisite498`
## 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`
func GetInstance ¶
func GetInstance(ctx *pulumi.Context, name string, id pulumi.IDInput, state *InstanceState, opts ...pulumi.ResourceOption) (*Instance, error)
GetInstance gets an existing Instance resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewInstance ¶
func NewInstance(ctx *pulumi.Context, name string, args *InstanceArgs, opts ...pulumi.ResourceOption) (*Instance, error)
NewInstance registers a new resource with the given unique name, arguments, and options.
type InstanceArgs ¶
type InstanceArgs struct { // The Availability Zone in which to create your // instance (see list below) AvailabilityZone pulumi.StringInput // The ID for a virtual private server image // (see list below) BlueprintId pulumi.StringInput // The bundle of specification information (see list below) BundleId pulumi.StringInput // The name of your key pair. Created in the // Lightsail console (cannot use `ec2.KeyPair` at this time) KeyPairName pulumi.StringPtrInput // The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account. Name pulumi.StringPtrInput // A map of tags to assign to the resource. Tags pulumi.StringMapInput // launch script to configure server with additional user data UserData pulumi.StringPtrInput }
The set of arguments for constructing a Instance resource.
func (InstanceArgs) ElementType ¶
func (InstanceArgs) ElementType() reflect.Type
type InstanceState ¶
type InstanceState struct { // The ARN of the Lightsail instance (matches `id`). Arn pulumi.StringPtrInput // The Availability Zone in which to create your // instance (see list below) AvailabilityZone pulumi.StringPtrInput // The ID for a virtual private server image // (see list below) BlueprintId pulumi.StringPtrInput // The bundle of specification information (see list below) BundleId pulumi.StringPtrInput CpuCount pulumi.IntPtrInput // The timestamp when the instance was created. // * `availabilityZone` // * `blueprintId` // * `bundleId` // * `keyPairName` // * `userData` CreatedAt pulumi.StringPtrInput Ipv6Address pulumi.StringPtrInput IsStaticIp pulumi.BoolPtrInput // The name of your key pair. Created in the // Lightsail console (cannot use `ec2.KeyPair` at this time) KeyPairName pulumi.StringPtrInput // The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account. Name pulumi.StringPtrInput PrivateIpAddress pulumi.StringPtrInput PublicIpAddress pulumi.StringPtrInput RamSize pulumi.Float64PtrInput // A map of tags to assign to the resource. Tags pulumi.StringMapInput // launch script to configure server with additional user data UserData pulumi.StringPtrInput Username pulumi.StringPtrInput }
func (InstanceState) ElementType ¶
func (InstanceState) ElementType() reflect.Type
type KeyPair ¶
type KeyPair struct { pulumi.CustomResourceState // The ARN of the Lightsail key pair Arn pulumi.StringOutput `pulumi:"arn"` // The MD5 public key fingerprint for the encrypted // private key EncryptedFingerprint pulumi.StringOutput `pulumi:"encryptedFingerprint"` // 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 EncryptedPrivateKey pulumi.StringOutput `pulumi:"encryptedPrivateKey"` // The MD5 public key fingerprint as specified in section 4 of RFC 4716. Fingerprint pulumi.StringOutput `pulumi:"fingerprint"` // The name of the Lightsail Key Pair. If omitted, a unique // name will be generated by this provider Name pulumi.StringOutput `pulumi:"name"` NamePrefix pulumi.StringPtrOutput `pulumi:"namePrefix"` // An optional PGP key to encrypt the resulting private // key material. Only used when creating a new key pair PgpKey pulumi.StringPtrOutput `pulumi:"pgpKey"` // the private key, base64 encoded. This is only populated // when creating a new key, and when no `pgpKey` is provided PrivateKey pulumi.StringOutput `pulumi:"privateKey"` // The public key material. This public key will be // imported into Lightsail PublicKey pulumi.StringOutput `pulumi:"publicKey"` }
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"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details
## Example Usage ### Creating A New Key Pair
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lightsail" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lightsail.NewKeyPair(ctx, "lgKeyPair", nil) if err != nil { return err } return nil }) }
``` ## Create new Key Pair, encrypting the private key with a PGP Key
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lightsail" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lightsail.NewKeyPair(ctx, "lgKeyPair", &lightsail.KeyPairArgs{ PgpKey: pulumi.String("keybase:keybaseusername"), }) if err != nil { return err } return nil }) }
```
func GetKeyPair ¶
func GetKeyPair(ctx *pulumi.Context, name string, id pulumi.IDInput, state *KeyPairState, opts ...pulumi.ResourceOption) (*KeyPair, error)
GetKeyPair gets an existing KeyPair resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewKeyPair ¶
func NewKeyPair(ctx *pulumi.Context, name string, args *KeyPairArgs, opts ...pulumi.ResourceOption) (*KeyPair, error)
NewKeyPair registers a new resource with the given unique name, arguments, and options.
type KeyPairArgs ¶
type KeyPairArgs struct { // The name of the Lightsail Key Pair. If omitted, a unique // name will be generated by this provider Name pulumi.StringPtrInput NamePrefix pulumi.StringPtrInput // An optional PGP key to encrypt the resulting private // key material. Only used when creating a new key pair PgpKey pulumi.StringPtrInput // The public key material. This public key will be // imported into Lightsail PublicKey pulumi.StringPtrInput }
The set of arguments for constructing a KeyPair resource.
func (KeyPairArgs) ElementType ¶
func (KeyPairArgs) ElementType() reflect.Type
type KeyPairState ¶
type KeyPairState struct { // The ARN of the Lightsail key pair Arn pulumi.StringPtrInput // The MD5 public key fingerprint for the encrypted // private key EncryptedFingerprint pulumi.StringPtrInput // 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 EncryptedPrivateKey pulumi.StringPtrInput // The MD5 public key fingerprint as specified in section 4 of RFC 4716. Fingerprint pulumi.StringPtrInput // The name of the Lightsail Key Pair. If omitted, a unique // name will be generated by this provider Name pulumi.StringPtrInput NamePrefix pulumi.StringPtrInput // An optional PGP key to encrypt the resulting private // key material. Only used when creating a new key pair PgpKey pulumi.StringPtrInput // the private key, base64 encoded. This is only populated // when creating a new key, and when no `pgpKey` is provided PrivateKey pulumi.StringPtrInput // The public key material. This public key will be // imported into Lightsail PublicKey pulumi.StringPtrInput }
func (KeyPairState) ElementType ¶
func (KeyPairState) ElementType() reflect.Type
type StaticIp ¶
type StaticIp struct { pulumi.CustomResourceState // The ARN of the Lightsail static IP Arn pulumi.StringOutput `pulumi:"arn"` // The allocated static IP address IpAddress pulumi.StringOutput `pulumi:"ipAddress"` // The name for the allocated static IP Name pulumi.StringOutput `pulumi:"name"` // The support code. SupportCode pulumi.StringOutput `pulumi:"supportCode"` }
Allocates 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"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lightsail" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := lightsail.NewStaticIp(ctx, "test", nil) if err != nil { return err } return nil }) }
```
func GetStaticIp ¶
func GetStaticIp(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StaticIpState, opts ...pulumi.ResourceOption) (*StaticIp, error)
GetStaticIp gets an existing StaticIp resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewStaticIp ¶
func NewStaticIp(ctx *pulumi.Context, name string, args *StaticIpArgs, opts ...pulumi.ResourceOption) (*StaticIp, error)
NewStaticIp registers a new resource with the given unique name, arguments, and options.
type StaticIpArgs ¶
type StaticIpArgs struct { // The name for the allocated static IP Name pulumi.StringPtrInput }
The set of arguments for constructing a StaticIp resource.
func (StaticIpArgs) ElementType ¶
func (StaticIpArgs) ElementType() reflect.Type
type StaticIpAttachment ¶
type StaticIpAttachment struct { pulumi.CustomResourceState // The name of the Lightsail instance to attach the IP to InstanceName pulumi.StringOutput `pulumi:"instanceName"` // The allocated static IP address IpAddress pulumi.StringOutput `pulumi:"ipAddress"` // The name of the allocated static IP StaticIpName pulumi.StringOutput `pulumi:"staticIpName"` }
Provides 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"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lightsail" "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { testStaticIp, err := lightsail.NewStaticIp(ctx, "testStaticIp", nil) if err != nil { return err } testInstance, err := lightsail.NewInstance(ctx, "testInstance", &lightsail.InstanceArgs{ AvailabilityZone: pulumi.String("us-east-1b"), BlueprintId: pulumi.String("string"), BundleId: pulumi.String("string"), KeyPairName: pulumi.String("some_key_name"), }) if err != nil { return err } _, err = lightsail.NewStaticIpAttachment(ctx, "testStaticIpAttachment", &lightsail.StaticIpAttachmentArgs{ InstanceName: testInstance.ID(), StaticIpName: testStaticIp.ID(), }) if err != nil { return err } return nil }) }
```
func GetStaticIpAttachment ¶
func GetStaticIpAttachment(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StaticIpAttachmentState, opts ...pulumi.ResourceOption) (*StaticIpAttachment, error)
GetStaticIpAttachment gets an existing StaticIpAttachment resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewStaticIpAttachment ¶
func NewStaticIpAttachment(ctx *pulumi.Context, name string, args *StaticIpAttachmentArgs, opts ...pulumi.ResourceOption) (*StaticIpAttachment, error)
NewStaticIpAttachment registers a new resource with the given unique name, arguments, and options.
type StaticIpAttachmentArgs ¶
type StaticIpAttachmentArgs struct { // The name of the Lightsail instance to attach the IP to InstanceName pulumi.StringInput // The name of the allocated static IP StaticIpName pulumi.StringInput }
The set of arguments for constructing a StaticIpAttachment resource.
func (StaticIpAttachmentArgs) ElementType ¶
func (StaticIpAttachmentArgs) ElementType() reflect.Type
type StaticIpAttachmentState ¶
type StaticIpAttachmentState struct { // The name of the Lightsail instance to attach the IP to InstanceName pulumi.StringPtrInput // The allocated static IP address IpAddress pulumi.StringPtrInput // The name of the allocated static IP StaticIpName pulumi.StringPtrInput }
func (StaticIpAttachmentState) ElementType ¶
func (StaticIpAttachmentState) ElementType() reflect.Type
type StaticIpState ¶
type StaticIpState struct { // The ARN of the Lightsail static IP Arn pulumi.StringPtrInput // The allocated static IP address IpAddress pulumi.StringPtrInput // The name for the allocated static IP Name pulumi.StringPtrInput // The support code. SupportCode pulumi.StringPtrInput }
func (StaticIpState) ElementType ¶
func (StaticIpState) ElementType() reflect.Type