import * as core from "@terrascript/core"; export interface EnclaveOptionsArgs extends core.SchemaArgs { enabled?: boolean | core.BooleanOut; } export class EnclaveOptions extends core.Schema { @core.attr(Boolean, { computed: true }) public enabled?: boolean | core.BooleanOut; } export interface EbsBlockDeviceArgs extends core.SchemaArgs { deleteOnTermination?: boolean | core.BooleanOut; deviceName: string | core.StringOut; encrypted?: boolean | core.BooleanOut; iops?: number | core.NumberOut; kmsKeyId?: string | core.StringOut; snapshotId?: string | core.StringOut; tags?: core.Map | core.MapOut; throughput?: number | core.NumberOut; volumeId: string | core.StringOut; volumeSize?: number | core.NumberOut; volumeType?: string | core.StringOut; } export class EbsBlockDevice extends core.Schema { @core.attr(Boolean) public deleteOnTermination?: boolean | core.BooleanOut; @core.attr(String) public deviceName!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public encrypted?: boolean | core.BooleanOut; @core.attr(Number, { computed: true }) public iops?: number | core.NumberOut; @core.attr(String, { computed: true }) public kmsKeyId?: string | core.StringOut; @core.attr(String, { computed: true }) public snapshotId?: string | core.StringOut; @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; @core.attr(Number, { computed: true }) public throughput?: number | core.NumberOut; @core.attr(String, { computed: true }) public volumeId!: string | core.StringOut; @core.attr(Number, { computed: true }) public volumeSize?: number | core.NumberOut; @core.attr(String, { computed: true }) public volumeType?: string | core.StringOut; } export interface NetworkInterfaceArgs extends core.SchemaArgs { deleteOnTermination?: boolean | core.BooleanOut; deviceIndex: number | core.NumberOut; networkCardIndex?: number | core.NumberOut; networkInterfaceId: string | core.StringOut; } export class NetworkInterface extends core.Schema { @core.attr(Boolean) public deleteOnTermination?: boolean | core.BooleanOut; @core.attr(Number) public deviceIndex!: number | core.NumberOut; @core.attr(Number) public networkCardIndex?: number | core.NumberOut; @core.attr(String) public networkInterfaceId!: string | core.StringOut; } export interface EphemeralBlockDeviceArgs extends core.SchemaArgs { deviceName: string | core.StringOut; noDevice?: boolean | core.BooleanOut; virtualName?: string | core.StringOut; } export class EphemeralBlockDevice extends core.Schema { @core.attr(String) public deviceName!: string | core.StringOut; @core.attr(Boolean) public noDevice?: boolean | core.BooleanOut; @core.attr(String) public virtualName?: string | core.StringOut; } export interface RootBlockDeviceArgs extends core.SchemaArgs { deleteOnTermination?: boolean | core.BooleanOut; deviceName: string | core.StringOut; encrypted?: boolean | core.BooleanOut; iops?: number | core.NumberOut; kmsKeyId?: string | core.StringOut; tags?: core.Map | core.MapOut; throughput?: number | core.NumberOut; volumeId: string | core.StringOut; volumeSize?: number | core.NumberOut; volumeType?: string | core.StringOut; } export class RootBlockDevice extends core.Schema { @core.attr(Boolean) public deleteOnTermination?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public deviceName!: string | core.StringOut; @core.attr(Boolean, { computed: true }) public encrypted?: boolean | core.BooleanOut; @core.attr(Number, { computed: true }) public iops?: number | core.NumberOut; @core.attr(String, { computed: true }) public kmsKeyId?: string | core.StringOut; @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; @core.attr(Number, { computed: true }) public throughput?: number | core.NumberOut; @core.attr(String, { computed: true }) public volumeId!: string | core.StringOut; @core.attr(Number, { computed: true }) public volumeSize?: number | core.NumberOut; @core.attr(String, { computed: true }) public volumeType?: string | core.StringOut; } export interface PrivateDnsNameOptionsArgs extends core.SchemaArgs { enableResourceNameDnsARecord?: boolean | core.BooleanOut; enableResourceNameDnsAaaaRecord?: boolean | core.BooleanOut; hostnameType?: string | core.StringOut; } export class PrivateDnsNameOptions extends core.Schema { @core.attr(Boolean, { computed: true }) public enableResourceNameDnsARecord?: boolean | core.BooleanOut; @core.attr(Boolean, { computed: true }) public enableResourceNameDnsAaaaRecord?: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public hostnameType?: string | core.StringOut; } export interface MaintenanceOptionsArgs extends core.SchemaArgs { autoRecovery?: string | core.StringOut; } export class MaintenanceOptions extends core.Schema { @core.attr(String, { computed: true }) public autoRecovery?: string | core.StringOut; } export interface MetadataOptionsArgs extends core.SchemaArgs { httpEndpoint?: string | core.StringOut; httpPutResponseHopLimit?: number | core.NumberOut; httpTokens?: string | core.StringOut; instanceMetadataTags?: string | core.StringOut; } export class MetadataOptions extends core.Schema { @core.attr(String, { computed: true }) public httpEndpoint?: string | core.StringOut; @core.attr(Number, { computed: true }) public httpPutResponseHopLimit?: number | core.NumberOut; @core.attr(String, { computed: true }) public httpTokens?: string | core.StringOut; @core.attr(String) public instanceMetadataTags?: string | core.StringOut; } export interface LaunchTemplateArgs extends core.SchemaArgs { id?: string | core.StringOut; name?: string | core.StringOut; version?: string | core.StringOut; } export class LaunchTemplate extends core.Schema { @core.attr(String, { computed: true }) public id?: string | core.StringOut; @core.attr(String, { computed: true }) public name?: string | core.StringOut; @core.attr(String) public version?: string | core.StringOut; } export interface CapacityReservationTargetArgs extends core.SchemaArgs { capacityReservationId?: string | core.StringOut; capacityReservationResourceGroupArn?: string | core.StringOut; } export class CapacityReservationTarget extends core.Schema { @core.attr(String) public capacityReservationId?: string | core.StringOut; @core.attr(String) public capacityReservationResourceGroupArn?: string | core.StringOut; } export interface CapacityReservationSpecificationArgs extends core.SchemaArgs { capacityReservationPreference?: string | core.StringOut; capacityReservationTarget?: CapacityReservationTarget; } export class CapacityReservationSpecification extends core.Schema { @core.attr(String) public capacityReservationPreference?: string | core.StringOut; @core.attr(CapacityReservationTarget) public capacityReservationTarget?: CapacityReservationTarget; } export interface CreditSpecificationArgs extends core.SchemaArgs { cpuCredits?: string | core.StringOut; } export class CreditSpecification extends core.Schema { @core.attr(String) public cpuCredits?: string | core.StringOut; } export interface InstanceArgs extends core.ResourceArgs { /** * (Optional) AMI to use for the instance. Required unless `launch_template` is specified and the Launc * h Template specifes an AMI. If an AMI is specified in the Launch Template, setting `ami` will overri * de the AMI specified in the Launch Template. */ ami?: string | core.StringOut; /** * (Optional) Whether to associate a public IP address with an instance in a VPC. */ associatePublicIpAddress?: boolean | core.BooleanOut; /** * (Optional) AZ to start the instance in. */ availabilityZone?: string | core.StringOut; /** * (Optional) Describes an instance's Capacity Reservation targeting option. See [Capacity Reservation * Specification](#capacity-reservation-specification) below for more details. */ capacityReservationSpecification?: CapacityReservationSpecification; /** * (Optional) Sets the number of CPU cores for an instance. This option is only supported on creation o * f instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](http * s://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-ins * tances-values) - specifying this option for unsupported instance types will return an error from the * EC2 API. */ cpuCoreCount?: number | core.NumberOut; /** * (Optional - has no effect unless `cpu_core_count` is also set) If set to to 1, hyperthreading is di * sabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs * .aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information. */ cpuThreadsPerCore?: number | core.NumberOut; /** * (Optional) Configuration block for customizing the credit specification of the instance. See [Credit * Specification](#credit-specification) below for more details. Terraform will only perform drift det * ection of its value when present in a configuration. Removing this configuration on existing instanc * es will only stop managing it. It will not change the configuration back to the default for the inst * ance type. */ creditSpecification?: CreditSpecification; /** * (Optional) If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest * /UserGuide/Stop_Start.html#Using_StopProtection). */ disableApiStop?: boolean | core.BooleanOut; /** * (Optional) If true, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2 * /latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination). */ disableApiTermination?: boolean | core.BooleanOut; /** * (Optional) One or more configuration blocks with additional EBS block devices to attach to the insta * nce. Block device configurations only apply on resource creation. See [Block Devices](#ebs-ephemeral * and-root-block-devices) below for details on attributes and drift detection. When accessing this as * an attribute reference, it is a set of objects. */ ebsBlockDevice?: core.Array | core.ArrayOut; /** * (Optional) If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on * an instance type that is optimized by default then this will show as disabled but if the instance t * ype is optimized by default then there is no need to set this and there is no effect to disabling it * . See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.h * tml) of the AWS User Guide for more information. */ ebsOptimized?: boolean | core.BooleanOut; /** * (Optional) Enable Nitro Enclaves on launched instances. See [Enclave Options](#enclave-options) belo * w for more details. */ enclaveOptions?: EnclaveOptions; /** * (Optional) One or more configuration blocks to customize Ephemeral (also known as "Instance Store") * volumes on the instance. See [Block Devices](#ebs-ephemeral-and-root-block-devices) below for detail * s. When accessing this as an attribute reference, it is a set of objects. */ ephemeralBlockDevice?: | core.Array | core.ArrayOut; /** * (Optional) If true, wait for password data to become available and retrieve it. Useful for getting t * he administrator password for instances running Microsoft Windows. The password data is exported to * the `password_data` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIRe * ference/API_GetPasswordData.html) for more information. */ getPasswordData?: boolean | core.BooleanOut; /** * (Optional) If true, the launched EC2 instance will support hibernation. */ hibernation?: boolean | core.BooleanOut; /** * (Optional) ID of a dedicated host that the instance will be assigned to. Use when an instance is to * be launched on a specific dedicated host. */ hostId?: string | core.StringOut; /** * (Optional) IAM Instance Profile to launch the instance with. Specified as the name of the Instance P * rofile. Ensure your credentials have the correct permission to assign the instance profile according * to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role * ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`. */ iamInstanceProfile?: string | core.StringOut; /** * (Optional) Shutdown behavior for the instance. Amazon defaults this to `stop` for EBS-backed instanc * es and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shu * tdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using * _ChangingInstanceInitiatedShutdownBehavior) for more information. */ instanceInitiatedShutdownBehavior?: string | core.StringOut; /** * (Optional) The instance type to use for the instance. Updates to this field will trigger a stop/star * t of the EC2 instance. */ instanceType?: string | core.StringOut; ipv6AddressCount?: number | core.NumberOut; /** * (Optional) Specify one or more IPv6 addresses from the range of the subnet to associate with the pri * mary network interface */ ipv6Addresses?: core.Array | core.ArrayOut; /** * (Optional) Key name of the Key Pair to use for the instance; which can be managed using [the `aws_ke * y_pair` resource](key_pair.html). */ keyName?: string | core.StringOut; /** * (Optional) Specifies a Launch Template to configure the instance. Parameters configured on this reso * urce will override the corresponding parameters in the Launch Template. */ launchTemplate?: LaunchTemplate; /** * (Optional) The maintenance and recovery options for the instance. See [Maintenance Options](#mainten * ance-options) below for more details. */ maintenanceOptions?: MaintenanceOptions; /** * (Optional) Customize the metadata options of the instance. See [Metadata Options](#metadata-options) * below for more details. */ metadataOptions?: MetadataOptions; /** * (Optional) If true, the launched EC2 instance will have detailed monitoring enabled. (Available sinc * e v0.6.0) */ monitoring?: boolean | core.BooleanOut; /** * (Optional) Customize network interfaces to be attached at instance boot time. See [Network Interface * s](#network-interfaces) below for more details. */ networkInterface?: | core.Array | core.ArrayOut; /** * (Optional) Placement Group to start the instance in. */ placementGroup?: string | core.StringOut; /** * (Optional) The number of the partition the instance is in. Valid only if [the `aws_placement_group` * resource's](placement_group.html) `strategy` argument is set to `"partition"`. */ placementPartitionNumber?: number | core.NumberOut; /** * (Optional) The options for the instance hostname. The default values are inherited from the subnet. * See [Private DNS Name Options](#private-dns-name-options) below for more details. */ privateDnsNameOptions?: PrivateDnsNameOptions; /** * (Optional) Private IP address to associate with the instance in a VPC. */ privateIp?: string | core.StringOut; /** * (Optional) Configuration block to customize details about the root block device of the instance. See * [Block Devices](#ebs-ephemeral-and-root-block-devices) below for details. When accessing this as an * attribute reference, it is a list containing one object. */ rootBlockDevice?: RootBlockDevice; /** * (Optional) A list of secondary private IPv4 addresses to assign to the instance's primary network in * terface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at in * stance creation, not a pre-existing network interface i.e., referenced in a `network_interface` bloc * k. Refer to the [Elastic network interfaces documentation](https://docs.aws.amazon.com/AWSEC2/latest * /UserGuide/using-eni.html#AvailableIpPerENI) to see the maximum number of private IP addresses allow * ed per instance type. */ secondaryPrivateIps?: core.Array | core.ArrayOut; /** * (Optional, EC2-Classic and default VPC only) A list of security group names to associate with. */ securityGroups?: core.Array | core.ArrayOut; /** * (Optional) Controls if traffic is routed to the instance when the destination address does not match * the instance. Used for NAT or VPNs. Defaults true. */ sourceDestCheck?: boolean | core.BooleanOut; /** * (Optional) VPC Subnet ID to launch in. */ subnetId?: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. Note that these tags apply to the instance and n * ot block storage devices. If configured with a provider [`default_tags` configuration block](https:/ * /registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present * , tags with matching 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) Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy * of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-insta * nce command. */ tenancy?: string | core.StringOut; /** * (Optional) User data to provide when launching the instance. Do not pass gzip-compressed data via th * is argument; see `user_data_base64` instead. Updates to this field will trigger a stop/start of the * EC2 instance by default. If the `user_data_replace_on_change` is set then updates to this field will * trigger a destroy and recreate. */ userData?: string | core.StringOut; /** * (Optional) Can be used instead of `user_data` to pass base64-encoded binary data directly. Use this * instead of `user_data` whenever the value is not a valid UTF-8 string. For example, gzip-encoded use * r data must be base64-encoded and passed via this argument to avoid corruption. Updates to this fiel * d will trigger a stop/start of the EC2 instance by default. If the `user_data_replace_on_change` is * set then updates to this field will trigger a destroy and recreate. */ userDataBase64?: string | core.StringOut; /** * (Optional) When used in combination with `user_data` or `user_data_base64` will trigger a destroy an * d recreate when set to `true`. Defaults to `false` if not set. */ userDataReplaceOnChange?: boolean | core.BooleanOut; /** * (Optional) A map of tags to assign, at instance-creation time, to root and EBS volumes. */ volumeTags?: core.Map | core.MapOut; /** * (Optional, VPC only) A list of security group IDs to associate with. */ vpcSecurityGroupIds?: core.Array | core.ArrayOut; } export class Instance extends core.Resource { /** * (Optional) AMI to use for the instance. Required unless `launch_template` is specified and the Launc * h Template specifes an AMI. If an AMI is specified in the Launch Template, setting `ami` will overri * de the AMI specified in the Launch Template. */ @core.attr(String, { computed: true }) public ami?: string | core.StringOut; /** * The ARN of the instance. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) Whether to associate a public IP address with an instance in a VPC. */ @core.attr(Boolean, { computed: true }) public associatePublicIpAddress?: boolean | core.BooleanOut; /** * (Optional) AZ to start the instance in. */ @core.attr(String, { computed: true }) public availabilityZone?: string | core.StringOut; /** * (Optional) Describes an instance's Capacity Reservation targeting option. See [Capacity Reservation * Specification](#capacity-reservation-specification) below for more details. */ @core.attr(CapacityReservationSpecification, { computed: true }) public capacityReservationSpecification?: CapacityReservationSpecification; /** * (Optional) Sets the number of CPU cores for an instance. This option is only supported on creation o * f instance type that support CPU Options [CPU Cores and Threads Per CPU Core Per Instance Type](http * s://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-ins * tances-values) - specifying this option for unsupported instance types will return an error from the * EC2 API. */ @core.attr(Number, { computed: true }) public cpuCoreCount?: number | core.NumberOut; /** * (Optional - has no effect unless `cpu_core_count` is also set) If set to to 1, hyperthreading is di * sabled on the launched instance. Defaults to 2 if not set. See [Optimizing CPU Options](https://docs * .aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) for more information. */ @core.attr(Number, { computed: true }) public cpuThreadsPerCore?: number | core.NumberOut; /** * (Optional) Configuration block for customizing the credit specification of the instance. See [Credit * Specification](#credit-specification) below for more details. Terraform will only perform drift det * ection of its value when present in a configuration. Removing this configuration on existing instanc * es will only stop managing it. It will not change the configuration back to the default for the inst * ance type. */ @core.attr(CreditSpecification) public creditSpecification?: CreditSpecification; /** * (Optional) If true, enables [EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest * /UserGuide/Stop_Start.html#Using_StopProtection). */ @core.attr(Boolean, { computed: true }) public disableApiStop?: boolean | core.BooleanOut; /** * (Optional) If true, enables [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2 * /latest/UserGuide/terminating-instances.html#Using_ChangingDisableAPITermination). */ @core.attr(Boolean, { computed: true }) public disableApiTermination?: boolean | core.BooleanOut; /** * (Optional) One or more configuration blocks with additional EBS block devices to attach to the insta * nce. Block device configurations only apply on resource creation. See [Block Devices](#ebs-ephemeral * and-root-block-devices) below for details on attributes and drift detection. When accessing this as * an attribute reference, it is a set of objects. */ @core.attr(EbsBlockDevice, { computed: true, kind: "array" }) public ebsBlockDevice?: | core.Array | core.ArrayOut; /** * (Optional) If true, the launched EC2 instance will be EBS-optimized. Note that if this is not set on * an instance type that is optimized by default then this will show as disabled but if the instance t * ype is optimized by default then there is no need to set this and there is no effect to disabling it * . See the [EBS Optimized section](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.h * tml) of the AWS User Guide for more information. */ @core.attr(Boolean, { computed: true }) public ebsOptimized?: boolean | core.BooleanOut; /** * (Optional) Enable Nitro Enclaves on launched instances. See [Enclave Options](#enclave-options) belo * w for more details. */ @core.attr(EnclaveOptions, { computed: true }) public enclaveOptions?: EnclaveOptions; /** * (Optional) One or more configuration blocks to customize Ephemeral (also known as "Instance Store") * volumes on the instance. See [Block Devices](#ebs-ephemeral-and-root-block-devices) below for detail * s. When accessing this as an attribute reference, it is a set of objects. */ @core.attr(EphemeralBlockDevice, { computed: true, kind: "array" }) public ephemeralBlockDevice?: | core.Array | core.ArrayOut; /** * (Optional) If true, wait for password data to become available and retrieve it. Useful for getting t * he administrator password for instances running Microsoft Windows. The password data is exported to * the `password_data` attribute. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIRe * ference/API_GetPasswordData.html) for more information. */ @core.attr(Boolean) public getPasswordData?: boolean | core.BooleanOut; /** * (Optional) If true, the launched EC2 instance will support hibernation. */ @core.attr(Boolean) public hibernation?: boolean | core.BooleanOut; /** * (Optional) ID of a dedicated host that the instance will be assigned to. Use when an instance is to * be launched on a specific dedicated host. */ @core.attr(String, { computed: true }) public hostId?: string | core.StringOut; /** * (Optional) IAM Instance Profile to launch the instance with. Specified as the name of the Instance P * rofile. Ensure your credentials have the correct permission to assign the instance profile according * to the [EC2 documentation](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role * ec2.html#roles-usingrole-ec2instance-permissions), notably `iam:PassRole`. */ @core.attr(String) public iamInstanceProfile?: string | core.StringOut; /** * The ID of the launch template. Conflicts with `name`. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Shutdown behavior for the instance. Amazon defaults this to `stop` for EBS-backed instanc * es and `terminate` for instance-store instances. Cannot be set on instance-store instances. See [Shu * tdown Behavior](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#Using * _ChangingInstanceInitiatedShutdownBehavior) for more information. */ @core.attr(String, { computed: true }) public instanceInitiatedShutdownBehavior?: string | core.StringOut; /** * The state of the instance. One of: `pending`, `running`, `shutting-down`, `terminated`, `stopping`, * stopped`. See [Instance Lifecycle](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance * lifecycle.html) for more information. */ @core.attr(String, { computed: true }) public instanceState!: string | core.StringOut; /** * (Optional) The instance type to use for the instance. Updates to this field will trigger a stop/star * t of the EC2 instance. */ @core.attr(String, { computed: true }) public instanceType?: string | core.StringOut; @core.attr(Number, { computed: true }) public ipv6AddressCount?: number | core.NumberOut; /** * (Optional) Specify one or more IPv6 addresses from the range of the subnet to associate with the pri * mary network interface */ @core.attr(String, { computed: true, kind: "array" }) public ipv6Addresses?: core.Array | core.ArrayOut; /** * (Optional) Key name of the Key Pair to use for the instance; which can be managed using [the `aws_ke * y_pair` resource](key_pair.html). */ @core.attr(String, { computed: true }) public keyName?: string | core.StringOut; /** * (Optional) Specifies a Launch Template to configure the instance. Parameters configured on this reso * urce will override the corresponding parameters in the Launch Template. */ @core.attr(LaunchTemplate) public launchTemplate?: LaunchTemplate; /** * (Optional) The maintenance and recovery options for the instance. See [Maintenance Options](#mainten * ance-options) below for more details. */ @core.attr(MaintenanceOptions, { computed: true }) public maintenanceOptions?: MaintenanceOptions; /** * (Optional) Customize the metadata options of the instance. See [Metadata Options](#metadata-options) * below for more details. */ @core.attr(MetadataOptions, { computed: true }) public metadataOptions?: MetadataOptions; /** * (Optional) If true, the launched EC2 instance will have detailed monitoring enabled. (Available sinc * e v0.6.0) */ @core.attr(Boolean, { computed: true }) public monitoring?: boolean | core.BooleanOut; /** * (Optional) Customize network interfaces to be attached at instance boot time. See [Network Interface * s](#network-interfaces) below for more details. */ @core.attr(NetworkInterface, { computed: true, kind: "array" }) public networkInterface?: | core.Array | core.ArrayOut; /** * The ARN of the Outpost the instance is assigned to. */ @core.attr(String, { computed: true }) public outpostArn!: string | core.StringOut; /** * Base-64 encoded encrypted password data for the instance. Useful for getting the administrator passw * ord for instances running Microsoft Windows. This attribute is only exported if `get_password_data` * is true. Note that this encrypted value will be stored in the state file, as with all exported attri * butes. See [GetPasswordData](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetPasswordD * ata.html) for more information. */ @core.attr(String, { computed: true }) public passwordData!: string | core.StringOut; /** * (Optional) Placement Group to start the instance in. */ @core.attr(String, { computed: true }) public placementGroup?: string | core.StringOut; /** * (Optional) The number of the partition the instance is in. Valid only if [the `aws_placement_group` * resource's](placement_group.html) `strategy` argument is set to `"partition"`. */ @core.attr(Number, { computed: true }) public placementPartitionNumber?: number | core.NumberOut; /** * The ID of the instance's primary network interface. */ @core.attr(String, { computed: true }) public primaryNetworkInterfaceId!: string | core.StringOut; /** * The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only avai * lable if you've enabled DNS hostnames for your VPC. */ @core.attr(String, { computed: true }) public privateDns!: string | core.StringOut; /** * (Optional) The options for the instance hostname. The default values are inherited from the subnet. * See [Private DNS Name Options](#private-dns-name-options) below for more details. */ @core.attr(PrivateDnsNameOptions, { computed: true }) public privateDnsNameOptions?: PrivateDnsNameOptions; /** * (Optional) Private IP address to associate with the instance in a VPC. */ @core.attr(String, { computed: true }) public privateIp?: string | core.StringOut; /** * The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled * DNS hostnames for your VPC. */ @core.attr(String, { computed: true }) public publicDns!: string | core.StringOut; /** * The public IP address assigned to the instance, if applicable. **NOTE**: If you are using an [`aws_e * ip`](/docs/providers/aws/r/eip.html) with your instance, you should refer to the EIP's address direc * tly and not use `public_ip` as this field will change after the EIP is attached. */ @core.attr(String, { computed: true }) public publicIp!: string | core.StringOut; /** * (Optional) Configuration block to customize details about the root block device of the instance. See * [Block Devices](#ebs-ephemeral-and-root-block-devices) below for details. When accessing this as an * attribute reference, it is a list containing one object. */ @core.attr(RootBlockDevice, { computed: true }) public rootBlockDevice?: RootBlockDevice; /** * (Optional) A list of secondary private IPv4 addresses to assign to the instance's primary network in * terface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at in * stance creation, not a pre-existing network interface i.e., referenced in a `network_interface` bloc * k. Refer to the [Elastic network interfaces documentation](https://docs.aws.amazon.com/AWSEC2/latest * /UserGuide/using-eni.html#AvailableIpPerENI) to see the maximum number of private IP addresses allow * ed per instance type. */ @core.attr(String, { computed: true, kind: "array" }) public secondaryPrivateIps?: | core.Array | core.ArrayOut; /** * (Optional, EC2-Classic and default VPC only) A list of security group names to associate with. */ @core.attr(String, { computed: true, kind: "array" }) public securityGroups?: core.Array | core.ArrayOut; /** * (Optional) Controls if traffic is routed to the instance when the destination address does not match * the instance. Used for NAT or VPNs. Defaults true. */ @core.attr(Boolean) public sourceDestCheck?: boolean | core.BooleanOut; /** * (Optional) VPC Subnet ID to launch in. */ @core.attr(String, { computed: true }) public subnetId?: string | core.StringOut; /** * (Optional) A map of tags to assign to the resource. Note that these tags apply to the instance and n * ot block storage devices. If configured with a provider [`default_tags` configuration block](https:/ * /registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configuration-block) present * , tags with matching 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) Tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy * of dedicated runs on single-tenant hardware. The host tenancy is not supported for the import-insta * nce command. */ @core.attr(String, { computed: true }) public tenancy?: string | core.StringOut; /** * (Optional) User data to provide when launching the instance. Do not pass gzip-compressed data via th * is argument; see `user_data_base64` instead. Updates to this field will trigger a stop/start of the * EC2 instance by default. If the `user_data_replace_on_change` is set then updates to this field will * trigger a destroy and recreate. */ @core.attr(String, { computed: true }) public userData?: string | core.StringOut; /** * (Optional) Can be used instead of `user_data` to pass base64-encoded binary data directly. Use this * instead of `user_data` whenever the value is not a valid UTF-8 string. For example, gzip-encoded use * r data must be base64-encoded and passed via this argument to avoid corruption. Updates to this fiel * d will trigger a stop/start of the EC2 instance by default. If the `user_data_replace_on_change` is * set then updates to this field will trigger a destroy and recreate. */ @core.attr(String, { computed: true }) public userDataBase64?: string | core.StringOut; /** * (Optional) When used in combination with `user_data` or `user_data_base64` will trigger a destroy an * d recreate when set to `true`. Defaults to `false` if not set. */ @core.attr(Boolean) public userDataReplaceOnChange?: boolean | core.BooleanOut; /** * (Optional) A map of tags to assign, at instance-creation time, to root and EBS volumes. */ @core.attr(String, { kind: "map" }) public volumeTags?: core.Map | core.MapOut; /** * (Optional, VPC only) A list of security group IDs to associate with. */ @core.attr(String, { computed: true, kind: "array" }) public vpcSecurityGroupIds?: | core.Array | core.ArrayOut; constructor(name: string, args?: InstanceArgs) { super(name, "aws_instance", args); } public override getNamespace(): string { return "aws_ec2"; } }