import * as core from "@terrascript/core"; export interface InstanceArgs extends core.ResourceArgs { /** * (Required) The Availability Zone in which to create your */ availabilityZone: string | core.StringOut; /** * (Required) The ID for a virtual private server image. A list of available blueprint IDs can be obtai * ned using the AWS CLI command: `aws lightsail get-blueprints` */ blueprintId: string | core.StringOut; /** * (Required) The bundle of specification information (see list below) */ bundleId: string | core.StringOut; /** * (Optional) The name of your key pair. Created in the */ keyPairName?: string | core.StringOut; /** * (Required) The name of the Lightsail Instance. Names be unique within each AWS Region in your Lights * ail account. */ name: string | core.StringOut; /** * (Optional) A 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](https://registry.terr * aform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with ma * tching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional) launch script to configure server with additional user data */ userData?: string | core.StringOut; } export class Instance extends core.Resource { /** * The ARN of the Lightsail instance (matches `id`). */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Required) The Availability Zone in which to create your */ @core.attr(String) public availabilityZone!: string | core.StringOut; /** * (Required) The ID for a virtual private server image. A list of available blueprint IDs can be obtai * ned using the AWS CLI command: `aws lightsail get-blueprints` */ @core.attr(String) public blueprintId!: string | core.StringOut; /** * (Required) The bundle of specification information (see list below) */ @core.attr(String) public bundleId!: string | core.StringOut; /** * The number of vCPUs the instance has. */ @core.attr(Number, { computed: true }) public cpuCount!: number | core.NumberOut; /** * The timestamp when the instance was created. */ @core.attr(String, { computed: true }) public createdAt!: string | core.StringOut; /** * The ARN of the Lightsail instance (matches `arn`). */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (**Deprecated**) The first IPv6 address of the Lightsail instance. Use `ipv6_addresses` attribute in * stead. */ @core.attr(String, { computed: true }) public ipv6Address!: string | core.StringOut; /** * List of IPv6 addresses for the Lightsail instance. */ @core.attr(String, { computed: true, kind: "array" }) public ipv6Addresses!: core.Array | core.ArrayOut; /** * A Boolean value indicating whether this instance has a static IP assigned to it. */ @core.attr(Boolean, { computed: true }) public isStaticIp!: boolean | core.BooleanOut; /** * (Optional) The name of your key pair. Created in the */ @core.attr(String) public keyPairName?: string | core.StringOut; /** * (Required) The name of the Lightsail Instance. Names be unique within each AWS Region in your Lights * ail account. */ @core.attr(String) public name!: string | core.StringOut; /** * The private IP address of the instance. */ @core.attr(String, { computed: true }) public privateIpAddress!: string | core.StringOut; /** * The public IP address of the instance. */ @core.attr(String, { computed: true }) public publicIpAddress!: string | core.StringOut; /** * The amount of RAM in GB on the instance (e.g., 1.0). */ @core.attr(Number, { computed: true }) public ramSize!: number | core.NumberOut; /** * (Optional) A 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](https://registry.terr * aform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present, tags with ma * tching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional) launch script to configure server with additional user data */ @core.attr(String) public userData?: string | core.StringOut; /** * The user name for connecting to the instance (e.g., ec2-user). */ @core.attr(String, { computed: true }) public username!: string | core.StringOut; constructor(name: string, args?: InstanceArgs) { super(name, "aws_lightsail_instance", args); } public override getNamespace(): string { return "aws_lightsail"; } }