import * as core from "@terrascript/core"; 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 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, { computed: true }) public instanceMetadataTags!: 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 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 FilterArgs extends core.SchemaArgs { name: string | core.StringOut; values: core.Array | core.ArrayOut; } export class Filter extends core.Schema { @core.attr(String) public name!: string | core.StringOut; @core.attr(String, { kind: "array" }) public values!: core.Array | core.ArrayOut; } export interface CreditSpecificationArgs extends core.SchemaArgs { cpuCredits: string | core.StringOut; } export class CreditSpecification extends core.Schema { @core.attr(String, { computed: true }) public cpuCredits!: 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, { computed: true }) 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, { computed: true, 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 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, { computed: true }) 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, { computed: true }) public snapshotId!: string | core.StringOut; @core.attr(String, { computed: true, 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 DsInstanceArgs { /** * (Optional) One or more name/value pairs to use as filters. There are */ filter?: 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) Retrieve Base64 encoded User Data contents into the `user_data_base64` attribute. A SHA-1 * hash of the User Data contents will always be present in the `user_data` attribute. Defaults to `fa * lse`. */ getUserData?: boolean | core.BooleanOut; /** * (Optional) Specify the exact Instance ID with which to populate the data source. */ instanceId?: string | core.StringOut; /** * (Optional) A map of tags, each pair of which must */ instanceTags?: core.Map | core.MapOut; /** * A map of tags assigned to the Instance. */ tags?: core.Map | core.MapOut; } export class DsInstance extends core.Data { /** * The ID of the AMI used to launch the instance. */ @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; /** * Whether or not the Instance is associated with a public IP address or not (Boolean). */ @core.attr(Boolean, { computed: true }) public associatePublicIpAddress!: boolean | core.BooleanOut; /** * The availability zone of the Instance. */ @core.attr(String, { computed: true }) public availabilityZone!: string | core.StringOut; /** * The credit specification of the Instance. */ @core.attr(CreditSpecification, { computed: true, kind: "array" }) public creditSpecification!: | core.Array | core.ArrayOut; /** * Whether or not EC2 Instance Stop Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Sto * p_Start.html#Using_StopProtection) is enabled (Boolean). */ @core.attr(Boolean, { computed: true }) public disableApiStop!: boolean | core.BooleanOut; /** * Whether or not [EC2 Instance Termination Protection](https://docs.aws.amazon.com/AWSEC2/latest/UserG * uide/terminating-instances.html#Using_ChangingDisableAPITermination) is enabled (Boolean). */ @core.attr(Boolean, { computed: true }) public disableApiTermination!: boolean | core.BooleanOut; /** * The EBS block device mappings of the Instance. */ @core.attr(EbsBlockDevice, { computed: true, kind: "array" }) public ebsBlockDevice!: | core.Array | core.ArrayOut; /** * Whether the Instance is EBS optimized or not (Boolean). */ @core.attr(Boolean, { computed: true }) public ebsOptimized!: boolean | core.BooleanOut; /** * The enclave options of the instance. */ @core.attr(EnclaveOptions, { computed: true, kind: "array" }) public enclaveOptions!: | core.Array | core.ArrayOut; /** * The ephemeral block device mappings of the Instance. */ @core.attr(EphemeralBlockDevice, { computed: true, kind: "array" }) public ephemeralBlockDevice!: | core.Array | core.ArrayOut; /** * (Optional) One or more name/value pairs to use as filters. There are */ @core.attr(Filter, { kind: "array" }) public filter?: 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) Retrieve Base64 encoded User Data contents into the `user_data_base64` attribute. A SHA-1 * hash of the User Data contents will always be present in the `user_data` attribute. Defaults to `fa * lse`. */ @core.attr(Boolean) public getUserData?: boolean | core.BooleanOut; /** * The Id of the dedicated host the instance will be assigned to. */ @core.attr(String, { computed: true }) public hostId!: string | core.StringOut; /** * The name of the instance profile associated with the Instance. */ @core.attr(String, { computed: true }) public iamInstanceProfile!: string | core.StringOut; @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Specify the exact Instance ID with which to populate the data source. */ @core.attr(String) public instanceId?: 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) A map of tags, each pair of which must */ @core.attr(String, { computed: true, kind: "map" }) public instanceTags?: core.Map | core.MapOut; /** * The type of the Instance. */ @core.attr(String, { computed: true }) public instanceType!: string | core.StringOut; /** * The IPv6 addresses associated to the Instance, if applicable. **NOTE**: Unlike the IPv4 address, thi * s doesn't change if you attach an EIP to the instance. */ @core.attr(String, { computed: true, kind: "array" }) public ipv6Addresses!: core.Array | core.ArrayOut; /** * The key name of the Instance. */ @core.attr(String, { computed: true }) public keyName!: string | core.StringOut; /** * The maintenance and recovery options for the instance. */ @core.attr(MaintenanceOptions, { computed: true, kind: "array" }) public maintenanceOptions!: | core.Array | core.ArrayOut; /** * The metadata options of the Instance. */ @core.attr(MetadataOptions, { computed: true, kind: "array" }) public metadataOptions!: | core.Array | core.ArrayOut; /** * Whether detailed monitoring is enabled or disabled for the Instance (Boolean). */ @core.attr(Boolean, { computed: true }) public monitoring!: boolean | core.BooleanOut; /** * The ID of the network interface that was created with the Instance. */ @core.attr(String, { computed: true }) public networkInterfaceId!: string | core.StringOut; /** * The Amazon Resource Name (ARN) of the Outpost. */ @core.attr(String, { computed: true }) public outpostArn!: string | core.StringOut; /** * Base-64 encoded encrypted password data for the instance. */ @core.attr(String, { computed: true }) public passwordData!: string | core.StringOut; /** * The placement group of the Instance. */ @core.attr(String, { computed: true }) public placementGroup!: string | core.StringOut; /** * The number of the partition the instance is in. */ @core.attr(Number, { computed: true }) public placementPartitionNumber!: number | core.NumberOut; /** * The private DNS name assigned to the Instance. Can only be */ @core.attr(String, { computed: true }) public privateDns!: string | core.StringOut; /** * The options for the instance hostname. */ @core.attr(PrivateDnsNameOptions, { computed: true, kind: "array" }) public privateDnsNameOptions!: | core.Array | core.ArrayOut; /** * The private IP address assigned to the Instance. */ @core.attr(String, { computed: true }) public privateIp!: string | core.StringOut; /** * The public DNS name assigned to the Instance. For EC2-VPC, this */ @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; /** * The root block device mappings of the Instance */ @core.attr(RootBlockDevice, { computed: true, kind: "array" }) public rootBlockDevice!: | core.Array | core.ArrayOut; /** * The secondary private IPv4 addresses assigned to the instance's primary network interface (eth0) in * a VPC. */ @core.attr(String, { computed: true, kind: "array" }) public secondaryPrivateIps!: | core.Array | core.ArrayOut; /** * The associated security groups. */ @core.attr(String, { computed: true, kind: "array" }) public securityGroups!: core.Array | core.ArrayOut; /** * Whether the network interface performs source/destination checking (Boolean). */ @core.attr(Boolean, { computed: true }) public sourceDestCheck!: boolean | core.BooleanOut; /** * The VPC subnet ID. */ @core.attr(String, { computed: true }) public subnetId!: string | core.StringOut; /** * A map of tags assigned to the Instance. */ @core.attr(String, { computed: true, kind: "map" }) public tags?: core.Map | core.MapOut; /** * The tenancy of the instance: `dedicated`, `default`, `host`. */ @core.attr(String, { computed: true }) public tenancy!: string | core.StringOut; /** * SHA-1 hash of User Data supplied to the Instance. */ @core.attr(String, { computed: true }) public userData!: string | core.StringOut; /** * Base64 encoded contents of User Data supplied to the Instance. Valid UTF-8 contents can be decoded w * ith the [`base64decode` function](https://www.terraform.io/docs/configuration/functions/base64decode * .html). This attribute is only exported if `get_user_data` is true. */ @core.attr(String, { computed: true }) public userDataBase64!: string | core.StringOut; /** * The associated security groups in a non-default VPC. */ @core.attr(String, { computed: true, kind: "array" }) public vpcSecurityGroupIds!: | core.Array | core.ArrayOut; constructor(name: string, args?: DsInstanceArgs) { super(name, "aws_instance", args); } public override getNamespace(): string { return "aws_ec2"; } }