1. Packages
  2. AWS Classic
  3. API Docs
  4. ec2
  5. Instance

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

aws.ec2.Instance

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    Provides an EC2 instance resource. This allows instances to be created, updated, and deleted.

    Example Usage

    Basic example using AMI lookup

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const ubuntu = aws.ec2.getAmi({
        mostRecent: true,
        filters: [
            {
                name: "name",
                values: ["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"],
            },
            {
                name: "virtualization-type",
                values: ["hvm"],
            },
        ],
        owners: ["099720109477"],
    });
    const web = new aws.ec2.Instance("web", {
        ami: ubuntu.then(ubuntu => ubuntu.id),
        instanceType: aws.ec2.InstanceType.T3_Micro,
        tags: {
            Name: "HelloWorld",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    ubuntu = aws.ec2.get_ami(most_recent=True,
        filters=[
            aws.ec2.GetAmiFilterArgs(
                name="name",
                values=["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"],
            ),
            aws.ec2.GetAmiFilterArgs(
                name="virtualization-type",
                values=["hvm"],
            ),
        ],
        owners=["099720109477"])
    web = aws.ec2.Instance("web",
        ami=ubuntu.id,
        instance_type=aws.ec2.InstanceType.T3_MICRO,
        tags={
            "Name": "HelloWorld",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ubuntu, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{
    			MostRecent: pulumi.BoolRef(true),
    			Filters: []ec2.GetAmiFilter{
    				{
    					Name: "name",
    					Values: []string{
    						"ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*",
    					},
    				},
    				{
    					Name: "virtualization-type",
    					Values: []string{
    						"hvm",
    					},
    				},
    			},
    			Owners: []string{
    				"099720109477",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewInstance(ctx, "web", &ec2.InstanceArgs{
    			Ami:          pulumi.String(ubuntu.Id),
    			InstanceType: pulumi.String(ec2.InstanceType_T3_Micro),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("HelloWorld"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var ubuntu = Aws.Ec2.GetAmi.Invoke(new()
        {
            MostRecent = true,
            Filters = new[]
            {
                new Aws.Ec2.Inputs.GetAmiFilterInputArgs
                {
                    Name = "name",
                    Values = new[]
                    {
                        "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*",
                    },
                },
                new Aws.Ec2.Inputs.GetAmiFilterInputArgs
                {
                    Name = "virtualization-type",
                    Values = new[]
                    {
                        "hvm",
                    },
                },
            },
            Owners = new[]
            {
                "099720109477",
            },
        });
    
        var web = new Aws.Ec2.Instance("web", new()
        {
            Ami = ubuntu.Apply(getAmiResult => getAmiResult.Id),
            InstanceType = Aws.Ec2.InstanceType.T3_Micro,
            Tags = 
            {
                { "Name", "HelloWorld" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.Ec2Functions;
    import com.pulumi.aws.ec2.inputs.GetAmiArgs;
    import com.pulumi.aws.ec2.Instance;
    import com.pulumi.aws.ec2.InstanceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var ubuntu = Ec2Functions.getAmi(GetAmiArgs.builder()
                .mostRecent(true)
                .filters(            
                    GetAmiFilterArgs.builder()
                        .name("name")
                        .values("ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*")
                        .build(),
                    GetAmiFilterArgs.builder()
                        .name("virtualization-type")
                        .values("hvm")
                        .build())
                .owners("099720109477")
                .build());
    
            var web = new Instance("web", InstanceArgs.builder()
                .ami(ubuntu.applyValue(getAmiResult -> getAmiResult.id()))
                .instanceType("t3.micro")
                .tags(Map.of("Name", "HelloWorld"))
                .build());
    
        }
    }
    
    resources:
      web:
        type: aws:ec2:Instance
        properties:
          ami: ${ubuntu.id}
          instanceType: t3.micro
          tags:
            Name: HelloWorld
    variables:
      ubuntu:
        fn::invoke:
          Function: aws:ec2:getAmi
          Arguments:
            mostRecent: true
            filters:
              - name: name
                values:
                  - ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*
              - name: virtualization-type
                values:
                  - hvm
            owners:
              - '099720109477'
    

    Spot instance example

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const this = aws.ec2.getAmi({
        mostRecent: true,
        owners: ["amazon"],
        filters: [
            {
                name: "architecture",
                values: ["arm64"],
            },
            {
                name: "name",
                values: ["al2023-ami-2023*"],
            },
        ],
    });
    const thisInstance = new aws.ec2.Instance("this", {
        ami: _this.then(_this => _this.id),
        instanceMarketOptions: {
            spotOptions: {
                maxPrice: "0.0031",
            },
        },
        instanceType: aws.ec2.InstanceType.T4g_Nano,
        tags: {
            Name: "test-spot",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    this = aws.ec2.get_ami(most_recent=True,
        owners=["amazon"],
        filters=[
            aws.ec2.GetAmiFilterArgs(
                name="architecture",
                values=["arm64"],
            ),
            aws.ec2.GetAmiFilterArgs(
                name="name",
                values=["al2023-ami-2023*"],
            ),
        ])
    this_instance = aws.ec2.Instance("this",
        ami=this.id,
        instance_market_options=aws.ec2.InstanceInstanceMarketOptionsArgs(
            spot_options=aws.ec2.InstanceInstanceMarketOptionsSpotOptionsArgs(
                max_price="0.0031",
            ),
        ),
        instance_type=aws.ec2.InstanceType.T4G_NANO,
        tags={
            "Name": "test-spot",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		this, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{
    			MostRecent: pulumi.BoolRef(true),
    			Owners: []string{
    				"amazon",
    			},
    			Filters: []ec2.GetAmiFilter{
    				{
    					Name: "architecture",
    					Values: []string{
    						"arm64",
    					},
    				},
    				{
    					Name: "name",
    					Values: []string{
    						"al2023-ami-2023*",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewInstance(ctx, "this", &ec2.InstanceArgs{
    			Ami: pulumi.String(this.Id),
    			InstanceMarketOptions: &ec2.InstanceInstanceMarketOptionsArgs{
    				SpotOptions: &ec2.InstanceInstanceMarketOptionsSpotOptionsArgs{
    					MaxPrice: pulumi.String("0.0031"),
    				},
    			},
    			InstanceType: pulumi.String(ec2.InstanceType_T4g_Nano),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("test-spot"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Aws.Ec2.GetAmi.Invoke(new()
        {
            MostRecent = true,
            Owners = new[]
            {
                "amazon",
            },
            Filters = new[]
            {
                new Aws.Ec2.Inputs.GetAmiFilterInputArgs
                {
                    Name = "architecture",
                    Values = new[]
                    {
                        "arm64",
                    },
                },
                new Aws.Ec2.Inputs.GetAmiFilterInputArgs
                {
                    Name = "name",
                    Values = new[]
                    {
                        "al2023-ami-2023*",
                    },
                },
            },
        });
    
        var thisInstance = new Aws.Ec2.Instance("this", new()
        {
            Ami = @this.Apply(@this => @this.Apply(getAmiResult => getAmiResult.Id)),
            InstanceMarketOptions = new Aws.Ec2.Inputs.InstanceInstanceMarketOptionsArgs
            {
                SpotOptions = new Aws.Ec2.Inputs.InstanceInstanceMarketOptionsSpotOptionsArgs
                {
                    MaxPrice = "0.0031",
                },
            },
            InstanceType = Aws.Ec2.InstanceType.T4g_Nano,
            Tags = 
            {
                { "Name", "test-spot" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.Ec2Functions;
    import com.pulumi.aws.ec2.inputs.GetAmiArgs;
    import com.pulumi.aws.ec2.Instance;
    import com.pulumi.aws.ec2.InstanceArgs;
    import com.pulumi.aws.ec2.inputs.InstanceInstanceMarketOptionsArgs;
    import com.pulumi.aws.ec2.inputs.InstanceInstanceMarketOptionsSpotOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var this = Ec2Functions.getAmi(GetAmiArgs.builder()
                .mostRecent(true)
                .owners("amazon")
                .filters(            
                    GetAmiFilterArgs.builder()
                        .name("architecture")
                        .values("arm64")
                        .build(),
                    GetAmiFilterArgs.builder()
                        .name("name")
                        .values("al2023-ami-2023*")
                        .build())
                .build());
    
            var thisInstance = new Instance("thisInstance", InstanceArgs.builder()
                .ami(this_.id())
                .instanceMarketOptions(InstanceInstanceMarketOptionsArgs.builder()
                    .spotOptions(InstanceInstanceMarketOptionsSpotOptionsArgs.builder()
                        .maxPrice(0.0031)
                        .build())
                    .build())
                .instanceType("t4g.nano")
                .tags(Map.of("Name", "test-spot"))
                .build());
    
        }
    }
    
    resources:
      thisInstance:
        type: aws:ec2:Instance
        name: this
        properties:
          ami: ${this.id}
          instanceMarketOptions:
            spotOptions:
              maxPrice: 0.0031
          instanceType: t4g.nano
          tags:
            Name: test-spot
    variables:
      this:
        fn::invoke:
          Function: aws:ec2:getAmi
          Arguments:
            mostRecent: true
            owners:
              - amazon
            filters:
              - name: architecture
                values:
                  - arm64
              - name: name
                values:
                  - al2023-ami-2023*
    

    Network and credit specification example

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const myVpc = new aws.ec2.Vpc("my_vpc", {
        cidrBlock: "172.16.0.0/16",
        tags: {
            Name: "tf-example",
        },
    });
    const mySubnet = new aws.ec2.Subnet("my_subnet", {
        vpcId: myVpc.id,
        cidrBlock: "172.16.10.0/24",
        availabilityZone: "us-west-2a",
        tags: {
            Name: "tf-example",
        },
    });
    const foo = new aws.ec2.NetworkInterface("foo", {
        subnetId: mySubnet.id,
        privateIps: ["172.16.10.100"],
        tags: {
            Name: "primary_network_interface",
        },
    });
    const fooInstance = new aws.ec2.Instance("foo", {
        ami: "ami-005e54dee72cc1d00",
        instanceType: aws.ec2.InstanceType.T2_Micro,
        networkInterfaces: [{
            networkInterfaceId: foo.id,
            deviceIndex: 0,
        }],
        creditSpecification: {
            cpuCredits: "unlimited",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    my_vpc = aws.ec2.Vpc("my_vpc",
        cidr_block="172.16.0.0/16",
        tags={
            "Name": "tf-example",
        })
    my_subnet = aws.ec2.Subnet("my_subnet",
        vpc_id=my_vpc.id,
        cidr_block="172.16.10.0/24",
        availability_zone="us-west-2a",
        tags={
            "Name": "tf-example",
        })
    foo = aws.ec2.NetworkInterface("foo",
        subnet_id=my_subnet.id,
        private_ips=["172.16.10.100"],
        tags={
            "Name": "primary_network_interface",
        })
    foo_instance = aws.ec2.Instance("foo",
        ami="ami-005e54dee72cc1d00",
        instance_type=aws.ec2.InstanceType.T2_MICRO,
        network_interfaces=[aws.ec2.InstanceNetworkInterfaceArgs(
            network_interface_id=foo.id,
            device_index=0,
        )],
        credit_specification=aws.ec2.InstanceCreditSpecificationArgs(
            cpu_credits="unlimited",
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myVpc, err := ec2.NewVpc(ctx, "my_vpc", &ec2.VpcArgs{
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("tf-example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		mySubnet, err := ec2.NewSubnet(ctx, "my_subnet", &ec2.SubnetArgs{
    			VpcId:            myVpc.ID(),
    			CidrBlock:        pulumi.String("172.16.10.0/24"),
    			AvailabilityZone: pulumi.String("us-west-2a"),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("tf-example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		foo, err := ec2.NewNetworkInterface(ctx, "foo", &ec2.NetworkInterfaceArgs{
    			SubnetId: mySubnet.ID(),
    			PrivateIps: pulumi.StringArray{
    				pulumi.String("172.16.10.100"),
    			},
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("primary_network_interface"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewInstance(ctx, "foo", &ec2.InstanceArgs{
    			Ami:          pulumi.String("ami-005e54dee72cc1d00"),
    			InstanceType: pulumi.String(ec2.InstanceType_T2_Micro),
    			NetworkInterfaces: ec2.InstanceNetworkInterfaceArray{
    				&ec2.InstanceNetworkInterfaceArgs{
    					NetworkInterfaceId: foo.ID(),
    					DeviceIndex:        pulumi.Int(0),
    				},
    			},
    			CreditSpecification: &ec2.InstanceCreditSpecificationArgs{
    				CpuCredits: pulumi.String("unlimited"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var myVpc = new Aws.Ec2.Vpc("my_vpc", new()
        {
            CidrBlock = "172.16.0.0/16",
            Tags = 
            {
                { "Name", "tf-example" },
            },
        });
    
        var mySubnet = new Aws.Ec2.Subnet("my_subnet", new()
        {
            VpcId = myVpc.Id,
            CidrBlock = "172.16.10.0/24",
            AvailabilityZone = "us-west-2a",
            Tags = 
            {
                { "Name", "tf-example" },
            },
        });
    
        var foo = new Aws.Ec2.NetworkInterface("foo", new()
        {
            SubnetId = mySubnet.Id,
            PrivateIps = new[]
            {
                "172.16.10.100",
            },
            Tags = 
            {
                { "Name", "primary_network_interface" },
            },
        });
    
        var fooInstance = new Aws.Ec2.Instance("foo", new()
        {
            Ami = "ami-005e54dee72cc1d00",
            InstanceType = Aws.Ec2.InstanceType.T2_Micro,
            NetworkInterfaces = new[]
            {
                new Aws.Ec2.Inputs.InstanceNetworkInterfaceArgs
                {
                    NetworkInterfaceId = foo.Id,
                    DeviceIndex = 0,
                },
            },
            CreditSpecification = new Aws.Ec2.Inputs.InstanceCreditSpecificationArgs
            {
                CpuCredits = "unlimited",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.Vpc;
    import com.pulumi.aws.ec2.VpcArgs;
    import com.pulumi.aws.ec2.Subnet;
    import com.pulumi.aws.ec2.SubnetArgs;
    import com.pulumi.aws.ec2.NetworkInterface;
    import com.pulumi.aws.ec2.NetworkInterfaceArgs;
    import com.pulumi.aws.ec2.Instance;
    import com.pulumi.aws.ec2.InstanceArgs;
    import com.pulumi.aws.ec2.inputs.InstanceNetworkInterfaceArgs;
    import com.pulumi.aws.ec2.inputs.InstanceCreditSpecificationArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var myVpc = new Vpc("myVpc", VpcArgs.builder()
                .cidrBlock("172.16.0.0/16")
                .tags(Map.of("Name", "tf-example"))
                .build());
    
            var mySubnet = new Subnet("mySubnet", SubnetArgs.builder()
                .vpcId(myVpc.id())
                .cidrBlock("172.16.10.0/24")
                .availabilityZone("us-west-2a")
                .tags(Map.of("Name", "tf-example"))
                .build());
    
            var foo = new NetworkInterface("foo", NetworkInterfaceArgs.builder()
                .subnetId(mySubnet.id())
                .privateIps("172.16.10.100")
                .tags(Map.of("Name", "primary_network_interface"))
                .build());
    
            var fooInstance = new Instance("fooInstance", InstanceArgs.builder()
                .ami("ami-005e54dee72cc1d00")
                .instanceType("t2.micro")
                .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
                    .networkInterfaceId(foo.id())
                    .deviceIndex(0)
                    .build())
                .creditSpecification(InstanceCreditSpecificationArgs.builder()
                    .cpuCredits("unlimited")
                    .build())
                .build());
    
        }
    }
    
    resources:
      myVpc:
        type: aws:ec2:Vpc
        name: my_vpc
        properties:
          cidrBlock: 172.16.0.0/16
          tags:
            Name: tf-example
      mySubnet:
        type: aws:ec2:Subnet
        name: my_subnet
        properties:
          vpcId: ${myVpc.id}
          cidrBlock: 172.16.10.0/24
          availabilityZone: us-west-2a
          tags:
            Name: tf-example
      foo:
        type: aws:ec2:NetworkInterface
        properties:
          subnetId: ${mySubnet.id}
          privateIps:
            - 172.16.10.100
          tags:
            Name: primary_network_interface
      fooInstance:
        type: aws:ec2:Instance
        name: foo
        properties:
          ami: ami-005e54dee72cc1d00
          instanceType: t2.micro
          networkInterfaces:
            - networkInterfaceId: ${foo.id}
              deviceIndex: 0
          creditSpecification:
            cpuCredits: unlimited
    

    CPU options example

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ec2.Vpc("example", {
        cidrBlock: "172.16.0.0/16",
        tags: {
            Name: "tf-example",
        },
    });
    const exampleSubnet = new aws.ec2.Subnet("example", {
        vpcId: example.id,
        cidrBlock: "172.16.10.0/24",
        availabilityZone: "us-east-2a",
        tags: {
            Name: "tf-example",
        },
    });
    const amzn-linux-2023-ami = aws.ec2.getAmi({
        mostRecent: true,
        owners: ["amazon"],
        filters: [{
            name: "name",
            values: ["al2023-ami-2023.*-x86_64"],
        }],
    });
    const exampleInstance = new aws.ec2.Instance("example", {
        ami: amzn_linux_2023_ami.then(amzn_linux_2023_ami => amzn_linux_2023_ami.id),
        instanceType: aws.ec2.InstanceType.C6a_2XLarge,
        subnetId: exampleSubnet.id,
        cpuOptions: {
            coreCount: 2,
            threadsPerCore: 2,
        },
        tags: {
            Name: "tf-example",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ec2.Vpc("example",
        cidr_block="172.16.0.0/16",
        tags={
            "Name": "tf-example",
        })
    example_subnet = aws.ec2.Subnet("example",
        vpc_id=example.id,
        cidr_block="172.16.10.0/24",
        availability_zone="us-east-2a",
        tags={
            "Name": "tf-example",
        })
    amzn_linux_2023_ami = aws.ec2.get_ami(most_recent=True,
        owners=["amazon"],
        filters=[aws.ec2.GetAmiFilterArgs(
            name="name",
            values=["al2023-ami-2023.*-x86_64"],
        )])
    example_instance = aws.ec2.Instance("example",
        ami=amzn_linux_2023_ami.id,
        instance_type=aws.ec2.InstanceType.C6A_2_X_LARGE,
        subnet_id=example_subnet.id,
        cpu_options=aws.ec2.InstanceCpuOptionsArgs(
            core_count=2,
            threads_per_core=2,
        ),
        tags={
            "Name": "tf-example",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("tf-example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := ec2.NewSubnet(ctx, "example", &ec2.SubnetArgs{
    			VpcId:            example.ID(),
    			CidrBlock:        pulumi.String("172.16.10.0/24"),
    			AvailabilityZone: pulumi.String("us-east-2a"),
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("tf-example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		amzn_linux_2023_ami, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{
    			MostRecent: pulumi.BoolRef(true),
    			Owners: []string{
    				"amazon",
    			},
    			Filters: []ec2.GetAmiFilter{
    				{
    					Name: "name",
    					Values: []string{
    						"al2023-ami-2023.*-x86_64",
    					},
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewInstance(ctx, "example", &ec2.InstanceArgs{
    			Ami:          pulumi.String(amzn_linux_2023_ami.Id),
    			InstanceType: pulumi.String(ec2.InstanceType_C6a_2XLarge),
    			SubnetId:     exampleSubnet.ID(),
    			CpuOptions: &ec2.InstanceCpuOptionsArgs{
    				CoreCount:      pulumi.Int(2),
    				ThreadsPerCore: pulumi.Int(2),
    			},
    			Tags: pulumi.StringMap{
    				"Name": pulumi.String("tf-example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ec2.Vpc("example", new()
        {
            CidrBlock = "172.16.0.0/16",
            Tags = 
            {
                { "Name", "tf-example" },
            },
        });
    
        var exampleSubnet = new Aws.Ec2.Subnet("example", new()
        {
            VpcId = example.Id,
            CidrBlock = "172.16.10.0/24",
            AvailabilityZone = "us-east-2a",
            Tags = 
            {
                { "Name", "tf-example" },
            },
        });
    
        var amzn_linux_2023_ami = Aws.Ec2.GetAmi.Invoke(new()
        {
            MostRecent = true,
            Owners = new[]
            {
                "amazon",
            },
            Filters = new[]
            {
                new Aws.Ec2.Inputs.GetAmiFilterInputArgs
                {
                    Name = "name",
                    Values = new[]
                    {
                        "al2023-ami-2023.*-x86_64",
                    },
                },
            },
        });
    
        var exampleInstance = new Aws.Ec2.Instance("example", new()
        {
            Ami = amzn_linux_2023_ami.Apply(amzn_linux_2023_ami => amzn_linux_2023_ami.Apply(getAmiResult => getAmiResult.Id)),
            InstanceType = Aws.Ec2.InstanceType.C6a_2XLarge,
            SubnetId = exampleSubnet.Id,
            CpuOptions = new Aws.Ec2.Inputs.InstanceCpuOptionsArgs
            {
                CoreCount = 2,
                ThreadsPerCore = 2,
            },
            Tags = 
            {
                { "Name", "tf-example" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.Vpc;
    import com.pulumi.aws.ec2.VpcArgs;
    import com.pulumi.aws.ec2.Subnet;
    import com.pulumi.aws.ec2.SubnetArgs;
    import com.pulumi.aws.ec2.Ec2Functions;
    import com.pulumi.aws.ec2.inputs.GetAmiArgs;
    import com.pulumi.aws.ec2.Instance;
    import com.pulumi.aws.ec2.InstanceArgs;
    import com.pulumi.aws.ec2.inputs.InstanceCpuOptionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Vpc("example", VpcArgs.builder()
                .cidrBlock("172.16.0.0/16")
                .tags(Map.of("Name", "tf-example"))
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
                .vpcId(example.id())
                .cidrBlock("172.16.10.0/24")
                .availabilityZone("us-east-2a")
                .tags(Map.of("Name", "tf-example"))
                .build());
    
            final var amzn-linux-2023-ami = Ec2Functions.getAmi(GetAmiArgs.builder()
                .mostRecent(true)
                .owners("amazon")
                .filters(GetAmiFilterArgs.builder()
                    .name("name")
                    .values("al2023-ami-2023.*-x86_64")
                    .build())
                .build());
    
            var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
                .ami(amzn_linux_2023_ami.id())
                .instanceType("c6a.2xlarge")
                .subnetId(exampleSubnet.id())
                .cpuOptions(InstanceCpuOptionsArgs.builder()
                    .coreCount(2)
                    .threadsPerCore(2)
                    .build())
                .tags(Map.of("Name", "tf-example"))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:Vpc
        properties:
          cidrBlock: 172.16.0.0/16
          tags:
            Name: tf-example
      exampleSubnet:
        type: aws:ec2:Subnet
        name: example
        properties:
          vpcId: ${example.id}
          cidrBlock: 172.16.10.0/24
          availabilityZone: us-east-2a
          tags:
            Name: tf-example
      exampleInstance:
        type: aws:ec2:Instance
        name: example
        properties:
          ami: ${["amzn-linux-2023-ami"].id}
          instanceType: c6a.2xlarge
          subnetId: ${exampleSubnet.id}
          cpuOptions:
            coreCount: 2
            threadsPerCore: 2
          tags:
            Name: tf-example
    variables:
      amzn-linux-2023-ami:
        fn::invoke:
          Function: aws:ec2:getAmi
          Arguments:
            mostRecent: true
            owners:
              - amazon
            filters:
              - name: name
                values:
                  - al2023-ami-2023.*-x86_64
    

    Host resource group or License Manager registered AMI example

    A host resource group is a collection of Dedicated Hosts that you can manage as a single entity. As you launch instances, License Manager allocates the hosts and launches instances on them based on the settings that you configured. You can add existing Dedicated Hosts to a host resource group and take advantage of automated host management through License Manager.

    NOTE: A dedicated host is automatically associated with a License Manager host resource group if Allocate hosts automatically is enabled. Otherwise, use the host_resource_group_arn argument to explicitly associate the instance with the host resource group.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const _this = new aws.ec2.Instance("this", {
        ami: "ami-0dcc1e21636832c5d",
        instanceType: aws.ec2.InstanceType.M5_Large,
        hostResourceGroupArn: "arn:aws:resource-groups:us-west-2:012345678901:group/win-testhost",
        tenancy: "host",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    this = aws.ec2.Instance("this",
        ami="ami-0dcc1e21636832c5d",
        instance_type=aws.ec2.InstanceType.M5_LARGE,
        host_resource_group_arn="arn:aws:resource-groups:us-west-2:012345678901:group/win-testhost",
        tenancy="host")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.NewInstance(ctx, "this", &ec2.InstanceArgs{
    			Ami:                  pulumi.String("ami-0dcc1e21636832c5d"),
    			InstanceType:         pulumi.String(ec2.InstanceType_M5_Large),
    			HostResourceGroupArn: pulumi.String("arn:aws:resource-groups:us-west-2:012345678901:group/win-testhost"),
    			Tenancy:              pulumi.String("host"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Aws.Ec2.Instance("this", new()
        {
            Ami = "ami-0dcc1e21636832c5d",
            InstanceType = Aws.Ec2.InstanceType.M5_Large,
            HostResourceGroupArn = "arn:aws:resource-groups:us-west-2:012345678901:group/win-testhost",
            Tenancy = "host",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ec2.Instance;
    import com.pulumi.aws.ec2.InstanceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var this_ = new Instance("this", InstanceArgs.builder()
                .ami("ami-0dcc1e21636832c5d")
                .instanceType("m5.large")
                .hostResourceGroupArn("arn:aws:resource-groups:us-west-2:012345678901:group/win-testhost")
                .tenancy("host")
                .build());
    
        }
    }
    
    resources:
      this:
        type: aws:ec2:Instance
        properties:
          ami: ami-0dcc1e21636832c5d
          instanceType: m5.large
          hostResourceGroupArn: arn:aws:resource-groups:us-west-2:012345678901:group/win-testhost
          tenancy: host
    

    Tag Guide

    These are the five types of tags you might encounter relative to an aws.ec2.Instance:

    1. Instance tags: Applied to instances but not to ebs_block_device and root_block_device volumes.
    2. Default tags: Applied to the instance and to ebs_block_device and root_block_device volumes.
    3. Volume tags: Applied during creation to ebs_block_device and root_block_device volumes.
    4. Root block device tags: Applied only to the root_block_device volume. These conflict with volume_tags.
    5. EBS block device tags: Applied only to the specific ebs_block_device volume you configure them for and cannot be updated. These conflict with volume_tags.

    Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    Create Instance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Instance(name: string, args?: InstanceArgs, opts?: CustomResourceOptions);
    @overload
    def Instance(resource_name: str,
                 args: Optional[InstanceArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Instance(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 ami: Optional[str] = None,
                 associate_public_ip_address: Optional[bool] = None,
                 availability_zone: Optional[str] = None,
                 capacity_reservation_specification: Optional[InstanceCapacityReservationSpecificationArgs] = None,
                 cpu_core_count: Optional[int] = None,
                 cpu_options: Optional[InstanceCpuOptionsArgs] = None,
                 cpu_threads_per_core: Optional[int] = None,
                 credit_specification: Optional[InstanceCreditSpecificationArgs] = None,
                 disable_api_stop: Optional[bool] = None,
                 disable_api_termination: Optional[bool] = None,
                 ebs_block_devices: Optional[Sequence[InstanceEbsBlockDeviceArgs]] = None,
                 ebs_optimized: Optional[bool] = None,
                 enclave_options: Optional[InstanceEnclaveOptionsArgs] = None,
                 ephemeral_block_devices: Optional[Sequence[InstanceEphemeralBlockDeviceArgs]] = None,
                 get_password_data: Optional[bool] = None,
                 hibernation: Optional[bool] = None,
                 host_id: Optional[str] = None,
                 host_resource_group_arn: Optional[str] = None,
                 iam_instance_profile: Optional[str] = None,
                 instance_initiated_shutdown_behavior: Optional[str] = None,
                 instance_market_options: Optional[InstanceInstanceMarketOptionsArgs] = None,
                 instance_type: Optional[Union[str, InstanceType]] = None,
                 ipv6_address_count: Optional[int] = None,
                 ipv6_addresses: Optional[Sequence[str]] = None,
                 key_name: Optional[str] = None,
                 launch_template: Optional[InstanceLaunchTemplateArgs] = None,
                 maintenance_options: Optional[InstanceMaintenanceOptionsArgs] = None,
                 metadata_options: Optional[InstanceMetadataOptionsArgs] = None,
                 monitoring: Optional[bool] = None,
                 network_interfaces: Optional[Sequence[InstanceNetworkInterfaceArgs]] = None,
                 placement_group: Optional[str] = None,
                 placement_partition_number: Optional[int] = None,
                 private_dns_name_options: Optional[InstancePrivateDnsNameOptionsArgs] = None,
                 private_ip: Optional[str] = None,
                 root_block_device: Optional[InstanceRootBlockDeviceArgs] = None,
                 secondary_private_ips: Optional[Sequence[str]] = None,
                 security_groups: Optional[Sequence[str]] = None,
                 source_dest_check: Optional[bool] = None,
                 subnet_id: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 tenancy: Optional[Union[str, Tenancy]] = None,
                 user_data: Optional[str] = None,
                 user_data_base64: Optional[str] = None,
                 user_data_replace_on_change: Optional[bool] = None,
                 volume_tags: Optional[Mapping[str, str]] = None,
                 vpc_security_group_ids: Optional[Sequence[str]] = None)
    func NewInstance(ctx *Context, name string, args *InstanceArgs, opts ...ResourceOption) (*Instance, error)
    public Instance(string name, InstanceArgs? args = null, CustomResourceOptions? opts = null)
    public Instance(String name, InstanceArgs args)
    public Instance(String name, InstanceArgs args, CustomResourceOptions options)
    
    type: aws:ec2:Instance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var awsInstanceResource = new Aws.Ec2.Instance("awsInstanceResource", new()
    {
        Ami = "string",
        AssociatePublicIpAddress = false,
        AvailabilityZone = "string",
        CapacityReservationSpecification = new Aws.Ec2.Inputs.InstanceCapacityReservationSpecificationArgs
        {
            CapacityReservationPreference = "string",
            CapacityReservationTarget = new Aws.Ec2.Inputs.InstanceCapacityReservationSpecificationCapacityReservationTargetArgs
            {
                CapacityReservationId = "string",
                CapacityReservationResourceGroupArn = "string",
            },
        },
        CpuOptions = new Aws.Ec2.Inputs.InstanceCpuOptionsArgs
        {
            AmdSevSnp = "string",
            CoreCount = 0,
            ThreadsPerCore = 0,
        },
        CreditSpecification = new Aws.Ec2.Inputs.InstanceCreditSpecificationArgs
        {
            CpuCredits = "string",
        },
        DisableApiStop = false,
        DisableApiTermination = false,
        EbsBlockDevices = new[]
        {
            new Aws.Ec2.Inputs.InstanceEbsBlockDeviceArgs
            {
                DeviceName = "string",
                DeleteOnTermination = false,
                Encrypted = false,
                Iops = 0,
                KmsKeyId = "string",
                SnapshotId = "string",
                Tags = 
                {
                    { "string", "string" },
                },
                TagsAll = 
                {
                    { "string", "string" },
                },
                Throughput = 0,
                VolumeId = "string",
                VolumeSize = 0,
                VolumeType = "string",
            },
        },
        EbsOptimized = false,
        EnclaveOptions = new Aws.Ec2.Inputs.InstanceEnclaveOptionsArgs
        {
            Enabled = false,
        },
        EphemeralBlockDevices = new[]
        {
            new Aws.Ec2.Inputs.InstanceEphemeralBlockDeviceArgs
            {
                DeviceName = "string",
                NoDevice = false,
                VirtualName = "string",
            },
        },
        GetPasswordData = false,
        Hibernation = false,
        HostId = "string",
        HostResourceGroupArn = "string",
        IamInstanceProfile = "string",
        InstanceInitiatedShutdownBehavior = "string",
        InstanceMarketOptions = new Aws.Ec2.Inputs.InstanceInstanceMarketOptionsArgs
        {
            MarketType = "string",
            SpotOptions = new Aws.Ec2.Inputs.InstanceInstanceMarketOptionsSpotOptionsArgs
            {
                InstanceInterruptionBehavior = "string",
                MaxPrice = "string",
                SpotInstanceType = "string",
                ValidUntil = "string",
            },
        },
        InstanceType = "string",
        Ipv6AddressCount = 0,
        Ipv6Addresses = new[]
        {
            "string",
        },
        KeyName = "string",
        LaunchTemplate = new Aws.Ec2.Inputs.InstanceLaunchTemplateArgs
        {
            Id = "string",
            Name = "string",
            Version = "string",
        },
        MaintenanceOptions = new Aws.Ec2.Inputs.InstanceMaintenanceOptionsArgs
        {
            AutoRecovery = "string",
        },
        MetadataOptions = new Aws.Ec2.Inputs.InstanceMetadataOptionsArgs
        {
            HttpEndpoint = "string",
            HttpProtocolIpv6 = "string",
            HttpPutResponseHopLimit = 0,
            HttpTokens = "string",
            InstanceMetadataTags = "string",
        },
        Monitoring = false,
        NetworkInterfaces = new[]
        {
            new Aws.Ec2.Inputs.InstanceNetworkInterfaceArgs
            {
                DeviceIndex = 0,
                NetworkInterfaceId = "string",
                DeleteOnTermination = false,
                NetworkCardIndex = 0,
            },
        },
        PlacementGroup = "string",
        PlacementPartitionNumber = 0,
        PrivateDnsNameOptions = new Aws.Ec2.Inputs.InstancePrivateDnsNameOptionsArgs
        {
            EnableResourceNameDnsARecord = false,
            EnableResourceNameDnsAaaaRecord = false,
            HostnameType = "string",
        },
        PrivateIp = "string",
        RootBlockDevice = new Aws.Ec2.Inputs.InstanceRootBlockDeviceArgs
        {
            DeleteOnTermination = false,
            DeviceName = "string",
            Encrypted = false,
            Iops = 0,
            KmsKeyId = "string",
            Tags = 
            {
                { "string", "string" },
            },
            TagsAll = 
            {
                { "string", "string" },
            },
            Throughput = 0,
            VolumeId = "string",
            VolumeSize = 0,
            VolumeType = "string",
        },
        SecondaryPrivateIps = new[]
        {
            "string",
        },
        SourceDestCheck = false,
        SubnetId = "string",
        Tags = 
        {
            { "string", "string" },
        },
        Tenancy = "string",
        UserData = "string",
        UserDataBase64 = "string",
        UserDataReplaceOnChange = false,
        VolumeTags = 
        {
            { "string", "string" },
        },
        VpcSecurityGroupIds = new[]
        {
            "string",
        },
    });
    
    example, err := ec2.NewInstance(ctx, "awsInstanceResource", &ec2.InstanceArgs{
    	Ami:                      pulumi.String("string"),
    	AssociatePublicIpAddress: pulumi.Bool(false),
    	AvailabilityZone:         pulumi.String("string"),
    	CapacityReservationSpecification: &ec2.InstanceCapacityReservationSpecificationArgs{
    		CapacityReservationPreference: pulumi.String("string"),
    		CapacityReservationTarget: &ec2.InstanceCapacityReservationSpecificationCapacityReservationTargetArgs{
    			CapacityReservationId:               pulumi.String("string"),
    			CapacityReservationResourceGroupArn: pulumi.String("string"),
    		},
    	},
    	CpuOptions: &ec2.InstanceCpuOptionsArgs{
    		AmdSevSnp:      pulumi.String("string"),
    		CoreCount:      pulumi.Int(0),
    		ThreadsPerCore: pulumi.Int(0),
    	},
    	CreditSpecification: &ec2.InstanceCreditSpecificationArgs{
    		CpuCredits: pulumi.String("string"),
    	},
    	DisableApiStop:        pulumi.Bool(false),
    	DisableApiTermination: pulumi.Bool(false),
    	EbsBlockDevices: ec2.InstanceEbsBlockDeviceArray{
    		&ec2.InstanceEbsBlockDeviceArgs{
    			DeviceName:          pulumi.String("string"),
    			DeleteOnTermination: pulumi.Bool(false),
    			Encrypted:           pulumi.Bool(false),
    			Iops:                pulumi.Int(0),
    			KmsKeyId:            pulumi.String("string"),
    			SnapshotId:          pulumi.String("string"),
    			Tags: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			TagsAll: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			Throughput: pulumi.Int(0),
    			VolumeId:   pulumi.String("string"),
    			VolumeSize: pulumi.Int(0),
    			VolumeType: pulumi.String("string"),
    		},
    	},
    	EbsOptimized: pulumi.Bool(false),
    	EnclaveOptions: &ec2.InstanceEnclaveOptionsArgs{
    		Enabled: pulumi.Bool(false),
    	},
    	EphemeralBlockDevices: ec2.InstanceEphemeralBlockDeviceArray{
    		&ec2.InstanceEphemeralBlockDeviceArgs{
    			DeviceName:  pulumi.String("string"),
    			NoDevice:    pulumi.Bool(false),
    			VirtualName: pulumi.String("string"),
    		},
    	},
    	GetPasswordData:                   pulumi.Bool(false),
    	Hibernation:                       pulumi.Bool(false),
    	HostId:                            pulumi.String("string"),
    	HostResourceGroupArn:              pulumi.String("string"),
    	IamInstanceProfile:                pulumi.Any("string"),
    	InstanceInitiatedShutdownBehavior: pulumi.String("string"),
    	InstanceMarketOptions: &ec2.InstanceInstanceMarketOptionsArgs{
    		MarketType: pulumi.String("string"),
    		SpotOptions: &ec2.InstanceInstanceMarketOptionsSpotOptionsArgs{
    			InstanceInterruptionBehavior: pulumi.String("string"),
    			MaxPrice:                     pulumi.String("string"),
    			SpotInstanceType:             pulumi.String("string"),
    			ValidUntil:                   pulumi.String("string"),
    		},
    	},
    	InstanceType:     pulumi.String("string"),
    	Ipv6AddressCount: pulumi.Int(0),
    	Ipv6Addresses: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	KeyName: pulumi.String("string"),
    	LaunchTemplate: &ec2.InstanceLaunchTemplateArgs{
    		Id:      pulumi.String("string"),
    		Name:    pulumi.String("string"),
    		Version: pulumi.String("string"),
    	},
    	MaintenanceOptions: &ec2.InstanceMaintenanceOptionsArgs{
    		AutoRecovery: pulumi.String("string"),
    	},
    	MetadataOptions: &ec2.InstanceMetadataOptionsArgs{
    		HttpEndpoint:            pulumi.String("string"),
    		HttpProtocolIpv6:        pulumi.String("string"),
    		HttpPutResponseHopLimit: pulumi.Int(0),
    		HttpTokens:              pulumi.String("string"),
    		InstanceMetadataTags:    pulumi.String("string"),
    	},
    	Monitoring: pulumi.Bool(false),
    	NetworkInterfaces: ec2.InstanceNetworkInterfaceArray{
    		&ec2.InstanceNetworkInterfaceArgs{
    			DeviceIndex:         pulumi.Int(0),
    			NetworkInterfaceId:  pulumi.String("string"),
    			DeleteOnTermination: pulumi.Bool(false),
    			NetworkCardIndex:    pulumi.Int(0),
    		},
    	},
    	PlacementGroup:           pulumi.String("string"),
    	PlacementPartitionNumber: pulumi.Int(0),
    	PrivateDnsNameOptions: &ec2.InstancePrivateDnsNameOptionsArgs{
    		EnableResourceNameDnsARecord:    pulumi.Bool(false),
    		EnableResourceNameDnsAaaaRecord: pulumi.Bool(false),
    		HostnameType:                    pulumi.String("string"),
    	},
    	PrivateIp: pulumi.String("string"),
    	RootBlockDevice: &ec2.InstanceRootBlockDeviceArgs{
    		DeleteOnTermination: pulumi.Bool(false),
    		DeviceName:          pulumi.String("string"),
    		Encrypted:           pulumi.Bool(false),
    		Iops:                pulumi.Int(0),
    		KmsKeyId:            pulumi.String("string"),
    		Tags: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		TagsAll: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		Throughput: pulumi.Int(0),
    		VolumeId:   pulumi.String("string"),
    		VolumeSize: pulumi.Int(0),
    		VolumeType: pulumi.String("string"),
    	},
    	SecondaryPrivateIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SourceDestCheck: pulumi.Bool(false),
    	SubnetId:        pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Tenancy:                 pulumi.String("string"),
    	UserData:                pulumi.String("string"),
    	UserDataBase64:          pulumi.String("string"),
    	UserDataReplaceOnChange: pulumi.Bool(false),
    	VolumeTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	VpcSecurityGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var awsInstanceResource = new Instance("awsInstanceResource", InstanceArgs.builder()
        .ami("string")
        .associatePublicIpAddress(false)
        .availabilityZone("string")
        .capacityReservationSpecification(InstanceCapacityReservationSpecificationArgs.builder()
            .capacityReservationPreference("string")
            .capacityReservationTarget(InstanceCapacityReservationSpecificationCapacityReservationTargetArgs.builder()
                .capacityReservationId("string")
                .capacityReservationResourceGroupArn("string")
                .build())
            .build())
        .cpuOptions(InstanceCpuOptionsArgs.builder()
            .amdSevSnp("string")
            .coreCount(0)
            .threadsPerCore(0)
            .build())
        .creditSpecification(InstanceCreditSpecificationArgs.builder()
            .cpuCredits("string")
            .build())
        .disableApiStop(false)
        .disableApiTermination(false)
        .ebsBlockDevices(InstanceEbsBlockDeviceArgs.builder()
            .deviceName("string")
            .deleteOnTermination(false)
            .encrypted(false)
            .iops(0)
            .kmsKeyId("string")
            .snapshotId("string")
            .tags(Map.of("string", "string"))
            .tagsAll(Map.of("string", "string"))
            .throughput(0)
            .volumeId("string")
            .volumeSize(0)
            .volumeType("string")
            .build())
        .ebsOptimized(false)
        .enclaveOptions(InstanceEnclaveOptionsArgs.builder()
            .enabled(false)
            .build())
        .ephemeralBlockDevices(InstanceEphemeralBlockDeviceArgs.builder()
            .deviceName("string")
            .noDevice(false)
            .virtualName("string")
            .build())
        .getPasswordData(false)
        .hibernation(false)
        .hostId("string")
        .hostResourceGroupArn("string")
        .iamInstanceProfile("string")
        .instanceInitiatedShutdownBehavior("string")
        .instanceMarketOptions(InstanceInstanceMarketOptionsArgs.builder()
            .marketType("string")
            .spotOptions(InstanceInstanceMarketOptionsSpotOptionsArgs.builder()
                .instanceInterruptionBehavior("string")
                .maxPrice("string")
                .spotInstanceType("string")
                .validUntil("string")
                .build())
            .build())
        .instanceType("string")
        .ipv6AddressCount(0)
        .ipv6Addresses("string")
        .keyName("string")
        .launchTemplate(InstanceLaunchTemplateArgs.builder()
            .id("string")
            .name("string")
            .version("string")
            .build())
        .maintenanceOptions(InstanceMaintenanceOptionsArgs.builder()
            .autoRecovery("string")
            .build())
        .metadataOptions(InstanceMetadataOptionsArgs.builder()
            .httpEndpoint("string")
            .httpProtocolIpv6("string")
            .httpPutResponseHopLimit(0)
            .httpTokens("string")
            .instanceMetadataTags("string")
            .build())
        .monitoring(false)
        .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
            .deviceIndex(0)
            .networkInterfaceId("string")
            .deleteOnTermination(false)
            .networkCardIndex(0)
            .build())
        .placementGroup("string")
        .placementPartitionNumber(0)
        .privateDnsNameOptions(InstancePrivateDnsNameOptionsArgs.builder()
            .enableResourceNameDnsARecord(false)
            .enableResourceNameDnsAaaaRecord(false)
            .hostnameType("string")
            .build())
        .privateIp("string")
        .rootBlockDevice(InstanceRootBlockDeviceArgs.builder()
            .deleteOnTermination(false)
            .deviceName("string")
            .encrypted(false)
            .iops(0)
            .kmsKeyId("string")
            .tags(Map.of("string", "string"))
            .tagsAll(Map.of("string", "string"))
            .throughput(0)
            .volumeId("string")
            .volumeSize(0)
            .volumeType("string")
            .build())
        .secondaryPrivateIps("string")
        .sourceDestCheck(false)
        .subnetId("string")
        .tags(Map.of("string", "string"))
        .tenancy("string")
        .userData("string")
        .userDataBase64("string")
        .userDataReplaceOnChange(false)
        .volumeTags(Map.of("string", "string"))
        .vpcSecurityGroupIds("string")
        .build());
    
    aws_instance_resource = aws.ec2.Instance("awsInstanceResource",
        ami="string",
        associate_public_ip_address=False,
        availability_zone="string",
        capacity_reservation_specification=aws.ec2.InstanceCapacityReservationSpecificationArgs(
            capacity_reservation_preference="string",
            capacity_reservation_target=aws.ec2.InstanceCapacityReservationSpecificationCapacityReservationTargetArgs(
                capacity_reservation_id="string",
                capacity_reservation_resource_group_arn="string",
            ),
        ),
        cpu_options=aws.ec2.InstanceCpuOptionsArgs(
            amd_sev_snp="string",
            core_count=0,
            threads_per_core=0,
        ),
        credit_specification=aws.ec2.InstanceCreditSpecificationArgs(
            cpu_credits="string",
        ),
        disable_api_stop=False,
        disable_api_termination=False,
        ebs_block_devices=[aws.ec2.InstanceEbsBlockDeviceArgs(
            device_name="string",
            delete_on_termination=False,
            encrypted=False,
            iops=0,
            kms_key_id="string",
            snapshot_id="string",
            tags={
                "string": "string",
            },
            tags_all={
                "string": "string",
            },
            throughput=0,
            volume_id="string",
            volume_size=0,
            volume_type="string",
        )],
        ebs_optimized=False,
        enclave_options=aws.ec2.InstanceEnclaveOptionsArgs(
            enabled=False,
        ),
        ephemeral_block_devices=[aws.ec2.InstanceEphemeralBlockDeviceArgs(
            device_name="string",
            no_device=False,
            virtual_name="string",
        )],
        get_password_data=False,
        hibernation=False,
        host_id="string",
        host_resource_group_arn="string",
        iam_instance_profile="string",
        instance_initiated_shutdown_behavior="string",
        instance_market_options=aws.ec2.InstanceInstanceMarketOptionsArgs(
            market_type="string",
            spot_options=aws.ec2.InstanceInstanceMarketOptionsSpotOptionsArgs(
                instance_interruption_behavior="string",
                max_price="string",
                spot_instance_type="string",
                valid_until="string",
            ),
        ),
        instance_type="string",
        ipv6_address_count=0,
        ipv6_addresses=["string"],
        key_name="string",
        launch_template=aws.ec2.InstanceLaunchTemplateArgs(
            id="string",
            name="string",
            version="string",
        ),
        maintenance_options=aws.ec2.InstanceMaintenanceOptionsArgs(
            auto_recovery="string",
        ),
        metadata_options=aws.ec2.InstanceMetadataOptionsArgs(
            http_endpoint="string",
            http_protocol_ipv6="string",
            http_put_response_hop_limit=0,
            http_tokens="string",
            instance_metadata_tags="string",
        ),
        monitoring=False,
        network_interfaces=[aws.ec2.InstanceNetworkInterfaceArgs(
            device_index=0,
            network_interface_id="string",
            delete_on_termination=False,
            network_card_index=0,
        )],
        placement_group="string",
        placement_partition_number=0,
        private_dns_name_options=aws.ec2.InstancePrivateDnsNameOptionsArgs(
            enable_resource_name_dns_a_record=False,
            enable_resource_name_dns_aaaa_record=False,
            hostname_type="string",
        ),
        private_ip="string",
        root_block_device=aws.ec2.InstanceRootBlockDeviceArgs(
            delete_on_termination=False,
            device_name="string",
            encrypted=False,
            iops=0,
            kms_key_id="string",
            tags={
                "string": "string",
            },
            tags_all={
                "string": "string",
            },
            throughput=0,
            volume_id="string",
            volume_size=0,
            volume_type="string",
        ),
        secondary_private_ips=["string"],
        source_dest_check=False,
        subnet_id="string",
        tags={
            "string": "string",
        },
        tenancy="string",
        user_data="string",
        user_data_base64="string",
        user_data_replace_on_change=False,
        volume_tags={
            "string": "string",
        },
        vpc_security_group_ids=["string"])
    
    const awsInstanceResource = new aws.ec2.Instance("awsInstanceResource", {
        ami: "string",
        associatePublicIpAddress: false,
        availabilityZone: "string",
        capacityReservationSpecification: {
            capacityReservationPreference: "string",
            capacityReservationTarget: {
                capacityReservationId: "string",
                capacityReservationResourceGroupArn: "string",
            },
        },
        cpuOptions: {
            amdSevSnp: "string",
            coreCount: 0,
            threadsPerCore: 0,
        },
        creditSpecification: {
            cpuCredits: "string",
        },
        disableApiStop: false,
        disableApiTermination: false,
        ebsBlockDevices: [{
            deviceName: "string",
            deleteOnTermination: false,
            encrypted: false,
            iops: 0,
            kmsKeyId: "string",
            snapshotId: "string",
            tags: {
                string: "string",
            },
            tagsAll: {
                string: "string",
            },
            throughput: 0,
            volumeId: "string",
            volumeSize: 0,
            volumeType: "string",
        }],
        ebsOptimized: false,
        enclaveOptions: {
            enabled: false,
        },
        ephemeralBlockDevices: [{
            deviceName: "string",
            noDevice: false,
            virtualName: "string",
        }],
        getPasswordData: false,
        hibernation: false,
        hostId: "string",
        hostResourceGroupArn: "string",
        iamInstanceProfile: "string",
        instanceInitiatedShutdownBehavior: "string",
        instanceMarketOptions: {
            marketType: "string",
            spotOptions: {
                instanceInterruptionBehavior: "string",
                maxPrice: "string",
                spotInstanceType: "string",
                validUntil: "string",
            },
        },
        instanceType: "string",
        ipv6AddressCount: 0,
        ipv6Addresses: ["string"],
        keyName: "string",
        launchTemplate: {
            id: "string",
            name: "string",
            version: "string",
        },
        maintenanceOptions: {
            autoRecovery: "string",
        },
        metadataOptions: {
            httpEndpoint: "string",
            httpProtocolIpv6: "string",
            httpPutResponseHopLimit: 0,
            httpTokens: "string",
            instanceMetadataTags: "string",
        },
        monitoring: false,
        networkInterfaces: [{
            deviceIndex: 0,
            networkInterfaceId: "string",
            deleteOnTermination: false,
            networkCardIndex: 0,
        }],
        placementGroup: "string",
        placementPartitionNumber: 0,
        privateDnsNameOptions: {
            enableResourceNameDnsARecord: false,
            enableResourceNameDnsAaaaRecord: false,
            hostnameType: "string",
        },
        privateIp: "string",
        rootBlockDevice: {
            deleteOnTermination: false,
            deviceName: "string",
            encrypted: false,
            iops: 0,
            kmsKeyId: "string",
            tags: {
                string: "string",
            },
            tagsAll: {
                string: "string",
            },
            throughput: 0,
            volumeId: "string",
            volumeSize: 0,
            volumeType: "string",
        },
        secondaryPrivateIps: ["string"],
        sourceDestCheck: false,
        subnetId: "string",
        tags: {
            string: "string",
        },
        tenancy: "string",
        userData: "string",
        userDataBase64: "string",
        userDataReplaceOnChange: false,
        volumeTags: {
            string: "string",
        },
        vpcSecurityGroupIds: ["string"],
    });
    
    type: aws:ec2:Instance
    properties:
        ami: string
        associatePublicIpAddress: false
        availabilityZone: string
        capacityReservationSpecification:
            capacityReservationPreference: string
            capacityReservationTarget:
                capacityReservationId: string
                capacityReservationResourceGroupArn: string
        cpuOptions:
            amdSevSnp: string
            coreCount: 0
            threadsPerCore: 0
        creditSpecification:
            cpuCredits: string
        disableApiStop: false
        disableApiTermination: false
        ebsBlockDevices:
            - deleteOnTermination: false
              deviceName: string
              encrypted: false
              iops: 0
              kmsKeyId: string
              snapshotId: string
              tags:
                string: string
              tagsAll:
                string: string
              throughput: 0
              volumeId: string
              volumeSize: 0
              volumeType: string
        ebsOptimized: false
        enclaveOptions:
            enabled: false
        ephemeralBlockDevices:
            - deviceName: string
              noDevice: false
              virtualName: string
        getPasswordData: false
        hibernation: false
        hostId: string
        hostResourceGroupArn: string
        iamInstanceProfile: string
        instanceInitiatedShutdownBehavior: string
        instanceMarketOptions:
            marketType: string
            spotOptions:
                instanceInterruptionBehavior: string
                maxPrice: string
                spotInstanceType: string
                validUntil: string
        instanceType: string
        ipv6AddressCount: 0
        ipv6Addresses:
            - string
        keyName: string
        launchTemplate:
            id: string
            name: string
            version: string
        maintenanceOptions:
            autoRecovery: string
        metadataOptions:
            httpEndpoint: string
            httpProtocolIpv6: string
            httpPutResponseHopLimit: 0
            httpTokens: string
            instanceMetadataTags: string
        monitoring: false
        networkInterfaces:
            - deleteOnTermination: false
              deviceIndex: 0
              networkCardIndex: 0
              networkInterfaceId: string
        placementGroup: string
        placementPartitionNumber: 0
        privateDnsNameOptions:
            enableResourceNameDnsARecord: false
            enableResourceNameDnsAaaaRecord: false
            hostnameType: string
        privateIp: string
        rootBlockDevice:
            deleteOnTermination: false
            deviceName: string
            encrypted: false
            iops: 0
            kmsKeyId: string
            tags:
                string: string
            tagsAll:
                string: string
            throughput: 0
            volumeId: string
            volumeSize: 0
            volumeType: string
        secondaryPrivateIps:
            - string
        sourceDestCheck: false
        subnetId: string
        tags:
            string: string
        tenancy: string
        userData: string
        userDataBase64: string
        userDataReplaceOnChange: false
        volumeTags:
            string: string
        vpcSecurityGroupIds:
            - string
    

    Instance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Instance resource accepts the following input properties:

    Ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    AssociatePublicIpAddress bool
    Whether to associate a public IP address with an instance in a VPC.
    AvailabilityZone string
    AZ to start the instance in.
    CapacityReservationSpecification InstanceCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    CpuCoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    CpuOptions InstanceCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    CpuThreadsPerCore int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    CreditSpecification InstanceCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    DisableApiStop bool
    If true, enables EC2 Instance Stop Protection.
    DisableApiTermination bool
    If true, enables EC2 Instance Termination Protection.
    EbsBlockDevices List<InstanceEbsBlockDevice>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    EbsOptimized bool
    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 type 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 of the AWS User Guide for more information.
    EnclaveOptions InstanceEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    EphemeralBlockDevices List<InstanceEphemeralBlockDevice>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    GetPasswordData bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    Hibernation bool
    If true, the launched EC2 instance will support hibernation.
    HostId string
    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.
    HostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    IamInstanceProfile string | string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    InstanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    InstanceMarketOptions InstanceInstanceMarketOptions
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    InstanceType string | Pulumi.Aws.Ec2.InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    Ipv6AddressCount int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    Ipv6Addresses List<string>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    KeyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    LaunchTemplate InstanceLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    MaintenanceOptions InstanceMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    MetadataOptions InstanceMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    Monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    NetworkInterfaces List<InstanceNetworkInterface>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    PlacementGroup string
    Placement Group to start the instance in.
    PlacementPartitionNumber int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    PrivateDnsNameOptions InstancePrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    PrivateIp string
    Private IP address to associate with the instance in a VPC.
    RootBlockDevice InstanceRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    SecondaryPrivateIps List<string>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    SecurityGroups List<string>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    SourceDestCheck bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    SubnetId string
    VPC Subnet ID to launch in.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Tenancy string | Pulumi.Aws.Ec2.Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    UserData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    UserDataBase64 string
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    UserDataReplaceOnChange bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    VolumeTags Dictionary<string, string>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    VpcSecurityGroupIds List<string>
    List of security group IDs to associate with.
    Ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    AssociatePublicIpAddress bool
    Whether to associate a public IP address with an instance in a VPC.
    AvailabilityZone string
    AZ to start the instance in.
    CapacityReservationSpecification InstanceCapacityReservationSpecificationArgs

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    CpuCoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    CpuOptions InstanceCpuOptionsArgs
    The CPU options for the instance. See CPU Options below for more details.
    CpuThreadsPerCore int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    CreditSpecification InstanceCreditSpecificationArgs
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    DisableApiStop bool
    If true, enables EC2 Instance Stop Protection.
    DisableApiTermination bool
    If true, enables EC2 Instance Termination Protection.
    EbsBlockDevices []InstanceEbsBlockDeviceArgs
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    EbsOptimized bool
    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 type 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 of the AWS User Guide for more information.
    EnclaveOptions InstanceEnclaveOptionsArgs
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    EphemeralBlockDevices []InstanceEphemeralBlockDeviceArgs
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    GetPasswordData bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    Hibernation bool
    If true, the launched EC2 instance will support hibernation.
    HostId string
    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.
    HostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    IamInstanceProfile string | string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    InstanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    InstanceMarketOptions InstanceInstanceMarketOptionsArgs
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    InstanceType string | InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    Ipv6AddressCount int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    Ipv6Addresses []string
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    KeyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    LaunchTemplate InstanceLaunchTemplateArgs
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    MaintenanceOptions InstanceMaintenanceOptionsArgs
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    MetadataOptions InstanceMetadataOptionsArgs
    Customize the metadata options of the instance. See Metadata Options below for more details.
    Monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    NetworkInterfaces []InstanceNetworkInterfaceArgs
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    PlacementGroup string
    Placement Group to start the instance in.
    PlacementPartitionNumber int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    PrivateDnsNameOptions InstancePrivateDnsNameOptionsArgs
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    PrivateIp string
    Private IP address to associate with the instance in a VPC.
    RootBlockDevice InstanceRootBlockDeviceArgs
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    SecondaryPrivateIps []string
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    SecurityGroups []string

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    SourceDestCheck bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    SubnetId string
    VPC Subnet ID to launch in.
    Tags map[string]string
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Tenancy string | Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    UserData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    UserDataBase64 string
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    UserDataReplaceOnChange bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    VolumeTags map[string]string

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    VpcSecurityGroupIds []string
    List of security group IDs to associate with.
    ami String
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    associatePublicIpAddress Boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone String
    AZ to start the instance in.
    capacityReservationSpecification InstanceCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount Integer
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    cpuOptions InstanceCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore Integer
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    creditSpecification InstanceCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop Boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination Boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices List<InstanceEbsBlockDevice>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized Boolean
    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 type 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 of the AWS User Guide for more information.
    enclaveOptions InstanceEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices List<InstanceEphemeralBlockDevice>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData Boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation Boolean
    If true, the launched EC2 instance will support hibernation.
    hostId String
    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.
    hostResourceGroupArn String
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile String | String
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior String
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceMarketOptions InstanceInstanceMarketOptions
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    instanceType String | InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount Integer
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses List<String>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName String
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchTemplate InstanceLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions InstanceMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions InstanceMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring Boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces List<InstanceNetworkInterface>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    placementGroup String
    Placement Group to start the instance in.
    placementPartitionNumber Integer
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    privateDnsNameOptions InstancePrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp String
    Private IP address to associate with the instance in a VPC.
    rootBlockDevice InstanceRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps List<String>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups List<String>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    sourceDestCheck Boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    subnetId String
    VPC Subnet ID to launch in.
    tags Map<String,String>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tenancy String | Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    userData String
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    userDataBase64 String
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    userDataReplaceOnChange Boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    volumeTags Map<String,String>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds List<String>
    List of security group IDs to associate with.
    ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    associatePublicIpAddress boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone string
    AZ to start the instance in.
    capacityReservationSpecification InstanceCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    cpuOptions InstanceCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore number
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    creditSpecification InstanceCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices InstanceEbsBlockDevice[]
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized boolean
    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 type 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 of the AWS User Guide for more information.
    enclaveOptions InstanceEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices InstanceEphemeralBlockDevice[]
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation boolean
    If true, the launched EC2 instance will support hibernation.
    hostId string
    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.
    hostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile string | InstanceProfile
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceMarketOptions InstanceInstanceMarketOptions
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    instanceType string | InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount number
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses string[]
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchTemplate InstanceLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions InstanceMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions InstanceMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces InstanceNetworkInterface[]
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    placementGroup string
    Placement Group to start the instance in.
    placementPartitionNumber number
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    privateDnsNameOptions InstancePrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp string
    Private IP address to associate with the instance in a VPC.
    rootBlockDevice InstanceRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps string[]
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups string[]

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    sourceDestCheck boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    subnetId string
    VPC Subnet ID to launch in.
    tags {[key: string]: string}
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tenancy string | Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    userData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    userDataBase64 string
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    userDataReplaceOnChange boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    volumeTags {[key: string]: string}

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds string[]
    List of security group IDs to associate with.
    ami str
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    associate_public_ip_address bool
    Whether to associate a public IP address with an instance in a VPC.
    availability_zone str
    AZ to start the instance in.
    capacity_reservation_specification InstanceCapacityReservationSpecificationArgs

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpu_core_count int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    cpu_options InstanceCpuOptionsArgs
    The CPU options for the instance. See CPU Options below for more details.
    cpu_threads_per_core int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    credit_specification InstanceCreditSpecificationArgs
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disable_api_stop bool
    If true, enables EC2 Instance Stop Protection.
    disable_api_termination bool
    If true, enables EC2 Instance Termination Protection.
    ebs_block_devices Sequence[InstanceEbsBlockDeviceArgs]
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebs_optimized bool
    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 type 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 of the AWS User Guide for more information.
    enclave_options InstanceEnclaveOptionsArgs
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeral_block_devices Sequence[InstanceEphemeralBlockDeviceArgs]
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    get_password_data bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation bool
    If true, the launched EC2 instance will support hibernation.
    host_id str
    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.
    host_resource_group_arn str
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iam_instance_profile str | str
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instance_initiated_shutdown_behavior str
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instance_market_options InstanceInstanceMarketOptionsArgs
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    instance_type str | InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6_address_count int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6_addresses Sequence[str]
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    key_name str
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launch_template InstanceLaunchTemplateArgs
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenance_options InstanceMaintenanceOptionsArgs
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadata_options InstanceMetadataOptionsArgs
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    network_interfaces Sequence[InstanceNetworkInterfaceArgs]
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    placement_group str
    Placement Group to start the instance in.
    placement_partition_number int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    private_dns_name_options InstancePrivateDnsNameOptionsArgs
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    private_ip str
    Private IP address to associate with the instance in a VPC.
    root_block_device InstanceRootBlockDeviceArgs
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondary_private_ips Sequence[str]
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    security_groups Sequence[str]

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    source_dest_check bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    subnet_id str
    VPC Subnet ID to launch in.
    tags Mapping[str, str]
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tenancy str | Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    user_data str
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    user_data_base64 str
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    user_data_replace_on_change bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    volume_tags Mapping[str, str]

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpc_security_group_ids Sequence[str]
    List of security group IDs to associate with.
    ami String
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    associatePublicIpAddress Boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone String
    AZ to start the instance in.
    capacityReservationSpecification Property Map

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount Number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    cpuOptions Property Map
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore Number
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    creditSpecification Property Map
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop Boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination Boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices List<Property Map>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized Boolean
    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 type 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 of the AWS User Guide for more information.
    enclaveOptions Property Map
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices List<Property Map>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData Boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation Boolean
    If true, the launched EC2 instance will support hibernation.
    hostId String
    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.
    hostResourceGroupArn String
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile String |
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior String
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceMarketOptions Property Map
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    instanceType String | "a1.2xlarge" | "a1.4xlarge" | "a1.large" | "a1.medium" | "a1.metal" | "a1.xlarge" | "c1.medium" | "c1.xlarge" | "c3.2xlarge" | "c3.4xlarge" | "c3.8xlarge" | "c3.large" | "c3.xlarge" | "c4.2xlarge" | "c4.4xlarge" | "c4.8xlarge" | "c4.large" | "c4.xlarge" | "c5.12xlarge" | "c5.18xlarge" | "c5.24xlarge" | "c5.2xlarge" | "c5.4xlarge" | "c5.9xlarge" | "c5.large" | "c5.metal" | "c5.xlarge" | "c5a.12xlarge" | "c5a.16xlarge" | "c5a.24xlarge" | "c5a.2xlarge" | "c5a.4xlarge" | "c5a.8xlarge" | "c5a.large" | "c5a.xlarge" | "c5ad.12xlarge" | "c5ad.16xlarge" | "c5ad.24xlarge" | "c5ad.2xlarge" | "c5ad.4xlarge" | "c5ad.8xlarge" | "c5ad.large" | "c5ad.xlarge" | "c5d.12xlarge" | "c5d.18xlarge" | "c5d.24xlarge" | "c5d.2xlarge" | "c5d.4xlarge" | "c5d.9xlarge" | "c5d.large" | "c5d.metal" | "c5d.xlarge" | "c5n.18xlarge" | "c5n.2xlarge" | "c5n.4xlarge" | "c5n.9xlarge" | "c5n.large" | "c5n.metal" | "c5n.xlarge" | "c6a.12xlarge" | "c6a.16xlarge" | "c6a.24xlarge" | "c6a.2xlarge" | "c6a.32xlarge" | "c6a.48xlarge" | "c6a.4xlarge" | "c6a.8xlarge" | "c6a.large" | "c6a.metal" | "c6a.xlarge" | "c6g.12xlarge" | "c6g.16xlarge" | "c6g.2xlarge" | "c6g.4xlarge" | "c6g.8xlarge" | "c6g.large" | "c6g.medium" | "c6g.metal" | "c6g.xlarge" | "c6gd.12xlarge" | "c6gd.16xlarge" | "c6gd.2xlarge" | "c6gd.4xlarge" | "c6gd.8xlarge" | "c6gd.large" | "c6gd.medium" | "c6gd.metal" | "c6gd.xlarge" | "c6gn.12xlarge" | "c6gn.16xlarge" | "c6gn.2xlarge" | "c6gn.4xlarge" | "c6gn.8xlarge" | "c6gn.large" | "c6gn.medium" | "c6gn.xlarge" | "c6i.12xlarge" | "c6i.16xlarge" | "c6i.24xlarge" | "c6i.2xlarge" | "c6i.32xlarge" | "c6i.4xlarge" | "c6i.8xlarge" | "c6i.large" | "c6i.metal" | "c6i.xlarge" | "c6id.12xlarge" | "c6id.16xlarge" | "c6id.24xlarge" | "c6id.2xlarge" | "c6id.32xlarge" | "c6id.4xlarge" | "c6id.8xlarge" | "c6id.large" | "c6id.metal" | "c6id.xlarge" | "c6in.12xlarge" | "c6in.16xlarge" | "c6in.24xlarge" | "c6in.2xlarge" | "c6in.32xlarge" | "c6in.4xlarge" | "c6in.8xlarge" | "c6in.large" | "c6in.metal" | "c6in.xlarge" | "c7a.12xlarge" | "c7a.16xlarge" | "c7a.24xlarge" | "c7a.2xlarge" | "c7a.32xlarge" | "c7a.48xlarge" | "c7a.4xlarge" | "c7a.8xlarge" | "c7a.large" | "c7a.medium" | "c7a.metal-48xl" | "c7a.xlarge" | "c7g.12xlarge" | "c7g.16xlarge" | "c7g.2xlarge" | "c7g.4xlarge" | "c7g.8xlarge" | "c7g.large" | "c7g.medium" | "c7g.metal" | "c7g.xlarge" | "c7gd.12xlarge" | "c7gd.16xlarge" | "c7gd.2xlarge" | "c7gd.4xlarge" | "c7gd.8xlarge" | "c7gd.large" | "c7gd.medium" | "c7gd.metal" | "c7gd.xlarge" | "c7gn.12xlarge" | "c7gn.16xlarge" | "c7gn.2xlarge" | "c7gn.4xlarge" | "c7gn.8xlarge" | "c7gn.large" | "c7gn.medium" | "c7gn.metal" | "c7gn.xlarge" | "c7i.12xlarge" | "c7i.16xlarge" | "c7i.24xlarge" | "c7i.2xlarge" | "c7i.48xlarge" | "c7i.4xlarge" | "c7i.8xlarge" | "c7i.large" | "c7i.metal-24xl" | "c7i.metal-48xl" | "c7i.xlarge" | "d2.2xlarge" | "d2.4xlarge" | "d2.8xlarge" | "d2.xlarge" | "d3.2xlarge" | "d3.4xlarge" | "d3.8xlarge" | "d3.xlarge" | "d3en.12xlarge" | "d3en.2xlarge" | "d3en.4xlarge" | "d3en.6xlarge" | "d3en.8xlarge" | "d3en.xlarge" | "dl1.24xlarge" | "dl2q.24xlarge" | "f1.16xlarge" | "f1.2xlarge" | "f1.4xlarge" | "g3.16xlarge" | "g3.4xlarge" | "g3.8xlarge" | "g3s.xlarge" | "g4ad.16xlarge" | "g4ad.2xlarge" | "g4ad.4xlarge" | "g4ad.8xlarge" | "g4ad.xlarge" | "g4dn.12xlarge" | "g4dn.16xlarge" | "g4dn.2xlarge" | "g4dn.4xlarge" | "g4dn.8xlarge" | "g4dn.metal" | "g4dn.xlarge" | "g5.12xlarge" | "g5.16xlarge" | "g5.24xlarge" | "g5.2xlarge" | "g5.48xlarge" | "g5.4xlarge" | "g5.8xlarge" | "g5.xlarge" | "g5g.16xlarge" | "g5g.2xlarge" | "g5g.4xlarge" | "g5g.8xlarge" | "g5g.metal" | "g5g.xlarge" | "g6.12xlarge" | "g6.16xlarge" | "g6.24xlarge" | "g6.2xlarge" | "g6.48xlarge" | "g6.4xlarge" | "g6.8xlarge" | "g6.xlarge" | "gr6.4xlarge" | "gr6.8xlarge" | "h1.16xlarge" | "h1.2xlarge" | "h1.4xlarge" | "h1.8xlarge" | "i2.2xlarge" | "i2.4xlarge" | "i2.8xlarge" | "i2.xlarge" | "i3.16xlarge" | "i3.2xlarge" | "i3.4xlarge" | "i3.8xlarge" | "i3.large" | "i3.metal" | "i3.xlarge" | "i3en.12xlarge" | "i3en.24xlarge" | "i3en.2xlarge" | "i3en.3xlarge" | "i3en.6xlarge" | "i3en.large" | "i3en.metal" | "i3en.xlarge" | "i4g.16xlarge" | "i4g.2xlarge" | "i4g.4xlarge" | "i4g.8xlarge" | "i4g.large" | "i4g.xlarge" | "i4i.12xlarge" | "i4i.16xlarge" | "i4i.24xlarge" | "i4i.2xlarge" | "i4i.32xlarge" | "i4i.4xlarge" | "i4i.8xlarge" | "i4i.large" | "i4i.metal" | "i4i.xlarge" | "im4gn.16xlarge" | "im4gn.2xlarge" | "im4gn.4xlarge" | "im4gn.8xlarge" | "im4gn.large" | "im4gn.xlarge" | "inf1.24xlarge" | "inf1.2xlarge" | "inf1.6xlarge" | "inf1.xlarge" | "inf2.24xlarge" | "inf2.48xlarge" | "inf2.8xlarge" | "inf2.xlarge" | "is4gen.2xlarge" | "is4gen.4xlarge" | "is4gen.8xlarge" | "is4gen.large" | "is4gen.medium" | "is4gen.xlarge" | "m1.large" | "m1.medium" | "m1.small" | "m1.xlarge" | "m2.2xlarge" | "m2.4xlarge" | "m2.xlarge" | "m3.2xlarge" | "m3.large" | "m3.medium" | "m3.xlarge" | "m4.10xlarge" | "m4.16xlarge" | "m4.2xlarge" | "m4.4xlarge" | "m4.large" | "m4.xlarge" | "m5.12xlarge" | "m5.16xlarge" | "m5.24xlarge" | "m5.2xlarge" | "m5.4xlarge" | "m5.8xlarge" | "m5.large" | "m5.metal" | "m5.xlarge" | "m5a.12xlarge" | "m5a.16xlarge" | "m5a.24xlarge" | "m5a.2xlarge" | "m5a.4xlarge" | "m5a.8xlarge" | "m5a.large" | "m5a.xlarge" | "m5ad.12xlarge" | "m5ad.16xlarge" | "m5ad.24xlarge" | "m5ad.2xlarge" | "m5ad.4xlarge" | "m5ad.8xlarge" | "m5ad.large" | "m5ad.xlarge" | "m5d.12xlarge" | "m5d.16xlarge" | "m5d.24xlarge" | "m5d.2xlarge" | "m5d.4xlarge" | "m5d.8xlarge" | "m5d.large" | "m5d.metal" | "m5d.xlarge" | "m5dn.12xlarge" | "m5dn.16xlarge" | "m5dn.24xlarge" | "m5dn.2xlarge" | "m5dn.4xlarge" | "m5dn.8xlarge" | "m5dn.large" | "m5dn.metal" | "m5dn.xlarge" | "m5n.12xlarge" | "m5n.16xlarge" | "m5n.24xlarge" | "m5n.2xlarge" | "m5n.4xlarge" | "m5n.8xlarge" | "m5n.large" | "m5n.metal" | "m5n.xlarge" | "m5zn.12xlarge" | "m5zn.2xlarge" | "m5zn.3xlarge" | "m5zn.6xlarge" | "m5zn.large" | "m5zn.metal" | "m5zn.xlarge" | "m6a.12xlarge" | "m6a.16xlarge" | "m6a.24xlarge" | "m6a.2xlarge" | "m6a.32xlarge" | "m6a.48xlarge" | "m6a.4xlarge" | "m6a.8xlarge" | "m6a.large" | "m6a.metal" | "m6a.xlarge" | "m6g.12xlarge" | "m6g.16xlarge" | "m6g.2xlarge" | "m6g.4xlarge" | "m6g.8xlarge" | "m6g.large" | "m6g.medium" | "m6g.metal" | "m6g.xlarge" | "m6gd.12xlarge" | "m6gd.16xlarge" | "m6gd.2xlarge" | "m6gd.4xlarge" | "m6gd.8xlarge" | "m6gd.large" | "m6gd.medium" | "m6gd.metal" | "m6gd.xlarge" | "m6i.12xlarge" | "m6i.16xlarge" | "m6i.24xlarge" | "m6i.2xlarge" | "m6i.32xlarge" | "m6i.4xlarge" | "m6i.8xlarge" | "m6i.large" | "m6i.metal" | "m6i.xlarge" | "m6id.12xlarge" | "m6id.16xlarge" | "m6id.24xlarge" | "m6id.2xlarge" | "m6id.32xlarge" | "m6id.4xlarge" | "m6id.8xlarge" | "m6id.large" | "m6id.metal" | "m6id.xlarge" | "m6idn.12xlarge" | "m6idn.16xlarge" | "m6idn.24xlarge" | "m6idn.2xlarge" | "m6idn.32xlarge" | "m6idn.4xlarge" | "m6idn.8xlarge" | "m6idn.large" | "m6idn.metal" | "m6idn.xlarge" | "m6in.12xlarge" | "m6in.16xlarge" | "m6in.24xlarge" | "m6in.2xlarge" | "m6in.32xlarge" | "m6in.4xlarge" | "m6in.8xlarge" | "m6in.large" | "m6in.metal" | "m6in.xlarge" | "m7a.12xlarge" | "m7a.16xlarge" | "m7a.24xlarge" | "m7a.2xlarge" | "m7a.32xlarge" | "m7a.48xlarge" | "m7a.4xlarge" | "m7a.8xlarge" | "m7a.large" | "m7a.medium" | "m7a.metal-48xl" | "m7a.xlarge" | "m7g.12xlarge" | "m7g.16xlarge" | "m7g.2xlarge" | "m7g.4xlarge" | "m7g.8xlarge" | "m7g.large" | "m7g.medium" | "m7g.metal" | "m7g.xlarge" | "m7gd.12xlarge" | "m7gd.16xlarge" | "m7gd.2xlarge" | "m7gd.4xlarge" | "m7gd.8xlarge" | "m7gd.large" | "m7gd.medium" | "m7gd.metal" | "m7gd.xlarge" | "m7i-flex.2xlarge" | "m7i-flex.4xlarge" | "m7i-flex.8xlarge" | "m7i-flex.large" | "m7i-flex.xlarge" | "m7i.12xlarge" | "m7i.16xlarge" | "m7i.24xlarge" | "m7i.2xlarge" | "m7i.48xlarge" | "m7i.4xlarge" | "m7i.8xlarge" | "m7i.large" | "m7i.metal-24xl" | "m7i.metal-48xl" | "m7i.xlarge" | "mac1.metal" | "mac2-m2.metal" | "mac2-m2pro.metal" | "mac2.metal" | "p2.16xlarge" | "p2.8xlarge" | "p2.xlarge" | "p3.16xlarge" | "p3.2xlarge" | "p3.8xlarge" | "p3dn.24xlarge" | "p4d.24xlarge" | "p5.48xlarge" | "r3.2xlarge" | "r3.4xlarge" | "r3.8xlarge" | "r3.large" | "r3.xlarge" | "r4.16xlarge" | "r4.2xlarge" | "r4.4xlarge" | "r4.8xlarge" | "r4.large" | "r4.xlarge" | "r5.12xlarge" | "r5.16xlarge" | "r5.24xlarge" | "r5.2xlarge" | "r5.4xlarge" | "r5.8xlarge" | "r5.large" | "r5.metal" | "r5.xlarge" | "r5a.12xlarge" | "r5a.16xlarge" | "r5a.24xlarge" | "r5a.2xlarge" | "r5a.4xlarge" | "r5a.8xlarge" | "r5a.large" | "r5a.xlarge" | "r5ad.12xlarge" | "r5ad.16xlarge" | "r5ad.24xlarge" | "r5ad.2xlarge" | "r5ad.4xlarge" | "r5ad.8xlarge" | "r5ad.large" | "r5ad.xlarge" | "r5b.12xlarge" | "r5b.16xlarge" | "r5b.24xlarge" | "r5b.2xlarge" | "r5b.4xlarge" | "r5b.8xlarge" | "r5b.large" | "r5b.metal" | "r5b.xlarge" | "r5d.12xlarge" | "r5d.16xlarge" | "r5d.24xlarge" | "r5d.2xlarge" | "r5d.4xlarge" | "r5d.8xlarge" | "r5d.large" | "r5d.metal" | "r5d.xlarge" | "r5dn.12xlarge" | "r5dn.16xlarge" | "r5dn.24xlarge" | "r5dn.2xlarge" | "r5dn.4xlarge" | "r5dn.8xlarge" | "r5dn.large" | "r5dn.metal" | "r5dn.xlarge" | "r5n.12xlarge" | "r5n.16xlarge" | "r5n.24xlarge" | "r5n.2xlarge" | "r5n.4xlarge" | "r5n.8xlarge" | "r5n.large" | "r5n.metal" | "r5n.xlarge" | "r6a.12xlarge" | "r6a.16xlarge" | "r6a.24xlarge" | "r6a.2xlarge" | "r6a.32xlarge" | "r6a.48xlarge" | "r6a.4xlarge" | "r6a.8xlarge" | "r6a.large" | "r6a.metal" | "r6a.xlarge" | "r6g.12xlarge" | "r6g.16xlarge" | "r6g.2xlarge" | "r6g.4xlarge" | "r6g.8xlarge" | "r6g.large" | "r6g.medium" | "r6g.metal" | "r6g.xlarge" | "r6gd.12xlarge" | "r6gd.16xlarge" | "r6gd.2xlarge" | "r6gd.4xlarge" | "r6gd.8xlarge" | "r6gd.large" | "r6gd.medium" | "r6gd.metal" | "r6gd.xlarge" | "r6i.12xlarge" | "r6i.16xlarge" | "r6i.24xlarge" | "r6i.2xlarge" | "r6i.32xlarge" | "r6i.4xlarge" | "r6i.8xlarge" | "r6i.large" | "r6i.metal" | "r6i.xlarge" | "r6id.12xlarge" | "r6id.16xlarge" | "r6id.24xlarge" | "r6id.2xlarge" | "r6id.32xlarge" | "r6id.4xlarge" | "r6id.8xlarge" | "r6id.large" | "r6id.metal" | "r6id.xlarge" | "r6idn.12xlarge" | "r6idn.16xlarge" | "r6idn.24xlarge" | "r6idn.2xlarge" | "r6idn.32xlarge" | "r6idn.4xlarge" | "r6idn.8xlarge" | "r6idn.large" | "r6idn.metal" | "r6idn.xlarge" | "r6in.12xlarge" | "r6in.16xlarge" | "r6in.24xlarge" | "r6in.2xlarge" | "r6in.32xlarge" | "r6in.4xlarge" | "r6in.8xlarge" | "r6in.large" | "r6in.metal" | "r6in.xlarge" | "r7a.12xlarge" | "r7a.16xlarge" | "r7a.24xlarge" | "r7a.2xlarge" | "r7a.32xlarge" | "r7a.48xlarge" | "r7a.4xlarge" | "r7a.8xlarge" | "r7a.large" | "r7a.medium" | "r7a.metal-48xl" | "r7a.xlarge" | "r7g.12xlarge" | "r7g.16xlarge" | "r7g.2xlarge" | "r7g.4xlarge" | "r7g.8xlarge" | "r7g.large" | "r7g.medium" | "r7g.metal" | "r7g.xlarge" | "r7gd.12xlarge" | "r7gd.16xlarge" | "r7gd.2xlarge" | "r7gd.4xlarge" | "r7gd.8xlarge" | "r7gd.large" | "r7gd.medium" | "r7gd.metal" | "r7gd.xlarge" | "r7i.12xlarge" | "r7i.16xlarge" | "r7i.24xlarge" | "r7i.2xlarge" | "r7i.48xlarge" | "r7i.4xlarge" | "r7i.8xlarge" | "r7i.large" | "r7i.metal-24xl" | "r7i.metal-48xl" | "r7i.xlarge" | "r7iz.12xlarge" | "r7iz.16xlarge" | "r7iz.2xlarge" | "r7iz.32xlarge" | "r7iz.4xlarge" | "r7iz.8xlarge" | "r7iz.large" | "r7iz.metal-16xl" | "r7iz.metal-32xl" | "r7iz.xlarge" | "t1.micro" | "t2.2xlarge" | "t2.large" | "t2.medium" | "t2.micro" | "t2.nano" | "t2.small" | "t2.xlarge" | "t3.2xlarge" | "t3.large" | "t3.medium" | "t3.micro" | "t3.nano" | "t3.small" | "t3.xlarge" | "t3a.2xlarge" | "t3a.large" | "t3a.medium" | "t3a.micro" | "t3a.nano" | "t3a.small" | "t3a.xlarge" | "t4g.2xlarge" | "t4g.large" | "t4g.medium" | "t4g.micro" | "t4g.nano" | "t4g.small" | "t4g.xlarge" | "trn1.2xlarge" | "trn1.32xlarge" | "trn1n.32xlarge" | "u-12tb1.112xlarge" | "u-18tb1.112xlarge" | "u-24tb1.112xlarge" | "u-3tb1.56xlarge" | "u-6tb1.112xlarge" | "u-6tb1.56xlarge" | "u-9tb1.112xlarge" | "vt1.24xlarge" | "vt1.3xlarge" | "vt1.6xlarge" | "x1.16xlarge" | "x1.32xlarge" | "x1e.16xlarge" | "x1e.2xlarge" | "x1e.32xlarge" | "x1e.4xlarge" | "x1e.8xlarge" | "x1e.xlarge" | "x2gd.12xlarge" | "x2gd.16xlarge" | "x2gd.2xlarge" | "x2gd.4xlarge" | "x2gd.8xlarge" | "x2gd.large" | "x2gd.medium" | "x2gd.metal" | "x2gd.xlarge" | "x2idn.16xlarge" | "x2idn.24xlarge" | "x2idn.32xlarge" | "x2idn.metal" | "x2iedn.16xlarge" | "x2iedn.24xlarge" | "x2iedn.2xlarge" | "x2iedn.32xlarge" | "x2iedn.4xlarge" | "x2iedn.8xlarge" | "x2iedn.metal" | "x2iedn.xlarge" | "x2iezn.12xlarge" | "x2iezn.2xlarge" | "x2iezn.4xlarge" | "x2iezn.6xlarge" | "x2iezn.8xlarge" | "x2iezn.metal" | "z1d.12xlarge" | "z1d.2xlarge" | "z1d.3xlarge" | "z1d.6xlarge" | "z1d.large" | "z1d.metal" | "z1d.xlarge" | "u-12tb1.metal" | "u-6tb1.metal" | "u-9tb1.metal" | "hs1.8xlarge" | "m5ad.xlarge" | "c7a.metal-48xl" | "m7a.metal-48xl" | "cc2.8xlarge" | "g2.2xlarge" | "g2.8xlarge"
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount Number
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses List<String>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName String
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchTemplate Property Map
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions Property Map
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions Property Map
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring Boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces List<Property Map>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    placementGroup String
    Placement Group to start the instance in.
    placementPartitionNumber Number
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    privateDnsNameOptions Property Map
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp String
    Private IP address to associate with the instance in a VPC.
    rootBlockDevice Property Map
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps List<String>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups List<String>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    sourceDestCheck Boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    subnetId String
    VPC Subnet ID to launch in.
    tags Map<String>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tenancy String | "default" | "dedicated"
    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-instance command. Valid values are default, dedicated, and host.
    userData String
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    userDataBase64 String
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    userDataReplaceOnChange Boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    volumeTags Map<String>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds List<String>
    List of security group IDs to associate with.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:

    Arn string
    ARN of the instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceLifecycle string
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    OutpostArn string
    ARN of the Outpost the instance is assigned to.
    PasswordData string
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    PrimaryNetworkInterfaceId string
    ID of the instance's primary network interface.
    PrivateDns string
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    PublicDns string
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    PublicIp string
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    SpotInstanceRequestId string
    If the request is a Spot Instance request, the ID of the request.
    State string
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    ARN of the instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceLifecycle string
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    InstanceState string
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    OutpostArn string
    ARN of the Outpost the instance is assigned to.
    PasswordData string
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    PrimaryNetworkInterfaceId string
    ID of the instance's primary network interface.
    PrivateDns string
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    PublicDns string
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    PublicIp string
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    SpotInstanceRequestId string
    If the request is a Spot Instance request, the ID of the request.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the instance.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceLifecycle String
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    instanceState String
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    outpostArn String
    ARN of the Outpost the instance is assigned to.
    passwordData String
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    primaryNetworkInterfaceId String
    ID of the instance's primary network interface.
    privateDns String
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    publicDns String
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    publicIp String
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    spotInstanceRequestId String
    If the request is a Spot Instance request, the ID of the request.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    ARN of the instance.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceLifecycle string
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    instanceState string
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    outpostArn string
    ARN of the Outpost the instance is assigned to.
    passwordData string
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    primaryNetworkInterfaceId string
    ID of the instance's primary network interface.
    privateDns string
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    publicDns string
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    publicIp string
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    spotInstanceRequestId string
    If the request is a Spot Instance request, the ID of the request.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    ARN of the instance.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_lifecycle str
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    instance_state str
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    outpost_arn str
    ARN of the Outpost the instance is assigned to.
    password_data str
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    primary_network_interface_id str
    ID of the instance's primary network interface.
    private_dns str
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    public_dns str
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    public_ip str
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    spot_instance_request_id str
    If the request is a Spot Instance request, the ID of the request.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    ARN of the instance.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceLifecycle String
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    instanceState String
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    outpostArn String
    ARN of the Outpost the instance is assigned to.
    passwordData String
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    primaryNetworkInterfaceId String
    ID of the instance's primary network interface.
    privateDns String
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    publicDns String
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    publicIp String
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    spotInstanceRequestId String
    If the request is a Spot Instance request, the ID of the request.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Look up Existing Instance Resource

    Get an existing Instance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: InstanceState, opts?: CustomResourceOptions): Instance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ami: Optional[str] = None,
            arn: Optional[str] = None,
            associate_public_ip_address: Optional[bool] = None,
            availability_zone: Optional[str] = None,
            capacity_reservation_specification: Optional[InstanceCapacityReservationSpecificationArgs] = None,
            cpu_core_count: Optional[int] = None,
            cpu_options: Optional[InstanceCpuOptionsArgs] = None,
            cpu_threads_per_core: Optional[int] = None,
            credit_specification: Optional[InstanceCreditSpecificationArgs] = None,
            disable_api_stop: Optional[bool] = None,
            disable_api_termination: Optional[bool] = None,
            ebs_block_devices: Optional[Sequence[InstanceEbsBlockDeviceArgs]] = None,
            ebs_optimized: Optional[bool] = None,
            enclave_options: Optional[InstanceEnclaveOptionsArgs] = None,
            ephemeral_block_devices: Optional[Sequence[InstanceEphemeralBlockDeviceArgs]] = None,
            get_password_data: Optional[bool] = None,
            hibernation: Optional[bool] = None,
            host_id: Optional[str] = None,
            host_resource_group_arn: Optional[str] = None,
            iam_instance_profile: Optional[str] = None,
            instance_initiated_shutdown_behavior: Optional[str] = None,
            instance_lifecycle: Optional[str] = None,
            instance_market_options: Optional[InstanceInstanceMarketOptionsArgs] = None,
            instance_state: Optional[str] = None,
            instance_type: Optional[Union[str, InstanceType]] = None,
            ipv6_address_count: Optional[int] = None,
            ipv6_addresses: Optional[Sequence[str]] = None,
            key_name: Optional[str] = None,
            launch_template: Optional[InstanceLaunchTemplateArgs] = None,
            maintenance_options: Optional[InstanceMaintenanceOptionsArgs] = None,
            metadata_options: Optional[InstanceMetadataOptionsArgs] = None,
            monitoring: Optional[bool] = None,
            network_interfaces: Optional[Sequence[InstanceNetworkInterfaceArgs]] = None,
            outpost_arn: Optional[str] = None,
            password_data: Optional[str] = None,
            placement_group: Optional[str] = None,
            placement_partition_number: Optional[int] = None,
            primary_network_interface_id: Optional[str] = None,
            private_dns: Optional[str] = None,
            private_dns_name_options: Optional[InstancePrivateDnsNameOptionsArgs] = None,
            private_ip: Optional[str] = None,
            public_dns: Optional[str] = None,
            public_ip: Optional[str] = None,
            root_block_device: Optional[InstanceRootBlockDeviceArgs] = None,
            secondary_private_ips: Optional[Sequence[str]] = None,
            security_groups: Optional[Sequence[str]] = None,
            source_dest_check: Optional[bool] = None,
            spot_instance_request_id: Optional[str] = None,
            subnet_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            tenancy: Optional[Union[str, Tenancy]] = None,
            user_data: Optional[str] = None,
            user_data_base64: Optional[str] = None,
            user_data_replace_on_change: Optional[bool] = None,
            volume_tags: Optional[Mapping[str, str]] = None,
            vpc_security_group_ids: Optional[Sequence[str]] = None) -> Instance
    func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
    public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
    public static Instance get(String name, Output<String> id, InstanceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    Arn string
    ARN of the instance.
    AssociatePublicIpAddress bool
    Whether to associate a public IP address with an instance in a VPC.
    AvailabilityZone string
    AZ to start the instance in.
    CapacityReservationSpecification InstanceCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    CpuCoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    CpuOptions InstanceCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    CpuThreadsPerCore int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    CreditSpecification InstanceCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    DisableApiStop bool
    If true, enables EC2 Instance Stop Protection.
    DisableApiTermination bool
    If true, enables EC2 Instance Termination Protection.
    EbsBlockDevices List<InstanceEbsBlockDevice>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    EbsOptimized bool
    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 type 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 of the AWS User Guide for more information.
    EnclaveOptions InstanceEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    EphemeralBlockDevices List<InstanceEphemeralBlockDevice>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    GetPasswordData bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    Hibernation bool
    If true, the launched EC2 instance will support hibernation.
    HostId string
    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.
    HostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    IamInstanceProfile string | string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    InstanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    InstanceLifecycle string
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    InstanceMarketOptions InstanceInstanceMarketOptions
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    InstanceType string | Pulumi.Aws.Ec2.InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    Ipv6AddressCount int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    Ipv6Addresses List<string>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    KeyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    LaunchTemplate InstanceLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    MaintenanceOptions InstanceMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    MetadataOptions InstanceMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    Monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    NetworkInterfaces List<InstanceNetworkInterface>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    OutpostArn string
    ARN of the Outpost the instance is assigned to.
    PasswordData string
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    PlacementGroup string
    Placement Group to start the instance in.
    PlacementPartitionNumber int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    PrimaryNetworkInterfaceId string
    ID of the instance's primary network interface.
    PrivateDns string
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    PrivateDnsNameOptions InstancePrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    PrivateIp string
    Private IP address to associate with the instance in a VPC.
    PublicDns string
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    PublicIp string
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    RootBlockDevice InstanceRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    SecondaryPrivateIps List<string>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    SecurityGroups List<string>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    SourceDestCheck bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    SpotInstanceRequestId string
    If the request is a Spot Instance request, the ID of the request.
    State string
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    SubnetId string
    VPC Subnet ID to launch in.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Tenancy string | Pulumi.Aws.Ec2.Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    UserData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    UserDataBase64 string
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    UserDataReplaceOnChange bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    VolumeTags Dictionary<string, string>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    VpcSecurityGroupIds List<string>
    List of security group IDs to associate with.
    Ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    Arn string
    ARN of the instance.
    AssociatePublicIpAddress bool
    Whether to associate a public IP address with an instance in a VPC.
    AvailabilityZone string
    AZ to start the instance in.
    CapacityReservationSpecification InstanceCapacityReservationSpecificationArgs

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    CpuCoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    CpuOptions InstanceCpuOptionsArgs
    The CPU options for the instance. See CPU Options below for more details.
    CpuThreadsPerCore int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    CreditSpecification InstanceCreditSpecificationArgs
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    DisableApiStop bool
    If true, enables EC2 Instance Stop Protection.
    DisableApiTermination bool
    If true, enables EC2 Instance Termination Protection.
    EbsBlockDevices []InstanceEbsBlockDeviceArgs
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    EbsOptimized bool
    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 type 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 of the AWS User Guide for more information.
    EnclaveOptions InstanceEnclaveOptionsArgs
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    EphemeralBlockDevices []InstanceEphemeralBlockDeviceArgs
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    GetPasswordData bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    Hibernation bool
    If true, the launched EC2 instance will support hibernation.
    HostId string
    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.
    HostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    IamInstanceProfile string | string
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    InstanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    InstanceLifecycle string
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    InstanceMarketOptions InstanceInstanceMarketOptionsArgs
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    InstanceState string
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    InstanceType string | InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    Ipv6AddressCount int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    Ipv6Addresses []string
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    KeyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    LaunchTemplate InstanceLaunchTemplateArgs
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    MaintenanceOptions InstanceMaintenanceOptionsArgs
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    MetadataOptions InstanceMetadataOptionsArgs
    Customize the metadata options of the instance. See Metadata Options below for more details.
    Monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    NetworkInterfaces []InstanceNetworkInterfaceArgs
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    OutpostArn string
    ARN of the Outpost the instance is assigned to.
    PasswordData string
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    PlacementGroup string
    Placement Group to start the instance in.
    PlacementPartitionNumber int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    PrimaryNetworkInterfaceId string
    ID of the instance's primary network interface.
    PrivateDns string
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    PrivateDnsNameOptions InstancePrivateDnsNameOptionsArgs
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    PrivateIp string
    Private IP address to associate with the instance in a VPC.
    PublicDns string
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    PublicIp string
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    RootBlockDevice InstanceRootBlockDeviceArgs
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    SecondaryPrivateIps []string
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    SecurityGroups []string

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    SourceDestCheck bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    SpotInstanceRequestId string
    If the request is a Spot Instance request, the ID of the request.
    SubnetId string
    VPC Subnet ID to launch in.
    Tags map[string]string
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Tenancy string | Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    UserData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    UserDataBase64 string
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    UserDataReplaceOnChange bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    VolumeTags map[string]string

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    VpcSecurityGroupIds []string
    List of security group IDs to associate with.
    ami String
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    arn String
    ARN of the instance.
    associatePublicIpAddress Boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone String
    AZ to start the instance in.
    capacityReservationSpecification InstanceCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount Integer
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    cpuOptions InstanceCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore Integer
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    creditSpecification InstanceCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop Boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination Boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices List<InstanceEbsBlockDevice>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized Boolean
    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 type 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 of the AWS User Guide for more information.
    enclaveOptions InstanceEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices List<InstanceEphemeralBlockDevice>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData Boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation Boolean
    If true, the launched EC2 instance will support hibernation.
    hostId String
    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.
    hostResourceGroupArn String
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile String | String
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior String
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceLifecycle String
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    instanceMarketOptions InstanceInstanceMarketOptions
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    instanceState String
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    instanceType String | InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount Integer
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses List<String>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName String
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchTemplate InstanceLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions InstanceMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions InstanceMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring Boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces List<InstanceNetworkInterface>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    outpostArn String
    ARN of the Outpost the instance is assigned to.
    passwordData String
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    placementGroup String
    Placement Group to start the instance in.
    placementPartitionNumber Integer
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    primaryNetworkInterfaceId String
    ID of the instance's primary network interface.
    privateDns String
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    privateDnsNameOptions InstancePrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp String
    Private IP address to associate with the instance in a VPC.
    publicDns String
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    publicIp String
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    rootBlockDevice InstanceRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps List<String>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups List<String>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    sourceDestCheck Boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotInstanceRequestId String
    If the request is a Spot Instance request, the ID of the request.
    subnetId String
    VPC Subnet ID to launch in.
    tags Map<String,String>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    tenancy String | Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    userData String
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    userDataBase64 String
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    userDataReplaceOnChange Boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    volumeTags Map<String,String>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds List<String>
    List of security group IDs to associate with.
    ami string
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    arn string
    ARN of the instance.
    associatePublicIpAddress boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone string
    AZ to start the instance in.
    capacityReservationSpecification InstanceCapacityReservationSpecification

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    cpuOptions InstanceCpuOptions
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore number
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    creditSpecification InstanceCreditSpecification
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices InstanceEbsBlockDevice[]
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized boolean
    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 type 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 of the AWS User Guide for more information.
    enclaveOptions InstanceEnclaveOptions
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices InstanceEphemeralBlockDevice[]
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation boolean
    If true, the launched EC2 instance will support hibernation.
    hostId string
    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.
    hostResourceGroupArn string
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile string | InstanceProfile
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior string
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceLifecycle string
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    instanceMarketOptions InstanceInstanceMarketOptions
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    instanceState string
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    instanceType string | InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount number
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses string[]
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName string
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchTemplate InstanceLaunchTemplate
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions InstanceMaintenanceOptions
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions InstanceMetadataOptions
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces InstanceNetworkInterface[]
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    outpostArn string
    ARN of the Outpost the instance is assigned to.
    passwordData string
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    placementGroup string
    Placement Group to start the instance in.
    placementPartitionNumber number
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    primaryNetworkInterfaceId string
    ID of the instance's primary network interface.
    privateDns string
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    privateDnsNameOptions InstancePrivateDnsNameOptions
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp string
    Private IP address to associate with the instance in a VPC.
    publicDns string
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    publicIp string
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    rootBlockDevice InstanceRootBlockDevice
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps string[]
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups string[]

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    sourceDestCheck boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotInstanceRequestId string
    If the request is a Spot Instance request, the ID of the request.
    subnetId string
    VPC Subnet ID to launch in.
    tags {[key: string]: string}
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    tenancy string | Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    userData string
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    userDataBase64 string
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    userDataReplaceOnChange boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    volumeTags {[key: string]: string}

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds string[]
    List of security group IDs to associate with.
    ami str
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    arn str
    ARN of the instance.
    associate_public_ip_address bool
    Whether to associate a public IP address with an instance in a VPC.
    availability_zone str
    AZ to start the instance in.
    capacity_reservation_specification InstanceCapacityReservationSpecificationArgs

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpu_core_count int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    cpu_options InstanceCpuOptionsArgs
    The CPU options for the instance. See CPU Options below for more details.
    cpu_threads_per_core int
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    credit_specification InstanceCreditSpecificationArgs
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disable_api_stop bool
    If true, enables EC2 Instance Stop Protection.
    disable_api_termination bool
    If true, enables EC2 Instance Termination Protection.
    ebs_block_devices Sequence[InstanceEbsBlockDeviceArgs]
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebs_optimized bool
    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 type 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 of the AWS User Guide for more information.
    enclave_options InstanceEnclaveOptionsArgs
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeral_block_devices Sequence[InstanceEphemeralBlockDeviceArgs]
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    get_password_data bool
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation bool
    If true, the launched EC2 instance will support hibernation.
    host_id str
    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.
    host_resource_group_arn str
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iam_instance_profile str | str
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instance_initiated_shutdown_behavior str
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instance_lifecycle str
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    instance_market_options InstanceInstanceMarketOptionsArgs
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    instance_state str
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    instance_type str | InstanceType
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6_address_count int
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6_addresses Sequence[str]
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    key_name str
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launch_template InstanceLaunchTemplateArgs
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenance_options InstanceMaintenanceOptionsArgs
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadata_options InstanceMetadataOptionsArgs
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring bool
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    network_interfaces Sequence[InstanceNetworkInterfaceArgs]
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    outpost_arn str
    ARN of the Outpost the instance is assigned to.
    password_data str
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    placement_group str
    Placement Group to start the instance in.
    placement_partition_number int
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    primary_network_interface_id str
    ID of the instance's primary network interface.
    private_dns str
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    private_dns_name_options InstancePrivateDnsNameOptionsArgs
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    private_ip str
    Private IP address to associate with the instance in a VPC.
    public_dns str
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    public_ip str
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    root_block_device InstanceRootBlockDeviceArgs
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondary_private_ips Sequence[str]
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    security_groups Sequence[str]

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    source_dest_check bool
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spot_instance_request_id str
    If the request is a Spot Instance request, the ID of the request.
    subnet_id str
    VPC Subnet ID to launch in.
    tags Mapping[str, str]
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    tenancy str | Tenancy
    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-instance command. Valid values are default, dedicated, and host.
    user_data str
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    user_data_base64 str
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    user_data_replace_on_change bool
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    volume_tags Mapping[str, str]

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpc_security_group_ids Sequence[str]
    List of security group IDs to associate with.
    ami String
    AMI to use for the instance. Required unless launch_template is specified and the Launch Template specifes an AMI. If an AMI is specified in the Launch Template, setting ami will override the AMI specified in the Launch Template.
    arn String
    ARN of the instance.
    associatePublicIpAddress Boolean
    Whether to associate a public IP address with an instance in a VPC.
    availabilityZone String
    AZ to start the instance in.
    capacityReservationSpecification Property Map

    Describes an instance's Capacity Reservation targeting option. See Capacity Reservation Specification below for more details.

    NOTE: Changing cpu_core_count and/or cpu_threads_per_core will cause the resource to be destroyed and re-created.

    cpuCoreCount Number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.

    Deprecated: use 'cpu_options' argument instead

    cpuOptions Property Map
    The CPU options for the instance. See CPU Options below for more details.
    cpuThreadsPerCore Number
    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    Deprecated: use 'cpu_options' argument instead

    creditSpecification Property Map
    Configuration block for customizing the credit specification of the instance. See Credit Specification below for more details. This provider will only perform drift detection of its value when present in a configuration. Removing this configuration on existing instances will only stop managing it. It will not change the configuration back to the default for the instance type.
    disableApiStop Boolean
    If true, enables EC2 Instance Stop Protection.
    disableApiTermination Boolean
    If true, enables EC2 Instance Termination Protection.
    ebsBlockDevices List<Property Map>
    One or more configuration blocks with additional EBS block devices to attach to the instance. Block device configurations only apply on resource creation. See Block Devices below for details on attributes and drift detection. When accessing this as an attribute reference, it is a set of objects.
    ebsOptimized Boolean
    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 type 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 of the AWS User Guide for more information.
    enclaveOptions Property Map
    Enable Nitro Enclaves on launched instances. See Enclave Options below for more details.
    ephemeralBlockDevices List<Property Map>
    One or more configuration blocks to customize Ephemeral (also known as "Instance Store") volumes on the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a set of objects.
    getPasswordData Boolean
    If true, wait for password data to become available and retrieve it. Useful for getting the administrator password for instances running Microsoft Windows. The password data is exported to the password_data attribute. See GetPasswordData for more information.
    hibernation Boolean
    If true, the launched EC2 instance will support hibernation.
    hostId String
    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.
    hostResourceGroupArn String
    ARN of the host resource group in which to launch the instances. If you specify an ARN, omit the tenancy parameter or set it to host.
    iamInstanceProfile String |
    IAM Instance Profile to launch the instance with. Specified as the name of the Instance Profile. Ensure your credentials have the correct permission to assign the instance profile according to the EC2 documentation, notably iam:PassRole.
    instanceInitiatedShutdownBehavior String
    Shutdown behavior for the instance. Amazon defaults this to stop for EBS-backed instances and terminate for instance-store instances. Cannot be set on instance-store instances. See Shutdown Behavior for more information.
    instanceLifecycle String
    Indicates whether this is a Spot Instance or a Scheduled Instance.
    instanceMarketOptions Property Map
    Describes the market (purchasing) option for the instances. See Market Options below for details on attributes.
    instanceState String
    State of the instance. One of: pending, running, shutting-down, terminated, stopping, stopped. See Instance Lifecycle for more information.
    instanceType String | "a1.2xlarge" | "a1.4xlarge" | "a1.large" | "a1.medium" | "a1.metal" | "a1.xlarge" | "c1.medium" | "c1.xlarge" | "c3.2xlarge" | "c3.4xlarge" | "c3.8xlarge" | "c3.large" | "c3.xlarge" | "c4.2xlarge" | "c4.4xlarge" | "c4.8xlarge" | "c4.large" | "c4.xlarge" | "c5.12xlarge" | "c5.18xlarge" | "c5.24xlarge" | "c5.2xlarge" | "c5.4xlarge" | "c5.9xlarge" | "c5.large" | "c5.metal" | "c5.xlarge" | "c5a.12xlarge" | "c5a.16xlarge" | "c5a.24xlarge" | "c5a.2xlarge" | "c5a.4xlarge" | "c5a.8xlarge" | "c5a.large" | "c5a.xlarge" | "c5ad.12xlarge" | "c5ad.16xlarge" | "c5ad.24xlarge" | "c5ad.2xlarge" | "c5ad.4xlarge" | "c5ad.8xlarge" | "c5ad.large" | "c5ad.xlarge" | "c5d.12xlarge" | "c5d.18xlarge" | "c5d.24xlarge" | "c5d.2xlarge" | "c5d.4xlarge" | "c5d.9xlarge" | "c5d.large" | "c5d.metal" | "c5d.xlarge" | "c5n.18xlarge" | "c5n.2xlarge" | "c5n.4xlarge" | "c5n.9xlarge" | "c5n.large" | "c5n.metal" | "c5n.xlarge" | "c6a.12xlarge" | "c6a.16xlarge" | "c6a.24xlarge" | "c6a.2xlarge" | "c6a.32xlarge" | "c6a.48xlarge" | "c6a.4xlarge" | "c6a.8xlarge" | "c6a.large" | "c6a.metal" | "c6a.xlarge" | "c6g.12xlarge" | "c6g.16xlarge" | "c6g.2xlarge" | "c6g.4xlarge" | "c6g.8xlarge" | "c6g.large" | "c6g.medium" | "c6g.metal" | "c6g.xlarge" | "c6gd.12xlarge" | "c6gd.16xlarge" | "c6gd.2xlarge" | "c6gd.4xlarge" | "c6gd.8xlarge" | "c6gd.large" | "c6gd.medium" | "c6gd.metal" | "c6gd.xlarge" | "c6gn.12xlarge" | "c6gn.16xlarge" | "c6gn.2xlarge" | "c6gn.4xlarge" | "c6gn.8xlarge" | "c6gn.large" | "c6gn.medium" | "c6gn.xlarge" | "c6i.12xlarge" | "c6i.16xlarge" | "c6i.24xlarge" | "c6i.2xlarge" | "c6i.32xlarge" | "c6i.4xlarge" | "c6i.8xlarge" | "c6i.large" | "c6i.metal" | "c6i.xlarge" | "c6id.12xlarge" | "c6id.16xlarge" | "c6id.24xlarge" | "c6id.2xlarge" | "c6id.32xlarge" | "c6id.4xlarge" | "c6id.8xlarge" | "c6id.large" | "c6id.metal" | "c6id.xlarge" | "c6in.12xlarge" | "c6in.16xlarge" | "c6in.24xlarge" | "c6in.2xlarge" | "c6in.32xlarge" | "c6in.4xlarge" | "c6in.8xlarge" | "c6in.large" | "c6in.metal" | "c6in.xlarge" | "c7a.12xlarge" | "c7a.16xlarge" | "c7a.24xlarge" | "c7a.2xlarge" | "c7a.32xlarge" | "c7a.48xlarge" | "c7a.4xlarge" | "c7a.8xlarge" | "c7a.large" | "c7a.medium" | "c7a.metal-48xl" | "c7a.xlarge" | "c7g.12xlarge" | "c7g.16xlarge" | "c7g.2xlarge" | "c7g.4xlarge" | "c7g.8xlarge" | "c7g.large" | "c7g.medium" | "c7g.metal" | "c7g.xlarge" | "c7gd.12xlarge" | "c7gd.16xlarge" | "c7gd.2xlarge" | "c7gd.4xlarge" | "c7gd.8xlarge" | "c7gd.large" | "c7gd.medium" | "c7gd.metal" | "c7gd.xlarge" | "c7gn.12xlarge" | "c7gn.16xlarge" | "c7gn.2xlarge" | "c7gn.4xlarge" | "c7gn.8xlarge" | "c7gn.large" | "c7gn.medium" | "c7gn.metal" | "c7gn.xlarge" | "c7i.12xlarge" | "c7i.16xlarge" | "c7i.24xlarge" | "c7i.2xlarge" | "c7i.48xlarge" | "c7i.4xlarge" | "c7i.8xlarge" | "c7i.large" | "c7i.metal-24xl" | "c7i.metal-48xl" | "c7i.xlarge" | "d2.2xlarge" | "d2.4xlarge" | "d2.8xlarge" | "d2.xlarge" | "d3.2xlarge" | "d3.4xlarge" | "d3.8xlarge" | "d3.xlarge" | "d3en.12xlarge" | "d3en.2xlarge" | "d3en.4xlarge" | "d3en.6xlarge" | "d3en.8xlarge" | "d3en.xlarge" | "dl1.24xlarge" | "dl2q.24xlarge" | "f1.16xlarge" | "f1.2xlarge" | "f1.4xlarge" | "g3.16xlarge" | "g3.4xlarge" | "g3.8xlarge" | "g3s.xlarge" | "g4ad.16xlarge" | "g4ad.2xlarge" | "g4ad.4xlarge" | "g4ad.8xlarge" | "g4ad.xlarge" | "g4dn.12xlarge" | "g4dn.16xlarge" | "g4dn.2xlarge" | "g4dn.4xlarge" | "g4dn.8xlarge" | "g4dn.metal" | "g4dn.xlarge" | "g5.12xlarge" | "g5.16xlarge" | "g5.24xlarge" | "g5.2xlarge" | "g5.48xlarge" | "g5.4xlarge" | "g5.8xlarge" | "g5.xlarge" | "g5g.16xlarge" | "g5g.2xlarge" | "g5g.4xlarge" | "g5g.8xlarge" | "g5g.metal" | "g5g.xlarge" | "g6.12xlarge" | "g6.16xlarge" | "g6.24xlarge" | "g6.2xlarge" | "g6.48xlarge" | "g6.4xlarge" | "g6.8xlarge" | "g6.xlarge" | "gr6.4xlarge" | "gr6.8xlarge" | "h1.16xlarge" | "h1.2xlarge" | "h1.4xlarge" | "h1.8xlarge" | "i2.2xlarge" | "i2.4xlarge" | "i2.8xlarge" | "i2.xlarge" | "i3.16xlarge" | "i3.2xlarge" | "i3.4xlarge" | "i3.8xlarge" | "i3.large" | "i3.metal" | "i3.xlarge" | "i3en.12xlarge" | "i3en.24xlarge" | "i3en.2xlarge" | "i3en.3xlarge" | "i3en.6xlarge" | "i3en.large" | "i3en.metal" | "i3en.xlarge" | "i4g.16xlarge" | "i4g.2xlarge" | "i4g.4xlarge" | "i4g.8xlarge" | "i4g.large" | "i4g.xlarge" | "i4i.12xlarge" | "i4i.16xlarge" | "i4i.24xlarge" | "i4i.2xlarge" | "i4i.32xlarge" | "i4i.4xlarge" | "i4i.8xlarge" | "i4i.large" | "i4i.metal" | "i4i.xlarge" | "im4gn.16xlarge" | "im4gn.2xlarge" | "im4gn.4xlarge" | "im4gn.8xlarge" | "im4gn.large" | "im4gn.xlarge" | "inf1.24xlarge" | "inf1.2xlarge" | "inf1.6xlarge" | "inf1.xlarge" | "inf2.24xlarge" | "inf2.48xlarge" | "inf2.8xlarge" | "inf2.xlarge" | "is4gen.2xlarge" | "is4gen.4xlarge" | "is4gen.8xlarge" | "is4gen.large" | "is4gen.medium" | "is4gen.xlarge" | "m1.large" | "m1.medium" | "m1.small" | "m1.xlarge" | "m2.2xlarge" | "m2.4xlarge" | "m2.xlarge" | "m3.2xlarge" | "m3.large" | "m3.medium" | "m3.xlarge" | "m4.10xlarge" | "m4.16xlarge" | "m4.2xlarge" | "m4.4xlarge" | "m4.large" | "m4.xlarge" | "m5.12xlarge" | "m5.16xlarge" | "m5.24xlarge" | "m5.2xlarge" | "m5.4xlarge" | "m5.8xlarge" | "m5.large" | "m5.metal" | "m5.xlarge" | "m5a.12xlarge" | "m5a.16xlarge" | "m5a.24xlarge" | "m5a.2xlarge" | "m5a.4xlarge" | "m5a.8xlarge" | "m5a.large" | "m5a.xlarge" | "m5ad.12xlarge" | "m5ad.16xlarge" | "m5ad.24xlarge" | "m5ad.2xlarge" | "m5ad.4xlarge" | "m5ad.8xlarge" | "m5ad.large" | "m5ad.xlarge" | "m5d.12xlarge" | "m5d.16xlarge" | "m5d.24xlarge" | "m5d.2xlarge" | "m5d.4xlarge" | "m5d.8xlarge" | "m5d.large" | "m5d.metal" | "m5d.xlarge" | "m5dn.12xlarge" | "m5dn.16xlarge" | "m5dn.24xlarge" | "m5dn.2xlarge" | "m5dn.4xlarge" | "m5dn.8xlarge" | "m5dn.large" | "m5dn.metal" | "m5dn.xlarge" | "m5n.12xlarge" | "m5n.16xlarge" | "m5n.24xlarge" | "m5n.2xlarge" | "m5n.4xlarge" | "m5n.8xlarge" | "m5n.large" | "m5n.metal" | "m5n.xlarge" | "m5zn.12xlarge" | "m5zn.2xlarge" | "m5zn.3xlarge" | "m5zn.6xlarge" | "m5zn.large" | "m5zn.metal" | "m5zn.xlarge" | "m6a.12xlarge" | "m6a.16xlarge" | "m6a.24xlarge" | "m6a.2xlarge" | "m6a.32xlarge" | "m6a.48xlarge" | "m6a.4xlarge" | "m6a.8xlarge" | "m6a.large" | "m6a.metal" | "m6a.xlarge" | "m6g.12xlarge" | "m6g.16xlarge" | "m6g.2xlarge" | "m6g.4xlarge" | "m6g.8xlarge" | "m6g.large" | "m6g.medium" | "m6g.metal" | "m6g.xlarge" | "m6gd.12xlarge" | "m6gd.16xlarge" | "m6gd.2xlarge" | "m6gd.4xlarge" | "m6gd.8xlarge" | "m6gd.large" | "m6gd.medium" | "m6gd.metal" | "m6gd.xlarge" | "m6i.12xlarge" | "m6i.16xlarge" | "m6i.24xlarge" | "m6i.2xlarge" | "m6i.32xlarge" | "m6i.4xlarge" | "m6i.8xlarge" | "m6i.large" | "m6i.metal" | "m6i.xlarge" | "m6id.12xlarge" | "m6id.16xlarge" | "m6id.24xlarge" | "m6id.2xlarge" | "m6id.32xlarge" | "m6id.4xlarge" | "m6id.8xlarge" | "m6id.large" | "m6id.metal" | "m6id.xlarge" | "m6idn.12xlarge" | "m6idn.16xlarge" | "m6idn.24xlarge" | "m6idn.2xlarge" | "m6idn.32xlarge" | "m6idn.4xlarge" | "m6idn.8xlarge" | "m6idn.large" | "m6idn.metal" | "m6idn.xlarge" | "m6in.12xlarge" | "m6in.16xlarge" | "m6in.24xlarge" | "m6in.2xlarge" | "m6in.32xlarge" | "m6in.4xlarge" | "m6in.8xlarge" | "m6in.large" | "m6in.metal" | "m6in.xlarge" | "m7a.12xlarge" | "m7a.16xlarge" | "m7a.24xlarge" | "m7a.2xlarge" | "m7a.32xlarge" | "m7a.48xlarge" | "m7a.4xlarge" | "m7a.8xlarge" | "m7a.large" | "m7a.medium" | "m7a.metal-48xl" | "m7a.xlarge" | "m7g.12xlarge" | "m7g.16xlarge" | "m7g.2xlarge" | "m7g.4xlarge" | "m7g.8xlarge" | "m7g.large" | "m7g.medium" | "m7g.metal" | "m7g.xlarge" | "m7gd.12xlarge" | "m7gd.16xlarge" | "m7gd.2xlarge" | "m7gd.4xlarge" | "m7gd.8xlarge" | "m7gd.large" | "m7gd.medium" | "m7gd.metal" | "m7gd.xlarge" | "m7i-flex.2xlarge" | "m7i-flex.4xlarge" | "m7i-flex.8xlarge" | "m7i-flex.large" | "m7i-flex.xlarge" | "m7i.12xlarge" | "m7i.16xlarge" | "m7i.24xlarge" | "m7i.2xlarge" | "m7i.48xlarge" | "m7i.4xlarge" | "m7i.8xlarge" | "m7i.large" | "m7i.metal-24xl" | "m7i.metal-48xl" | "m7i.xlarge" | "mac1.metal" | "mac2-m2.metal" | "mac2-m2pro.metal" | "mac2.metal" | "p2.16xlarge" | "p2.8xlarge" | "p2.xlarge" | "p3.16xlarge" | "p3.2xlarge" | "p3.8xlarge" | "p3dn.24xlarge" | "p4d.24xlarge" | "p5.48xlarge" | "r3.2xlarge" | "r3.4xlarge" | "r3.8xlarge" | "r3.large" | "r3.xlarge" | "r4.16xlarge" | "r4.2xlarge" | "r4.4xlarge" | "r4.8xlarge" | "r4.large" | "r4.xlarge" | "r5.12xlarge" | "r5.16xlarge" | "r5.24xlarge" | "r5.2xlarge" | "r5.4xlarge" | "r5.8xlarge" | "r5.large" | "r5.metal" | "r5.xlarge" | "r5a.12xlarge" | "r5a.16xlarge" | "r5a.24xlarge" | "r5a.2xlarge" | "r5a.4xlarge" | "r5a.8xlarge" | "r5a.large" | "r5a.xlarge" | "r5ad.12xlarge" | "r5ad.16xlarge" | "r5ad.24xlarge" | "r5ad.2xlarge" | "r5ad.4xlarge" | "r5ad.8xlarge" | "r5ad.large" | "r5ad.xlarge" | "r5b.12xlarge" | "r5b.16xlarge" | "r5b.24xlarge" | "r5b.2xlarge" | "r5b.4xlarge" | "r5b.8xlarge" | "r5b.large" | "r5b.metal" | "r5b.xlarge" | "r5d.12xlarge" | "r5d.16xlarge" | "r5d.24xlarge" | "r5d.2xlarge" | "r5d.4xlarge" | "r5d.8xlarge" | "r5d.large" | "r5d.metal" | "r5d.xlarge" | "r5dn.12xlarge" | "r5dn.16xlarge" | "r5dn.24xlarge" | "r5dn.2xlarge" | "r5dn.4xlarge" | "r5dn.8xlarge" | "r5dn.large" | "r5dn.metal" | "r5dn.xlarge" | "r5n.12xlarge" | "r5n.16xlarge" | "r5n.24xlarge" | "r5n.2xlarge" | "r5n.4xlarge" | "r5n.8xlarge" | "r5n.large" | "r5n.metal" | "r5n.xlarge" | "r6a.12xlarge" | "r6a.16xlarge" | "r6a.24xlarge" | "r6a.2xlarge" | "r6a.32xlarge" | "r6a.48xlarge" | "r6a.4xlarge" | "r6a.8xlarge" | "r6a.large" | "r6a.metal" | "r6a.xlarge" | "r6g.12xlarge" | "r6g.16xlarge" | "r6g.2xlarge" | "r6g.4xlarge" | "r6g.8xlarge" | "r6g.large" | "r6g.medium" | "r6g.metal" | "r6g.xlarge" | "r6gd.12xlarge" | "r6gd.16xlarge" | "r6gd.2xlarge" | "r6gd.4xlarge" | "r6gd.8xlarge" | "r6gd.large" | "r6gd.medium" | "r6gd.metal" | "r6gd.xlarge" | "r6i.12xlarge" | "r6i.16xlarge" | "r6i.24xlarge" | "r6i.2xlarge" | "r6i.32xlarge" | "r6i.4xlarge" | "r6i.8xlarge" | "r6i.large" | "r6i.metal" | "r6i.xlarge" | "r6id.12xlarge" | "r6id.16xlarge" | "r6id.24xlarge" | "r6id.2xlarge" | "r6id.32xlarge" | "r6id.4xlarge" | "r6id.8xlarge" | "r6id.large" | "r6id.metal" | "r6id.xlarge" | "r6idn.12xlarge" | "r6idn.16xlarge" | "r6idn.24xlarge" | "r6idn.2xlarge" | "r6idn.32xlarge" | "r6idn.4xlarge" | "r6idn.8xlarge" | "r6idn.large" | "r6idn.metal" | "r6idn.xlarge" | "r6in.12xlarge" | "r6in.16xlarge" | "r6in.24xlarge" | "r6in.2xlarge" | "r6in.32xlarge" | "r6in.4xlarge" | "r6in.8xlarge" | "r6in.large" | "r6in.metal" | "r6in.xlarge" | "r7a.12xlarge" | "r7a.16xlarge" | "r7a.24xlarge" | "r7a.2xlarge" | "r7a.32xlarge" | "r7a.48xlarge" | "r7a.4xlarge" | "r7a.8xlarge" | "r7a.large" | "r7a.medium" | "r7a.metal-48xl" | "r7a.xlarge" | "r7g.12xlarge" | "r7g.16xlarge" | "r7g.2xlarge" | "r7g.4xlarge" | "r7g.8xlarge" | "r7g.large" | "r7g.medium" | "r7g.metal" | "r7g.xlarge" | "r7gd.12xlarge" | "r7gd.16xlarge" | "r7gd.2xlarge" | "r7gd.4xlarge" | "r7gd.8xlarge" | "r7gd.large" | "r7gd.medium" | "r7gd.metal" | "r7gd.xlarge" | "r7i.12xlarge" | "r7i.16xlarge" | "r7i.24xlarge" | "r7i.2xlarge" | "r7i.48xlarge" | "r7i.4xlarge" | "r7i.8xlarge" | "r7i.large" | "r7i.metal-24xl" | "r7i.metal-48xl" | "r7i.xlarge" | "r7iz.12xlarge" | "r7iz.16xlarge" | "r7iz.2xlarge" | "r7iz.32xlarge" | "r7iz.4xlarge" | "r7iz.8xlarge" | "r7iz.large" | "r7iz.metal-16xl" | "r7iz.metal-32xl" | "r7iz.xlarge" | "t1.micro" | "t2.2xlarge" | "t2.large" | "t2.medium" | "t2.micro" | "t2.nano" | "t2.small" | "t2.xlarge" | "t3.2xlarge" | "t3.large" | "t3.medium" | "t3.micro" | "t3.nano" | "t3.small" | "t3.xlarge" | "t3a.2xlarge" | "t3a.large" | "t3a.medium" | "t3a.micro" | "t3a.nano" | "t3a.small" | "t3a.xlarge" | "t4g.2xlarge" | "t4g.large" | "t4g.medium" | "t4g.micro" | "t4g.nano" | "t4g.small" | "t4g.xlarge" | "trn1.2xlarge" | "trn1.32xlarge" | "trn1n.32xlarge" | "u-12tb1.112xlarge" | "u-18tb1.112xlarge" | "u-24tb1.112xlarge" | "u-3tb1.56xlarge" | "u-6tb1.112xlarge" | "u-6tb1.56xlarge" | "u-9tb1.112xlarge" | "vt1.24xlarge" | "vt1.3xlarge" | "vt1.6xlarge" | "x1.16xlarge" | "x1.32xlarge" | "x1e.16xlarge" | "x1e.2xlarge" | "x1e.32xlarge" | "x1e.4xlarge" | "x1e.8xlarge" | "x1e.xlarge" | "x2gd.12xlarge" | "x2gd.16xlarge" | "x2gd.2xlarge" | "x2gd.4xlarge" | "x2gd.8xlarge" | "x2gd.large" | "x2gd.medium" | "x2gd.metal" | "x2gd.xlarge" | "x2idn.16xlarge" | "x2idn.24xlarge" | "x2idn.32xlarge" | "x2idn.metal" | "x2iedn.16xlarge" | "x2iedn.24xlarge" | "x2iedn.2xlarge" | "x2iedn.32xlarge" | "x2iedn.4xlarge" | "x2iedn.8xlarge" | "x2iedn.metal" | "x2iedn.xlarge" | "x2iezn.12xlarge" | "x2iezn.2xlarge" | "x2iezn.4xlarge" | "x2iezn.6xlarge" | "x2iezn.8xlarge" | "x2iezn.metal" | "z1d.12xlarge" | "z1d.2xlarge" | "z1d.3xlarge" | "z1d.6xlarge" | "z1d.large" | "z1d.metal" | "z1d.xlarge" | "u-12tb1.metal" | "u-6tb1.metal" | "u-9tb1.metal" | "hs1.8xlarge" | "m5ad.xlarge" | "c7a.metal-48xl" | "m7a.metal-48xl" | "cc2.8xlarge" | "g2.2xlarge" | "g2.8xlarge"
    Instance type to use for the instance. Required unless launch_template is specified and the Launch Template specifies an instance type. If an instance type is specified in the Launch Template, setting instance_type will override the instance type specified in the Launch Template. Updates to this field will trigger a stop/start of the EC2 instance.
    ipv6AddressCount Number
    Number of IPv6 addresses to associate with the primary network interface. Amazon EC2 chooses the IPv6 addresses from the range of your subnet.
    ipv6Addresses List<String>
    Specify one or more IPv6 addresses from the range of the subnet to associate with the primary network interface
    keyName String
    Key name of the Key Pair to use for the instance; which can be managed using the aws.ec2.KeyPair resource.
    launchTemplate Property Map
    Specifies a Launch Template to configure the instance. Parameters configured on this resource will override the corresponding parameters in the Launch Template. See Launch Template Specification below for more details.
    maintenanceOptions Property Map
    Maintenance and recovery options for the instance. See Maintenance Options below for more details.
    metadataOptions Property Map
    Customize the metadata options of the instance. See Metadata Options below for more details.
    monitoring Boolean
    If true, the launched EC2 instance will have detailed monitoring enabled. (Available since v0.6.0)
    networkInterfaces List<Property Map>
    Customize network interfaces to be attached at instance boot time. See Network Interfaces below for more details.
    outpostArn String
    ARN of the Outpost the instance is assigned to.
    passwordData String
    Base-64 encoded encrypted password data for the instance. Useful for getting the administrator password 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 attributes. See GetPasswordData for more information.
    placementGroup String
    Placement Group to start the instance in.
    placementPartitionNumber Number
    Number of the partition the instance is in. Valid only if the aws.ec2.PlacementGroup resource's strategy argument is set to "partition".
    primaryNetworkInterfaceId String
    ID of the instance's primary network interface.
    privateDns String
    Private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC.
    privateDnsNameOptions Property Map
    Options for the instance hostname. The default values are inherited from the subnet. See Private DNS Name Options below for more details.
    privateIp String
    Private IP address to associate with the instance in a VPC.
    publicDns String
    Public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC.
    publicIp String
    Public IP address assigned to the instance, if applicable. NOTE: If you are using an aws.ec2.Eip with your instance, you should refer to the EIP's address directly and not use public_ip as this field will change after the EIP is attached.
    rootBlockDevice Property Map
    Configuration block to customize details about the root block device of the instance. See Block Devices below for details. When accessing this as an attribute reference, it is a list containing one object.
    secondaryPrivateIps List<String>
    List of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e., referenced in a network_interface block. Refer to the Elastic network interfaces documentation to see the maximum number of private IP addresses allowed per instance type.
    securityGroups List<String>

    List of security group names to associate with.

    NOTE: If you are creating Instances in a VPC, use vpc_security_group_ids instead.

    Deprecated: Use of securityGroups is discouraged as it does not allow for changes and will force your instance to be replaced if changes are made. To avoid this, use vpcSecurityGroupIds which allows for updates.

    sourceDestCheck Boolean
    Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
    spotInstanceRequestId String
    If the request is a Spot Instance request, the ID of the request.
    subnetId String
    VPC Subnet ID to launch in.
    tags Map<String>
    Map of tags to assign to the resource. Note that these tags apply to the instance and not block storage devices. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    tenancy String | "default" | "dedicated"
    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-instance command. Valid values are default, dedicated, and host.
    userData String
    User data to provide when launching the instance. Do not pass gzip-compressed data via this 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.
    userDataBase64 String
    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 user data must be base64-encoded and passed via this argument to avoid corruption. 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.
    userDataReplaceOnChange Boolean
    When used in combination with user_data or user_data_base64 will trigger a destroy and recreate when set to true. Defaults to false if not set.
    volumeTags Map<String>

    Map of tags to assign, at instance-creation time, to root and EBS volumes.

    NOTE: Do not use volume_tags if you plan to manage block device tags outside the aws.ec2.Instance configuration, such as using tags in an aws.ebs.Volume resource attached via aws.ec2.VolumeAttachment. Doing so will result in resource cycling and inconsistent behavior.

    vpcSecurityGroupIds List<String>
    List of security group IDs to associate with.

    Supporting Types

    InstanceCapacityReservationSpecification, InstanceCapacityReservationSpecificationArgs

    CapacityReservationPreference string
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    CapacityReservationTarget InstanceCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    CapacityReservationPreference string
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    CapacityReservationTarget InstanceCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    capacityReservationPreference String
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    capacityReservationTarget InstanceCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    capacityReservationPreference string
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    capacityReservationTarget InstanceCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    capacity_reservation_preference str
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    capacity_reservation_target InstanceCapacityReservationSpecificationCapacityReservationTarget

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    capacityReservationPreference String
    Indicates the instance's Capacity Reservation preferences. Can be "open" or "none". (Default: "open").
    capacityReservationTarget Property Map

    Information about the target Capacity Reservation. See Capacity Reservation Target below for more details.

    For more information, see the documentation on Capacity Reservations.

    InstanceCapacityReservationSpecificationCapacityReservationTarget, InstanceCapacityReservationSpecificationCapacityReservationTargetArgs

    CapacityReservationId string
    ID of the Capacity Reservation in which to run the instance.
    CapacityReservationResourceGroupArn string
    ARN of the Capacity Reservation resource group in which to run the instance.
    CapacityReservationId string
    ID of the Capacity Reservation in which to run the instance.
    CapacityReservationResourceGroupArn string
    ARN of the Capacity Reservation resource group in which to run the instance.
    capacityReservationId String
    ID of the Capacity Reservation in which to run the instance.
    capacityReservationResourceGroupArn String
    ARN of the Capacity Reservation resource group in which to run the instance.
    capacityReservationId string
    ID of the Capacity Reservation in which to run the instance.
    capacityReservationResourceGroupArn string
    ARN of the Capacity Reservation resource group in which to run the instance.
    capacity_reservation_id str
    ID of the Capacity Reservation in which to run the instance.
    capacity_reservation_resource_group_arn str
    ARN of the Capacity Reservation resource group in which to run the instance.
    capacityReservationId String
    ID of the Capacity Reservation in which to run the instance.
    capacityReservationResourceGroupArn String
    ARN of the Capacity Reservation resource group in which to run the instance.

    InstanceCpuOptions, InstanceCpuOptionsArgs

    AmdSevSnp string
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    CoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    ThreadsPerCore int

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    AmdSevSnp string
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    CoreCount int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    ThreadsPerCore int

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    amdSevSnp String
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    coreCount Integer
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    threadsPerCore Integer

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    amdSevSnp string
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    coreCount number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    threadsPerCore number

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    amd_sev_snp str
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    core_count int
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    threads_per_core int

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    amdSevSnp String
    Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is supported with M6a, R6a, and C6a instance types only. Valid values are enabled and disabled.
    coreCount Number
    Sets the number of CPU cores for an instance. This option is only supported on creation of instance type that support CPU Options CPU Cores and Threads Per CPU Core Per Instance Type - specifying this option for unsupported instance types will return an error from the EC2 API.
    threadsPerCore Number

    If set to 1, hyperthreading is disabled on the launched instance. Defaults to 2 if not set. See Optimizing CPU Options for more information.

    For more information, see the documentation on Optimizing CPU options.

    InstanceCreditSpecification, InstanceCreditSpecificationArgs

    CpuCredits string
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    CpuCredits string
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    cpuCredits String
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    cpuCredits string
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    cpu_credits str
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.
    cpuCredits String
    Credit option for CPU usage. Valid values include standard or unlimited. T3 instances are launched as unlimited by default. T2 instances are launched as standard by default.

    InstanceEbsBlockDevice, InstanceEbsBlockDeviceArgs

    DeviceName string
    Name of the device to mount.
    DeleteOnTermination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    Encrypted bool
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    Iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    KmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    SnapshotId string
    Snapshot ID to mount.
    Tags Dictionary<string, string>
    Map of tags to assign to the device.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    VolumeId string
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    VolumeSize int
    Size of the volume in gibibytes (GiB).
    VolumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    DeviceName string
    Name of the device to mount.
    DeleteOnTermination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    Encrypted bool
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    Iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    KmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    SnapshotId string
    Snapshot ID to mount.
    Tags map[string]string
    Map of tags to assign to the device.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    VolumeId string
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    VolumeSize int
    Size of the volume in gibibytes (GiB).
    VolumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    deviceName String
    Name of the device to mount.
    deleteOnTermination Boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    encrypted Boolean
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    iops Integer
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId String
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    snapshotId String
    Snapshot ID to mount.
    tags Map<String,String>
    Map of tags to assign to the device.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput Integer
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId String
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    volumeSize Integer
    Size of the volume in gibibytes (GiB).
    volumeType String

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    deviceName string
    Name of the device to mount.
    deleteOnTermination boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    encrypted boolean
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    iops number
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    snapshotId string
    Snapshot ID to mount.
    tags {[key: string]: string}
    Map of tags to assign to the device.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput number
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId string
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    volumeSize number
    Size of the volume in gibibytes (GiB).
    volumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    device_name str
    Name of the device to mount.
    delete_on_termination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    encrypted bool
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kms_key_id str
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    snapshot_id str
    Snapshot ID to mount.
    tags Mapping[str, str]
    Map of tags to assign to the device.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volume_id str
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    volume_size int
    Size of the volume in gibibytes (GiB).
    volume_type str

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    deviceName String
    Name of the device to mount.
    deleteOnTermination Boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    encrypted Boolean
    Enables EBS encryption on the volume. Defaults to false. Cannot be used with snapshot_id. Must be configured to perform drift detection.
    iops Number
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId String
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    snapshotId String
    Snapshot ID to mount.
    tags Map<String>
    Map of tags to assign to the device.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput Number
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId String
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    volumeSize Number
    Size of the volume in gibibytes (GiB).
    volumeType String

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to gp2.

    NOTE: Currently, changes to the ebs_block_device configuration of existing resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the aws.ebs.Volume and aws.ec2.VolumeAttachment resources instead. If you use ebs_block_device on an aws.ec2.Instance, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws.ebs.Volume and aws.ec2.VolumeAttachment resources for a given instance.

    InstanceEnclaveOptions, InstanceEnclaveOptionsArgs

    Enabled bool

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    Enabled bool

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    enabled Boolean

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    enabled boolean

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    enabled bool

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    enabled Boolean

    Whether Nitro Enclaves will be enabled on the instance. Defaults to false.

    For more information, see the documentation on Nitro Enclaves.

    InstanceEphemeralBlockDevice, InstanceEphemeralBlockDeviceArgs

    DeviceName string
    Name of the block device to mount on the instance.
    NoDevice bool
    Suppresses the specified device included in the AMI's block device mapping.
    VirtualName string

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    DeviceName string
    Name of the block device to mount on the instance.
    NoDevice bool
    Suppresses the specified device included in the AMI's block device mapping.
    VirtualName string

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    deviceName String
    Name of the block device to mount on the instance.
    noDevice Boolean
    Suppresses the specified device included in the AMI's block device mapping.
    virtualName String

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    deviceName string
    Name of the block device to mount on the instance.
    noDevice boolean
    Suppresses the specified device included in the AMI's block device mapping.
    virtualName string

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    device_name str
    Name of the block device to mount on the instance.
    no_device bool
    Suppresses the specified device included in the AMI's block device mapping.
    virtual_name str

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    deviceName String
    Name of the block device to mount on the instance.
    noDevice Boolean
    Suppresses the specified device included in the AMI's block device mapping.
    virtualName String

    Instance Store Device Name (e.g., ephemeral0).

    Each AWS Instance type has a different set of Instance Store block devices available for attachment. AWS publishes a list of which ephemeral devices are available on each type. The devices are always identified by the virtual_name in the format ephemeral{0..N}.

    InstanceInstanceMarketOptions, InstanceInstanceMarketOptionsArgs

    MarketType string
    Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
    SpotOptions InstanceInstanceMarketOptionsSpotOptions
    Block to configure the options for Spot Instances. See Spot Options below for details on attributes.
    MarketType string
    Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
    SpotOptions InstanceInstanceMarketOptionsSpotOptions
    Block to configure the options for Spot Instances. See Spot Options below for details on attributes.
    marketType String
    Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
    spotOptions InstanceInstanceMarketOptionsSpotOptions
    Block to configure the options for Spot Instances. See Spot Options below for details on attributes.
    marketType string
    Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
    spotOptions InstanceInstanceMarketOptionsSpotOptions
    Block to configure the options for Spot Instances. See Spot Options below for details on attributes.
    market_type str
    Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
    spot_options InstanceInstanceMarketOptionsSpotOptions
    Block to configure the options for Spot Instances. See Spot Options below for details on attributes.
    marketType String
    Type of market for the instance. Valid value is spot. Defaults to spot. Required if spot_options is specified.
    spotOptions Property Map
    Block to configure the options for Spot Instances. See Spot Options below for details on attributes.

    InstanceInstanceMarketOptionsSpotOptions, InstanceInstanceMarketOptionsSpotOptionsArgs

    InstanceInterruptionBehavior string
    The behavior when a Spot Instance is interrupted. Valid values include hibernate, stop, terminate . The default is terminate.
    MaxPrice string
    The maximum hourly price that you're willing to pay for a Spot Instance.
    SpotInstanceType string
    The Spot Instance request type. Valid values include one-time, persistent. Persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop. The default is one-time.
    ValidUntil string
    The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported only for persistent requests.
    InstanceInterruptionBehavior string
    The behavior when a Spot Instance is interrupted. Valid values include hibernate, stop, terminate . The default is terminate.
    MaxPrice string
    The maximum hourly price that you're willing to pay for a Spot Instance.
    SpotInstanceType string
    The Spot Instance request type. Valid values include one-time, persistent. Persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop. The default is one-time.
    ValidUntil string
    The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported only for persistent requests.
    instanceInterruptionBehavior String
    The behavior when a Spot Instance is interrupted. Valid values include hibernate, stop, terminate . The default is terminate.
    maxPrice String
    The maximum hourly price that you're willing to pay for a Spot Instance.
    spotInstanceType String
    The Spot Instance request type. Valid values include one-time, persistent. Persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop. The default is one-time.
    validUntil String
    The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported only for persistent requests.
    instanceInterruptionBehavior string
    The behavior when a Spot Instance is interrupted. Valid values include hibernate, stop, terminate . The default is terminate.
    maxPrice string
    The maximum hourly price that you're willing to pay for a Spot Instance.
    spotInstanceType string
    The Spot Instance request type. Valid values include one-time, persistent. Persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop. The default is one-time.
    validUntil string
    The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported only for persistent requests.
    instance_interruption_behavior str
    The behavior when a Spot Instance is interrupted. Valid values include hibernate, stop, terminate . The default is terminate.
    max_price str
    The maximum hourly price that you're willing to pay for a Spot Instance.
    spot_instance_type str
    The Spot Instance request type. Valid values include one-time, persistent. Persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop. The default is one-time.
    valid_until str
    The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported only for persistent requests.
    instanceInterruptionBehavior String
    The behavior when a Spot Instance is interrupted. Valid values include hibernate, stop, terminate . The default is terminate.
    maxPrice String
    The maximum hourly price that you're willing to pay for a Spot Instance.
    spotInstanceType String
    The Spot Instance request type. Valid values include one-time, persistent. Persistent Spot Instance requests are only supported when the instance interruption behavior is either hibernate or stop. The default is one-time.
    validUntil String
    The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported only for persistent requests.

    InstanceLaunchTemplate, InstanceLaunchTemplateArgs

    Id string
    ID of the launch template. Conflicts with name.
    Name string
    Name of the launch template. Conflicts with id.
    Version string
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    Id string
    ID of the launch template. Conflicts with name.
    Name string
    Name of the launch template. Conflicts with id.
    Version string
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    id String
    ID of the launch template. Conflicts with name.
    name String
    Name of the launch template. Conflicts with id.
    version String
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    id string
    ID of the launch template. Conflicts with name.
    name string
    Name of the launch template. Conflicts with id.
    version string
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    id str
    ID of the launch template. Conflicts with name.
    name str
    Name of the launch template. Conflicts with id.
    version str
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.
    id String
    ID of the launch template. Conflicts with name.
    name String
    Name of the launch template. Conflicts with id.
    version String
    Template version. Can be a specific version number, $Latest or $Default. The default value is $Default.

    InstanceMaintenanceOptions, InstanceMaintenanceOptionsArgs

    AutoRecovery string
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    AutoRecovery string
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    autoRecovery String
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    autoRecovery string
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    auto_recovery str
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.
    autoRecovery String
    Automatic recovery behavior of the Instance. Can be "default" or "disabled". See Recover your instance for more details.

    InstanceMetadataOptions, InstanceMetadataOptionsArgs

    HttpEndpoint string
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    HttpProtocolIpv6 string
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    HttpPutResponseHopLimit int
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    HttpTokens string
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    InstanceMetadataTags string

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    HttpEndpoint string
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    HttpProtocolIpv6 string
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    HttpPutResponseHopLimit int
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    HttpTokens string
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    InstanceMetadataTags string

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    httpEndpoint String
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    httpProtocolIpv6 String
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    httpPutResponseHopLimit Integer
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    httpTokens String
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    instanceMetadataTags String

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    httpEndpoint string
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    httpProtocolIpv6 string
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    httpPutResponseHopLimit number
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    httpTokens string
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    instanceMetadataTags string

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    http_endpoint str
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    http_protocol_ipv6 str
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    http_put_response_hop_limit int
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    http_tokens str
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    instance_metadata_tags str

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    httpEndpoint String
    Whether the metadata service is available. Valid values include enabled or disabled. Defaults to enabled.
    httpProtocolIpv6 String
    Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to disabled.
    httpPutResponseHopLimit Number
    Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from 1 to 64. Defaults to 1.
    httpTokens String
    Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2 (IMDSv2). Valid values include optional or required. Defaults to optional.
    instanceMetadataTags String

    Enables or disables access to instance tags from the instance metadata service. Valid values include enabled or disabled. Defaults to disabled.

    For more information, see the documentation on the Instance Metadata Service.

    InstanceNetworkInterface, InstanceNetworkInterfaceArgs

    DeviceIndex int
    Integer index of the network interface attachment. Limited by instance type.
    NetworkInterfaceId string
    ID of the network interface to attach.
    DeleteOnTermination bool
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    NetworkCardIndex int
    Integer index of the network card. Limited by instance type. The default index is 0.
    DeviceIndex int
    Integer index of the network interface attachment. Limited by instance type.
    NetworkInterfaceId string
    ID of the network interface to attach.
    DeleteOnTermination bool
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    NetworkCardIndex int
    Integer index of the network card. Limited by instance type. The default index is 0.
    deviceIndex Integer
    Integer index of the network interface attachment. Limited by instance type.
    networkInterfaceId String
    ID of the network interface to attach.
    deleteOnTermination Boolean
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    networkCardIndex Integer
    Integer index of the network card. Limited by instance type. The default index is 0.
    deviceIndex number
    Integer index of the network interface attachment. Limited by instance type.
    networkInterfaceId string
    ID of the network interface to attach.
    deleteOnTermination boolean
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    networkCardIndex number
    Integer index of the network card. Limited by instance type. The default index is 0.
    device_index int
    Integer index of the network interface attachment. Limited by instance type.
    network_interface_id str
    ID of the network interface to attach.
    delete_on_termination bool
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    network_card_index int
    Integer index of the network card. Limited by instance type. The default index is 0.
    deviceIndex Number
    Integer index of the network interface attachment. Limited by instance type.
    networkInterfaceId String
    ID of the network interface to attach.
    deleteOnTermination Boolean
    Whether or not to delete the network interface on instance termination. Defaults to false. Currently, the only valid value is false, as this is only supported when creating new network interfaces when launching an instance.
    networkCardIndex Number
    Integer index of the network card. Limited by instance type. The default index is 0.

    InstancePrivateDnsNameOptions, InstancePrivateDnsNameOptionsArgs

    EnableResourceNameDnsARecord bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    EnableResourceNameDnsAaaaRecord bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    HostnameType string
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    EnableResourceNameDnsARecord bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    EnableResourceNameDnsAaaaRecord bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    HostnameType string
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    enableResourceNameDnsARecord Boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    enableResourceNameDnsAaaaRecord Boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    hostnameType String
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    enableResourceNameDnsARecord boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    enableResourceNameDnsAaaaRecord boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    hostnameType string
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    enable_resource_name_dns_a_record bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    enable_resource_name_dns_aaaa_record bool
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    hostname_type str
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.
    enableResourceNameDnsARecord Boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
    enableResourceNameDnsAaaaRecord Boolean
    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
    hostnameType String
    Type of hostname for Amazon EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 native subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. Valid values: ip-name and resource-name.

    InstanceRootBlockDevice, InstanceRootBlockDeviceArgs

    DeleteOnTermination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    DeviceName string
    Device name, e.g., /dev/sdh or xvdh.
    Encrypted bool
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    Iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    KmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    Tags Dictionary<string, string>
    Map of tags to assign to the device.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    VolumeId string
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    VolumeSize int
    Size of the volume in gibibytes (GiB).
    VolumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    DeleteOnTermination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    DeviceName string
    Device name, e.g., /dev/sdh or xvdh.
    Encrypted bool
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    Iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    KmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    Tags map[string]string
    Map of tags to assign to the device.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    VolumeId string
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    VolumeSize int
    Size of the volume in gibibytes (GiB).
    VolumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    deleteOnTermination Boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    deviceName String
    Device name, e.g., /dev/sdh or xvdh.
    encrypted Boolean
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    iops Integer
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId String
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    tags Map<String,String>
    Map of tags to assign to the device.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput Integer
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId String
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    volumeSize Integer
    Size of the volume in gibibytes (GiB).
    volumeType String

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    deleteOnTermination boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    deviceName string
    Device name, e.g., /dev/sdh or xvdh.
    encrypted boolean
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    iops number
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId string
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    tags {[key: string]: string}
    Map of tags to assign to the device.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput number
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId string
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    volumeSize number
    Size of the volume in gibibytes (GiB).
    volumeType string

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    delete_on_termination bool
    Whether the volume should be destroyed on instance termination. Defaults to true.
    device_name str
    Device name, e.g., /dev/sdh or xvdh.
    encrypted bool
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    iops int
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kms_key_id str
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    tags Mapping[str, str]
    Map of tags to assign to the device.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput int
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volume_id str
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    volume_size int
    Size of the volume in gibibytes (GiB).
    volume_type str

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    deleteOnTermination Boolean
    Whether the volume should be destroyed on instance termination. Defaults to true.
    deviceName String
    Device name, e.g., /dev/sdh or xvdh.
    encrypted Boolean
    Whether to enable volume encryption. Defaults to false. Must be configured to perform drift detection.
    iops Number
    Amount of provisioned IOPS. Only valid for volume_type of io1, io2 or gp3.
    kmsKeyId String
    Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
    tags Map<String>
    Map of tags to assign to the device.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    throughput Number
    Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for volume_type of gp3.
    volumeId String
    ID of the volume. For example, the ID can be accessed like this, aws_instance.web.root_block_device.0.volume_id.
    volumeSize Number
    Size of the volume in gibibytes (GiB).
    volumeType String

    Type of volume. Valid values include standard, gp2, gp3, io1, io2, sc1, or st1. Defaults to the volume type that the AMI uses.

    Modifying the encrypted or kms_key_id settings of the root_block_device requires resource replacement.

    InstanceType, InstanceTypeArgs

    A1_2XLarge
    a1.2xlarge
    A1_4XLarge
    a1.4xlarge
    A1_Large
    a1.large
    A1_Medium
    a1.medium
    A1_Metal
    a1.metal
    A1_XLarge
    a1.xlarge
    C1_Medium
    c1.medium
    C1_XLarge
    c1.xlarge
    C3_2XLarge
    c3.2xlarge
    C3_4XLarge
    c3.4xlarge
    C3_8XLarge
    c3.8xlarge
    C3_Large
    c3.large
    C3_XLarge
    c3.xlarge
    C4_2XLarge
    c4.2xlarge
    C4_4XLarge
    c4.4xlarge
    C4_8XLarge
    c4.8xlarge
    C4_Large
    c4.large
    C4_XLarge
    c4.xlarge
    C5_12XLarge
    c5.12xlarge
    C5_18XLarge
    c5.18xlarge
    C5_24XLarge
    c5.24xlarge
    C5_2XLarge
    c5.2xlarge
    C5_4XLarge
    c5.4xlarge
    C5_9XLarge
    c5.9xlarge
    C5_Large
    c5.large
    C5_Metal
    c5.metal
    C5_XLarge
    c5.xlarge
    C5a_12XLarge
    c5a.12xlarge
    C5a_16XLarge
    c5a.16xlarge
    C5a_24XLarge
    c5a.24xlarge
    C5a_2XLarge
    c5a.2xlarge
    C5a_4XLarge
    c5a.4xlarge
    C5a_8XLarge
    c5a.8xlarge
    C5a_Large
    c5a.large
    C5a_XLarge
    c5a.xlarge
    C5ad_12XLarge
    c5ad.12xlarge
    C5ad_16XLarge
    c5ad.16xlarge
    C5ad_24XLarge
    c5ad.24xlarge
    C5ad_2XLarge
    c5ad.2xlarge
    C5ad_4XLarge
    c5ad.4xlarge
    C5ad_8XLarge
    c5ad.8xlarge
    C5ad_Large
    c5ad.large
    C5ad_XLarge
    c5ad.xlarge
    C5d_12XLarge
    c5d.12xlarge
    C5d_18XLarge
    c5d.18xlarge
    C5d_24XLarge
    c5d.24xlarge
    C5d_2XLarge
    c5d.2xlarge
    C5d_4XLarge
    c5d.4xlarge
    C5d_9XLarge
    c5d.9xlarge
    C5d_Large
    c5d.large
    C5d_Metal
    c5d.metal
    C5d_XLarge
    c5d.xlarge
    C5n_18XLarge
    c5n.18xlarge
    C5n_2XLarge
    c5n.2xlarge
    C5n_4XLarge
    c5n.4xlarge
    C5n_9XLarge
    c5n.9xlarge
    C5n_Large
    c5n.large
    C5n_Metal
    c5n.metal
    C5n_XLarge
    c5n.xlarge
    C6a_12XLarge
    c6a.12xlarge
    C6a_16XLarge
    c6a.16xlarge
    C6a_24XLarge
    c6a.24xlarge
    C6a_2XLarge
    c6a.2xlarge
    C6a_32XLarge
    c6a.32xlarge
    C6a_48XLarge
    c6a.48xlarge
    C6a_4XLarge
    c6a.4xlarge
    C6a_8XLarge
    c6a.8xlarge
    C6a_Large
    c6a.large
    C6a_Metal
    c6a.metal
    C6a_XLarge
    c6a.xlarge
    C6g_12XLarge
    c6g.12xlarge
    C6g_16XLarge
    c6g.16xlarge
    C6g_2XLarge
    c6g.2xlarge
    C6g_4XLarge
    c6g.4xlarge
    C6g_8XLarge
    c6g.8xlarge
    C6g_Large
    c6g.large
    C6g_Medium
    c6g.medium
    C6g_Metal
    c6g.metal
    C6g_XLarge
    c6g.xlarge
    C6gd_12XLarge
    c6gd.12xlarge
    C6gd_16XLarge
    c6gd.16xlarge
    C6gd_2XLarge
    c6gd.2xlarge
    C6gd_4XLarge
    c6gd.4xlarge
    C6gd_8XLarge
    c6gd.8xlarge
    C6gd_Large
    c6gd.large
    C6gd_Medium
    c6gd.medium
    C6gd_Metal
    c6gd.metal
    C6gd_XLarge
    c6gd.xlarge
    C6gn_12XLarge
    c6gn.12xlarge
    C6gn_16XLarge
    c6gn.16xlarge
    C6gn_2XLarge
    c6gn.2xlarge
    C6gn_4XLarge
    c6gn.4xlarge
    C6gn_8XLarge
    c6gn.8xlarge
    C6gn_Large
    c6gn.large
    C6gn_Medium
    c6gn.medium
    C6gn_XLarge
    c6gn.xlarge
    C6i_12XLarge
    c6i.12xlarge
    C6i_16XLarge
    c6i.16xlarge
    C6i_24XLarge
    c6i.24xlarge
    C6i_2XLarge
    c6i.2xlarge
    C6i_32XLarge
    c6i.32xlarge
    C6i_4XLarge
    c6i.4xlarge
    C6i_8XLarge
    c6i.8xlarge
    C6i_Large
    c6i.large
    C6i_Metal
    c6i.metal
    C6i_XLarge
    c6i.xlarge
    C6id_12XLarge
    c6id.12xlarge
    C6id_16XLarge
    c6id.16xlarge
    C6id_24XLarge
    c6id.24xlarge
    C6id_2XLarge
    c6id.2xlarge
    C6id_32XLarge
    c6id.32xlarge
    C6id_4XLarge
    c6id.4xlarge
    C6id_8XLarge
    c6id.8xlarge
    C6id_Large
    c6id.large
    C6id_Metal
    c6id.metal
    C6id_XLarge
    c6id.xlarge
    C6in_12XLarge
    c6in.12xlarge
    C6in_16XLarge
    c6in.16xlarge
    C6in_24XLarge
    c6in.24xlarge
    C6in_2XLarge
    c6in.2xlarge
    C6in_32XLarge
    c6in.32xlarge
    C6in_4XLarge
    c6in.4xlarge
    C6in_8XLarge
    c6in.8xlarge
    C6in_Large
    c6in.large
    C6in_Metal
    c6in.metal
    C6in_XLarge
    c6in.xlarge
    C7a_12XLarge
    c7a.12xlarge
    C7a_16XLarge
    c7a.16xlarge
    C7a_24XLarge
    c7a.24xlarge
    C7a_2XLarge
    c7a.2xlarge
    C7a_32XLarge
    c7a.32xlarge
    C7a_48XLarge
    c7a.48xlarge
    C7a_4XLarge
    c7a.4xlarge
    C7a_8XLarge
    c7a.8xlarge
    C7a_Large
    c7a.large
    C7a_Medium
    c7a.medium
    C7a_Metal_48xl
    c7a.metal-48xl
    C7a_XLarge
    c7a.xlarge
    C7g_12XLarge
    c7g.12xlarge
    C7g_16XLarge
    c7g.16xlarge
    C7g_2XLarge
    c7g.2xlarge
    C7g_4XLarge
    c7g.4xlarge
    C7g_8XLarge
    c7g.8xlarge
    C7g_Large
    c7g.large
    C7g_Medium
    c7g.medium
    C7g_Metal
    c7g.metal
    C7g_XLarge
    c7g.xlarge
    C7gd_12XLarge
    c7gd.12xlarge
    C7gd_16XLarge
    c7gd.16xlarge
    C7gd_2XLarge
    c7gd.2xlarge
    C7gd_4XLarge
    c7gd.4xlarge
    C7gd_8XLarge
    c7gd.8xlarge
    C7gd_Large
    c7gd.large
    C7gd_Medium
    c7gd.medium
    C7gd_Metal
    c7gd.metal
    C7gd_XLarge
    c7gd.xlarge
    C7gn_12XLarge
    c7gn.12xlarge
    C7gn_16XLarge
    c7gn.16xlarge
    C7gn_2XLarge
    c7gn.2xlarge
    C7gn_4XLarge
    c7gn.4xlarge
    C7gn_8XLarge
    c7gn.8xlarge
    C7gn_Large
    c7gn.large
    C7gn_Medium
    c7gn.medium
    C7gn_Metal
    c7gn.metal
    C7gn_XLarge
    c7gn.xlarge
    C7i_12XLarge
    c7i.12xlarge
    C7i_16XLarge
    c7i.16xlarge
    C7i_24XLarge
    c7i.24xlarge
    C7i_2XLarge
    c7i.2xlarge
    C7i_48XLarge
    c7i.48xlarge
    C7i_4XLarge
    c7i.4xlarge
    C7i_8XLarge
    c7i.8xlarge
    C7i_Large
    c7i.large
    C7i_Metal_24xl
    c7i.metal-24xl
    C7i_Metal_48xl
    c7i.metal-48xl
    C7i_XLarge
    c7i.xlarge
    D2_2XLarge
    d2.2xlarge
    D2_4XLarge
    d2.4xlarge
    D2_8XLarge
    d2.8xlarge
    D2_XLarge
    d2.xlarge
    D3_2XLarge
    d3.2xlarge
    D3_4XLarge
    d3.4xlarge
    D3_8XLarge
    d3.8xlarge
    D3_XLarge
    d3.xlarge
    D3en_12XLarge
    d3en.12xlarge
    D3en_2XLarge
    d3en.2xlarge
    D3en_4XLarge
    d3en.4xlarge
    D3en_6XLarge
    d3en.6xlarge
    D3en_8XLarge
    d3en.8xlarge
    D3en_XLarge
    d3en.xlarge
    Dl1_24XLarge
    dl1.24xlarge
    Dl2q_24XLarge
    dl2q.24xlarge
    F1_16XLarge
    f1.16xlarge
    F1_2XLarge
    f1.2xlarge
    F1_4XLarge
    f1.4xlarge
    G3_16XLarge
    g3.16xlarge
    G3_4XLarge
    g3.4xlarge
    G3_8XLarge
    g3.8xlarge
    G3s_XLarge
    g3s.xlarge
    G4ad_16XLarge
    g4ad.16xlarge
    G4ad_2XLarge
    g4ad.2xlarge
    G4ad_4XLarge
    g4ad.4xlarge
    G4ad_8XLarge
    g4ad.8xlarge
    G4ad_XLarge
    g4ad.xlarge
    G4dn_12XLarge
    g4dn.12xlarge
    G4dn_16XLarge
    g4dn.16xlarge
    G4dn_2XLarge
    g4dn.2xlarge
    G4dn_4XLarge
    g4dn.4xlarge
    G4dn_8XLarge
    g4dn.8xlarge
    G4dn_Metal
    g4dn.metal
    G4dn_XLarge
    g4dn.xlarge
    G5_12XLarge
    g5.12xlarge
    G5_16XLarge
    g5.16xlarge
    G5_24XLarge
    g5.24xlarge
    G5_2XLarge
    g5.2xlarge
    G5_48XLarge
    g5.48xlarge
    G5_4XLarge
    g5.4xlarge
    G5_8XLarge
    g5.8xlarge
    G5_XLarge
    g5.xlarge
    G5g_16XLarge
    g5g.16xlarge
    G5g_2XLarge
    g5g.2xlarge
    G5g_4XLarge
    g5g.4xlarge
    G5g_8XLarge
    g5g.8xlarge
    G5g_Metal
    g5g.metal
    G5g_XLarge
    g5g.xlarge
    G6_12XLarge
    g6.12xlarge
    G6_16XLarge
    g6.16xlarge
    G6_24XLarge
    g6.24xlarge
    G6_2XLarge
    g6.2xlarge
    G6_48XLarge
    g6.48xlarge
    G6_4XLarge
    g6.4xlarge
    G6_8XLarge
    g6.8xlarge
    G6_XLarge
    g6.xlarge
    Gr6_4XLarge
    gr6.4xlarge
    Gr6_8XLarge
    gr6.8xlarge
    H1_16XLarge
    h1.16xlarge
    H1_2XLarge
    h1.2xlarge
    H1_4XLarge
    h1.4xlarge
    H1_8XLarge
    h1.8xlarge
    I2_2XLarge
    i2.2xlarge
    I2_4XLarge
    i2.4xlarge
    I2_8XLarge
    i2.8xlarge
    I2_XLarge
    i2.xlarge
    I3_16XLarge
    i3.16xlarge
    I3_2XLarge
    i3.2xlarge
    I3_4XLarge
    i3.4xlarge
    I3_8XLarge
    i3.8xlarge
    I3_Large
    i3.large
    I3_Metal
    i3.metal
    I3_XLarge
    i3.xlarge
    I3en_12XLarge
    i3en.12xlarge
    I3en_24XLarge
    i3en.24xlarge
    I3en_2XLarge
    i3en.2xlarge
    I3en_3XLarge
    i3en.3xlarge
    I3en_6XLarge
    i3en.6xlarge
    I3en_Large
    i3en.large
    I3en_Metal
    i3en.metal
    I3en_XLarge
    i3en.xlarge
    I4g_16XLarge
    i4g.16xlarge
    I4g_2XLarge
    i4g.2xlarge
    I4g_4XLarge
    i4g.4xlarge
    I4g_8XLarge
    i4g.8xlarge
    I4g_Large
    i4g.large
    I4g_XLarge
    i4g.xlarge
    I4i_12XLarge
    i4i.12xlarge
    I4i_16XLarge
    i4i.16xlarge
    I4i_24XLarge
    i4i.24xlarge
    I4i_2XLarge
    i4i.2xlarge
    I4i_32XLarge
    i4i.32xlarge
    I4i_4XLarge
    i4i.4xlarge
    I4i_8XLarge
    i4i.8xlarge
    I4i_Large
    i4i.large
    I4i_Metal
    i4i.metal
    I4i_XLarge
    i4i.xlarge
    Im4gn_16XLarge
    im4gn.16xlarge
    Im4gn_2XLarge
    im4gn.2xlarge
    Im4gn_4XLarge
    im4gn.4xlarge
    Im4gn_8XLarge
    im4gn.8xlarge
    Im4gn_Large
    im4gn.large
    Im4gn_XLarge
    im4gn.xlarge
    Inf1_24XLarge
    inf1.24xlarge
    Inf1_2XLarge
    inf1.2xlarge
    Inf1_6XLarge
    inf1.6xlarge
    Inf1_XLarge
    inf1.xlarge
    Inf2_24XLarge
    inf2.24xlarge
    Inf2_48XLarge
    inf2.48xlarge
    Inf2_8XLarge
    inf2.8xlarge
    Inf2_XLarge
    inf2.xlarge
    Is4gen_2XLarge
    is4gen.2xlarge
    Is4gen_4XLarge
    is4gen.4xlarge
    Is4gen_8XLarge
    is4gen.8xlarge
    Is4gen_Large
    is4gen.large
    Is4gen_Medium
    is4gen.medium
    Is4gen_XLarge
    is4gen.xlarge
    M1_Large
    m1.large
    M1_Medium
    m1.medium
    M1_Small
    m1.small
    M1_XLarge
    m1.xlarge
    M2_2XLarge
    m2.2xlarge
    M2_4XLarge
    m2.4xlarge
    M2_XLarge
    m2.xlarge
    M3_2XLarge
    m3.2xlarge
    M3_Large
    m3.large
    M3_Medium
    m3.medium
    M3_XLarge
    m3.xlarge
    M4_10XLarge
    m4.10xlarge
    M4_16XLarge
    m4.16xlarge
    M4_2XLarge
    m4.2xlarge
    M4_4XLarge
    m4.4xlarge
    M4_Large
    m4.large
    M4_XLarge
    m4.xlarge
    M5_12XLarge
    m5.12xlarge
    M5_16XLarge
    m5.16xlarge
    M5_24XLarge
    m5.24xlarge
    M5_2XLarge
    m5.2xlarge
    M5_4XLarge
    m5.4xlarge
    M5_8XLarge
    m5.8xlarge
    M5_Large
    m5.large
    M5_Metal
    m5.metal
    M5_XLarge
    m5.xlarge
    M5a_12XLarge
    m5a.12xlarge
    M5a_16XLarge
    m5a.16xlarge
    M5a_24XLarge
    m5a.24xlarge
    M5a_2XLarge
    m5a.2xlarge
    M5a_4XLarge
    m5a.4xlarge
    M5a_8XLarge
    m5a.8xlarge
    M5a_Large
    m5a.large
    M5a_XLarge
    m5a.xlarge
    M5ad_12XLarge
    m5ad.12xlarge
    M5ad_16XLarge
    m5ad.16xlarge
    M5ad_24XLarge
    m5ad.24xlarge
    M5ad_2XLarge
    m5ad.2xlarge
    M5ad_4XLarge
    m5ad.4xlarge
    M5ad_8XLarge
    m5ad.8xlarge
    M5ad_Large
    m5ad.large
    M5ad_XLarge
    m5ad.xlarge
    M5d_12XLarge
    m5d.12xlarge
    M5d_16XLarge
    m5d.16xlarge
    M5d_24XLarge
    m5d.24xlarge
    M5d_2XLarge
    m5d.2xlarge
    M5d_4XLarge
    m5d.4xlarge
    M5d_8XLarge
    m5d.8xlarge
    M5d_Large
    m5d.large
    M5d_Metal
    m5d.metal
    M5d_XLarge
    m5d.xlarge
    M5dn_12XLarge
    m5dn.12xlarge
    M5dn_16XLarge
    m5dn.16xlarge
    M5dn_24XLarge
    m5dn.24xlarge
    M5dn_2XLarge
    m5dn.2xlarge
    M5dn_4XLarge
    m5dn.4xlarge
    M5dn_8XLarge
    m5dn.8xlarge
    M5dn_Large
    m5dn.large
    M5dn_Metal
    m5dn.metal
    M5dn_XLarge
    m5dn.xlarge
    M5n_12XLarge
    m5n.12xlarge
    M5n_16XLarge
    m5n.16xlarge
    M5n_24XLarge
    m5n.24xlarge
    M5n_2XLarge
    m5n.2xlarge
    M5n_4XLarge
    m5n.4xlarge
    M5n_8XLarge
    m5n.8xlarge
    M5n_Large
    m5n.large
    M5n_Metal
    m5n.metal
    M5n_XLarge
    m5n.xlarge
    M5zn_12XLarge
    m5zn.12xlarge
    M5zn_2XLarge
    m5zn.2xlarge
    M5zn_3XLarge
    m5zn.3xlarge
    M5zn_6XLarge
    m5zn.6xlarge
    M5zn_Large
    m5zn.large
    M5zn_Metal
    m5zn.metal
    M5zn_XLarge
    m5zn.xlarge
    M6a_12XLarge
    m6a.12xlarge
    M6a_16XLarge
    m6a.16xlarge
    M6a_24XLarge
    m6a.24xlarge
    M6a_2XLarge
    m6a.2xlarge
    M6a_32XLarge
    m6a.32xlarge
    M6a_48XLarge
    m6a.48xlarge
    M6a_4XLarge
    m6a.4xlarge
    M6a_8XLarge
    m6a.8xlarge
    M6a_Large
    m6a.large
    M6a_Metal
    m6a.metal
    M6a_XLarge
    m6a.xlarge
    M6g_12XLarge
    m6g.12xlarge
    M6g_16XLarge
    m6g.16xlarge
    M6g_2XLarge
    m6g.2xlarge
    M6g_4XLarge
    m6g.4xlarge
    M6g_8XLarge
    m6g.8xlarge
    M6g_Large
    m6g.large
    M6g_Medium
    m6g.medium
    M6g_Metal
    m6g.metal
    M6g_XLarge
    m6g.xlarge
    M6gd_12XLarge
    m6gd.12xlarge
    M6gd_16XLarge
    m6gd.16xlarge
    M6gd_2XLarge
    m6gd.2xlarge
    M6gd_4XLarge
    m6gd.4xlarge
    M6gd_8XLarge
    m6gd.8xlarge
    M6gd_Large
    m6gd.large
    M6gd_Medium
    m6gd.medium
    M6gd_Metal
    m6gd.metal
    M6gd_XLarge
    m6gd.xlarge
    M6i_12XLarge
    m6i.12xlarge
    M6i_16XLarge
    m6i.16xlarge
    M6i_24XLarge
    m6i.24xlarge
    M6i_2XLarge
    m6i.2xlarge
    M6i_32XLarge
    m6i.32xlarge
    M6i_4XLarge
    m6i.4xlarge
    M6i_8XLarge
    m6i.8xlarge
    M6i_Large
    m6i.large
    M6i_Metal
    m6i.metal
    M6i_XLarge
    m6i.xlarge
    M6id_12XLarge
    m6id.12xlarge
    M6id_16XLarge
    m6id.16xlarge
    M6id_24XLarge
    m6id.24xlarge
    M6id_2XLarge
    m6id.2xlarge
    M6id_32XLarge
    m6id.32xlarge
    M6id_4XLarge
    m6id.4xlarge
    M6id_8XLarge
    m6id.8xlarge
    M6id_Large
    m6id.large
    M6id_Metal
    m6id.metal
    M6id_XLarge
    m6id.xlarge
    M6idn_12XLarge
    m6idn.12xlarge
    M6idn_16XLarge
    m6idn.16xlarge
    M6idn_24XLarge
    m6idn.24xlarge
    M6idn_2XLarge
    m6idn.2xlarge
    M6idn_32XLarge
    m6idn.32xlarge
    M6idn_4XLarge
    m6idn.4xlarge
    M6idn_8XLarge
    m6idn.8xlarge
    M6idn_Large
    m6idn.large
    M6idn_Metal
    m6idn.metal
    M6idn_XLarge
    m6idn.xlarge
    M6in_12XLarge
    m6in.12xlarge
    M6in_16XLarge
    m6in.16xlarge
    M6in_24XLarge
    m6in.24xlarge
    M6in_2XLarge
    m6in.2xlarge
    M6in_32XLarge
    m6in.32xlarge
    M6in_4XLarge
    m6in.4xlarge
    M6in_8XLarge
    m6in.8xlarge
    M6in_Large
    m6in.large
    M6in_Metal
    m6in.metal
    M6in_XLarge
    m6in.xlarge
    M7a_12XLarge
    m7a.12xlarge
    M7a_16XLarge
    m7a.16xlarge
    M7a_24XLarge
    m7a.24xlarge
    M7a_2XLarge
    m7a.2xlarge
    M7a_32XLarge
    m7a.32xlarge
    M7a_48XLarge
    m7a.48xlarge
    M7a_4XLarge
    m7a.4xlarge
    M7a_8XLarge
    m7a.8xlarge
    M7a_Large
    m7a.large
    M7a_Medium
    m7a.medium
    M7a_Metal_48xl
    m7a.metal-48xl
    M7a_XLarge
    m7a.xlarge
    M7g_12XLarge
    m7g.12xlarge
    M7g_16XLarge
    m7g.16xlarge
    M7g_2XLarge
    m7g.2xlarge
    M7g_4XLarge
    m7g.4xlarge
    M7g_8XLarge
    m7g.8xlarge
    M7g_Large
    m7g.large
    M7g_Medium
    m7g.medium
    M7g_Metal
    m7g.metal
    M7g_XLarge
    m7g.xlarge
    M7gd_12XLarge
    m7gd.12xlarge
    M7gd_16XLarge
    m7gd.16xlarge
    M7gd_2XLarge
    m7gd.2xlarge
    M7gd_4XLarge
    m7gd.4xlarge
    M7gd_8XLarge
    m7gd.8xlarge
    M7gd_Large
    m7gd.large
    M7gd_Medium
    m7gd.medium
    M7gd_Metal
    m7gd.metal
    M7gd_XLarge
    m7gd.xlarge
    M7i_flex_2XLarge
    m7i-flex.2xlarge
    M7i_flex_4XLarge
    m7i-flex.4xlarge
    M7i_flex_8XLarge
    m7i-flex.8xlarge
    M7i_flex_Large
    m7i-flex.large
    M7i_flex_XLarge
    m7i-flex.xlarge
    M7i_12XLarge
    m7i.12xlarge
    M7i_16XLarge
    m7i.16xlarge
    M7i_24XLarge
    m7i.24xlarge
    M7i_2XLarge
    m7i.2xlarge
    M7i_48XLarge
    m7i.48xlarge
    M7i_4XLarge
    m7i.4xlarge
    M7i_8XLarge
    m7i.8xlarge
    M7i_Large
    m7i.large
    M7i_Metal_24xl
    m7i.metal-24xl
    M7i_Metal_48xl
    m7i.metal-48xl
    M7i_XLarge
    m7i.xlarge
    Mac1_Metal
    mac1.metal
    Mac2_m2_Metal
    mac2-m2.metal
    Mac2_m2pro_Metal
    mac2-m2pro.metal
    Mac2_Metal
    mac2.metal
    P2_16XLarge
    p2.16xlarge
    P2_8XLarge
    p2.8xlarge
    P2_XLarge
    p2.xlarge
    P3_16XLarge
    p3.16xlarge
    P3_2XLarge
    p3.2xlarge
    P3_8XLarge
    p3.8xlarge
    P3dn_24XLarge
    p3dn.24xlarge
    P4d_24XLarge
    p4d.24xlarge
    P5_48XLarge
    p5.48xlarge
    R3_2XLarge
    r3.2xlarge
    R3_4XLarge
    r3.4xlarge
    R3_8XLarge
    r3.8xlarge
    R3_Large
    r3.large
    R3_XLarge
    r3.xlarge
    R4_16XLarge
    r4.16xlarge
    R4_2XLarge
    r4.2xlarge
    R4_4XLarge
    r4.4xlarge
    R4_8XLarge
    r4.8xlarge
    R4_Large
    r4.large
    R4_XLarge
    r4.xlarge
    R5_12XLarge
    r5.12xlarge
    R5_16XLarge
    r5.16xlarge
    R5_24XLarge
    r5.24xlarge
    R5_2XLarge
    r5.2xlarge
    R5_4XLarge
    r5.4xlarge
    R5_8XLarge
    r5.8xlarge
    R5_Large
    r5.large
    R5_Metal
    r5.metal
    R5_XLarge
    r5.xlarge
    R5a_12XLarge
    r5a.12xlarge
    R5a_16XLarge
    r5a.16xlarge
    R5a_24XLarge
    r5a.24xlarge
    R5a_2XLarge
    r5a.2xlarge
    R5a_4XLarge
    r5a.4xlarge
    R5a_8XLarge
    r5a.8xlarge
    R5a_Large
    r5a.large
    R5a_XLarge
    r5a.xlarge
    R5ad_12XLarge
    r5ad.12xlarge
    R5ad_16XLarge
    r5ad.16xlarge
    R5ad_24XLarge
    r5ad.24xlarge
    R5ad_2XLarge
    r5ad.2xlarge
    R5ad_4XLarge
    r5ad.4xlarge
    R5ad_8XLarge
    r5ad.8xlarge
    R5ad_Large
    r5ad.large
    R5ad_XLarge
    r5ad.xlarge
    R5b_12XLarge
    r5b.12xlarge
    R5b_16XLarge
    r5b.16xlarge
    R5b_24XLarge
    r5b.24xlarge
    R5b_2XLarge
    r5b.2xlarge
    R5b_4XLarge
    r5b.4xlarge
    R5b_8XLarge
    r5b.8xlarge
    R5b_Large
    r5b.large
    R5b_Metal
    r5b.metal
    R5b_XLarge
    r5b.xlarge
    R5d_12XLarge
    r5d.12xlarge
    R5d_16XLarge
    r5d.16xlarge
    R5d_24XLarge
    r5d.24xlarge
    R5d_2XLarge
    r5d.2xlarge
    R5d_4XLarge
    r5d.4xlarge
    R5d_8XLarge
    r5d.8xlarge
    R5d_Large
    r5d.large
    R5d_Metal
    r5d.metal
    R5d_XLarge
    r5d.xlarge
    R5dn_12XLarge
    r5dn.12xlarge
    R5dn_16XLarge
    r5dn.16xlarge
    R5dn_24XLarge
    r5dn.24xlarge
    R5dn_2XLarge
    r5dn.2xlarge
    R5dn_4XLarge
    r5dn.4xlarge
    R5dn_8XLarge
    r5dn.8xlarge
    R5dn_Large
    r5dn.large
    R5dn_Metal
    r5dn.metal
    R5dn_XLarge
    r5dn.xlarge
    R5n_12XLarge
    r5n.12xlarge
    R5n_16XLarge
    r5n.16xlarge
    R5n_24XLarge
    r5n.24xlarge
    R5n_2XLarge
    r5n.2xlarge
    R5n_4XLarge
    r5n.4xlarge
    R5n_8XLarge
    r5n.8xlarge
    R5n_Large
    r5n.large
    R5n_Metal
    r5n.metal
    R5n_XLarge
    r5n.xlarge
    R6a_12XLarge
    r6a.12xlarge
    R6a_16XLarge
    r6a.16xlarge
    R6a_24XLarge
    r6a.24xlarge
    R6a_2XLarge
    r6a.2xlarge
    R6a_32XLarge
    r6a.32xlarge
    R6a_48XLarge
    r6a.48xlarge
    R6a_4XLarge
    r6a.4xlarge
    R6a_8XLarge
    r6a.8xlarge
    R6a_Large
    r6a.large
    R6a_Metal
    r6a.metal
    R6a_XLarge
    r6a.xlarge
    R6g_12XLarge
    r6g.12xlarge
    R6g_16XLarge
    r6g.16xlarge
    R6g_2XLarge
    r6g.2xlarge
    R6g_4XLarge
    r6g.4xlarge
    R6g_8XLarge
    r6g.8xlarge
    R6g_Large
    r6g.large
    R6g_Medium
    r6g.medium
    R6g_Metal
    r6g.metal
    R6g_XLarge
    r6g.xlarge
    R6gd_12XLarge
    r6gd.12xlarge
    R6gd_16XLarge
    r6gd.16xlarge
    R6gd_2XLarge
    r6gd.2xlarge
    R6gd_4XLarge
    r6gd.4xlarge
    R6gd_8XLarge
    r6gd.8xlarge
    R6gd_Large
    r6gd.large
    R6gd_Medium
    r6gd.medium
    R6gd_Metal
    r6gd.metal
    R6gd_XLarge
    r6gd.xlarge
    R6i_12XLarge
    r6i.12xlarge
    R6i_16XLarge
    r6i.16xlarge
    R6i_24XLarge
    r6i.24xlarge
    R6i_2XLarge
    r6i.2xlarge
    R6i_32XLarge
    r6i.32xlarge
    R6i_4XLarge
    r6i.4xlarge
    R6i_8XLarge
    r6i.8xlarge
    R6i_Large
    r6i.large
    R6i_Metal
    r6i.metal
    R6i_XLarge
    r6i.xlarge
    R6id_12XLarge
    r6id.12xlarge
    R6id_16XLarge
    r6id.16xlarge
    R6id_24XLarge
    r6id.24xlarge
    R6id_2XLarge
    r6id.2xlarge
    R6id_32XLarge
    r6id.32xlarge
    R6id_4XLarge
    r6id.4xlarge
    R6id_8XLarge
    r6id.8xlarge
    R6id_Large
    r6id.large
    R6id_Metal
    r6id.metal
    R6id_XLarge
    r6id.xlarge
    R6idn_12XLarge
    r6idn.12xlarge
    R6idn_16XLarge
    r6idn.16xlarge
    R6idn_24XLarge
    r6idn.24xlarge
    R6idn_2XLarge
    r6idn.2xlarge
    R6idn_32XLarge
    r6idn.32xlarge
    R6idn_4XLarge
    r6idn.4xlarge
    R6idn_8XLarge
    r6idn.8xlarge
    R6idn_Large
    r6idn.large
    R6idn_Metal
    r6idn.metal
    R6idn_XLarge
    r6idn.xlarge
    R6in_12XLarge
    r6in.12xlarge
    R6in_16XLarge
    r6in.16xlarge
    R6in_24XLarge
    r6in.24xlarge
    R6in_2XLarge
    r6in.2xlarge
    R6in_32XLarge
    r6in.32xlarge
    R6in_4XLarge
    r6in.4xlarge
    R6in_8XLarge
    r6in.8xlarge
    R6in_Large
    r6in.large
    R6in_Metal
    r6in.metal
    R6in_XLarge
    r6in.xlarge
    R7a_12XLarge
    r7a.12xlarge
    R7a_16XLarge
    r7a.16xlarge
    R7a_24XLarge
    r7a.24xlarge
    R7a_2XLarge
    r7a.2xlarge
    R7a_32XLarge
    r7a.32xlarge
    R7a_48XLarge
    r7a.48xlarge
    R7a_4XLarge
    r7a.4xlarge
    R7a_8XLarge
    r7a.8xlarge
    R7a_Large
    r7a.large
    R7a_Medium
    r7a.medium
    R7a_Metal_48xl
    r7a.metal-48xl
    R7a_XLarge
    r7a.xlarge
    R7g_12XLarge
    r7g.12xlarge
    R7g_16XLarge
    r7g.16xlarge
    R7g_2XLarge
    r7g.2xlarge
    R7g_4XLarge
    r7g.4xlarge
    R7g_8XLarge
    r7g.8xlarge
    R7g_Large
    r7g.large
    R7g_Medium
    r7g.medium
    R7g_Metal
    r7g.metal
    R7g_XLarge
    r7g.xlarge
    R7gd_12XLarge
    r7gd.12xlarge
    R7gd_16XLarge
    r7gd.16xlarge
    R7gd_2XLarge
    r7gd.2xlarge
    R7gd_4XLarge
    r7gd.4xlarge
    R7gd_8XLarge
    r7gd.8xlarge
    R7gd_Large
    r7gd.large
    R7gd_Medium
    r7gd.medium
    R7gd_Metal
    r7gd.metal
    R7gd_XLarge
    r7gd.xlarge
    R7i_12XLarge
    r7i.12xlarge
    R7i_16XLarge
    r7i.16xlarge
    R7i_24XLarge
    r7i.24xlarge
    R7i_2XLarge
    r7i.2xlarge
    R7i_48XLarge
    r7i.48xlarge
    R7i_4XLarge
    r7i.4xlarge
    R7i_8XLarge
    r7i.8xlarge
    R7i_Large
    r7i.large
    R7i_Metal_24xl
    r7i.metal-24xl
    R7i_Metal_48xl
    r7i.metal-48xl
    R7i_XLarge
    r7i.xlarge
    R7iz_12XLarge
    r7iz.12xlarge
    R7iz_16XLarge
    r7iz.16xlarge
    R7iz_2XLarge
    r7iz.2xlarge
    R7iz_32XLarge
    r7iz.32xlarge
    R7iz_4XLarge
    r7iz.4xlarge
    R7iz_8XLarge
    r7iz.8xlarge
    R7iz_Large
    r7iz.large
    R7iz_Metal_16xl
    r7iz.metal-16xl
    R7iz_Metal_32xl
    r7iz.metal-32xl
    R7iz_XLarge
    r7iz.xlarge
    T1_Micro
    t1.micro
    T2_2XLarge
    t2.2xlarge
    T2_Large
    t2.large
    T2_Medium
    t2.medium
    T2_Micro
    t2.micro
    T2_Nano
    t2.nano
    T2_Small
    t2.small
    T2_XLarge
    t2.xlarge
    T3_2XLarge
    t3.2xlarge
    T3_Large
    t3.large
    T3_Medium
    t3.medium
    T3_Micro
    t3.micro
    T3_Nano
    t3.nano
    T3_Small
    t3.small
    T3_XLarge
    t3.xlarge
    T3a_2XLarge
    t3a.2xlarge
    T3a_Large
    t3a.large
    T3a_Medium
    t3a.medium
    T3a_Micro
    t3a.micro
    T3a_Nano
    t3a.nano
    T3a_Small
    t3a.small
    T3a_XLarge
    t3a.xlarge
    T4g_2XLarge
    t4g.2xlarge
    T4g_Large
    t4g.large
    T4g_Medium
    t4g.medium
    T4g_Micro
    t4g.micro
    T4g_Nano
    t4g.nano
    T4g_Small
    t4g.small
    T4g_XLarge
    t4g.xlarge
    Trn1_2XLarge
    trn1.2xlarge
    Trn1_32XLarge
    trn1.32xlarge
    Trn1n_32XLarge
    trn1n.32xlarge
    U_12tb1_112XLarge
    u-12tb1.112xlarge
    U_18tb1_112XLarge
    u-18tb1.112xlarge
    U_24tb1_112XLarge
    u-24tb1.112xlarge
    U_3tb1_56XLarge
    u-3tb1.56xlarge
    U_6tb1_112XLarge
    u-6tb1.112xlarge
    U_6tb1_56XLarge
    u-6tb1.56xlarge
    U_9tb1_112XLarge
    u-9tb1.112xlarge
    Vt1_24XLarge
    vt1.24xlarge
    Vt1_3XLarge
    vt1.3xlarge
    Vt1_6XLarge
    vt1.6xlarge
    X1_16XLarge
    x1.16xlarge
    X1_32XLarge
    x1.32xlarge
    X1e_16XLarge
    x1e.16xlarge
    X1e_2XLarge
    x1e.2xlarge
    X1e_32XLarge
    x1e.32xlarge
    X1e_4XLarge
    x1e.4xlarge
    X1e_8XLarge
    x1e.8xlarge
    X1e_XLarge
    x1e.xlarge
    X2gd_12XLarge
    x2gd.12xlarge
    X2gd_16XLarge
    x2gd.16xlarge
    X2gd_2XLarge
    x2gd.2xlarge
    X2gd_4XLarge
    x2gd.4xlarge
    X2gd_8XLarge
    x2gd.8xlarge
    X2gd_Large
    x2gd.large
    X2gd_Medium
    x2gd.medium
    X2gd_Metal
    x2gd.metal
    X2gd_XLarge
    x2gd.xlarge
    X2idn_16XLarge
    x2idn.16xlarge
    X2idn_24XLarge
    x2idn.24xlarge
    X2idn_32XLarge
    x2idn.32xlarge
    X2idn_Metal
    x2idn.metal
    X2iedn_16XLarge
    x2iedn.16xlarge
    X2iedn_24XLarge
    x2iedn.24xlarge
    X2iedn_2XLarge
    x2iedn.2xlarge
    X2iedn_32XLarge
    x2iedn.32xlarge
    X2iedn_4XLarge
    x2iedn.4xlarge
    X2iedn_8XLarge
    x2iedn.8xlarge
    X2iedn_Metal
    x2iedn.metal
    X2iedn_XLarge
    x2iedn.xlarge
    X2iezn_12XLarge
    x2iezn.12xlarge
    X2iezn_2XLarge
    x2iezn.2xlarge
    X2iezn_4XLarge
    x2iezn.4xlarge
    X2iezn_6XLarge
    x2iezn.6xlarge
    X2iezn_8XLarge
    x2iezn.8xlarge
    X2iezn_Metal
    x2iezn.metal
    Z1d_12XLarge
    z1d.12xlarge
    Z1d_2XLarge
    z1d.2xlarge
    Z1d_3XLarge
    z1d.3xlarge
    Z1d_6XLarge
    z1d.6xlarge
    Z1d_Large
    z1d.large
    Z1d_Metal
    z1d.metal
    Z1d_XLarge
    z1d.xlarge
    U_12tb1Metal
    u-12tb1.metal

    Deprecated: This instancetype has been deprecated

    U_6tb1Metal
    u-6tb1.metal

    Deprecated: This instancetype has been deprecated

    U_9tb1Metal
    u-9tb1.metal

    Deprecated: This instancetype has been deprecated

    Hs1_8XLarge
    hs1.8xlarge

    Deprecated: This instancetype has been deprecated

    M5as_XLarge
    m5ad.xlarge

    Deprecated: Has a typo, use M5ad_XLarge instead

    C7a_Metal
    c7a.metal-48xl

    Deprecated: Use C7a_Metal_48xl instead

    M7a_Metal
    m7a.metal-48xl

    Deprecated: Use M7a_Metal_48xl instead

    Cc2_8XLarge
    cc2.8xlarge

    Deprecated: This instancetype has been deprecated

    G2_2XLarge
    g2.2xlarge

    Deprecated: This instancetype has been deprecated

    G2_8XLarge
    g2.8xlarge

    Deprecated: This instancetype has been deprecated

    InstanceType_A1_2XLarge
    a1.2xlarge
    InstanceType_A1_4XLarge
    a1.4xlarge
    InstanceType_A1_Large
    a1.large
    InstanceType_A1_Medium
    a1.medium
    InstanceType_A1_Metal
    a1.metal
    InstanceType_A1_XLarge
    a1.xlarge
    InstanceType_C1_Medium
    c1.medium
    InstanceType_C1_XLarge
    c1.xlarge
    InstanceType_C3_2XLarge
    c3.2xlarge
    InstanceType_C3_4XLarge
    c3.4xlarge
    InstanceType_C3_8XLarge
    c3.8xlarge
    InstanceType_C3_Large
    c3.large
    InstanceType_C3_XLarge
    c3.xlarge
    InstanceType_C4_2XLarge
    c4.2xlarge
    InstanceType_C4_4XLarge
    c4.4xlarge
    InstanceType_C4_8XLarge
    c4.8xlarge
    InstanceType_C4_Large
    c4.large
    InstanceType_C4_XLarge
    c4.xlarge
    InstanceType_C5_12XLarge
    c5.12xlarge
    InstanceType_C5_18XLarge
    c5.18xlarge
    InstanceType_C5_24XLarge
    c5.24xlarge
    InstanceType_C5_2XLarge
    c5.2xlarge
    InstanceType_C5_4XLarge
    c5.4xlarge
    InstanceType_C5_9XLarge
    c5.9xlarge
    InstanceType_C5_Large
    c5.large
    InstanceType_C5_Metal
    c5.metal
    InstanceType_C5_XLarge
    c5.xlarge
    InstanceType_C5a_12XLarge
    c5a.12xlarge
    InstanceType_C5a_16XLarge
    c5a.16xlarge
    InstanceType_C5a_24XLarge
    c5a.24xlarge
    InstanceType_C5a_2XLarge
    c5a.2xlarge
    InstanceType_C5a_4XLarge
    c5a.4xlarge
    InstanceType_C5a_8XLarge
    c5a.8xlarge
    InstanceType_C5a_Large
    c5a.large
    InstanceType_C5a_XLarge
    c5a.xlarge
    InstanceType_C5ad_12XLarge
    c5ad.12xlarge
    InstanceType_C5ad_16XLarge
    c5ad.16xlarge
    InstanceType_C5ad_24XLarge
    c5ad.24xlarge
    InstanceType_C5ad_2XLarge
    c5ad.2xlarge
    InstanceType_C5ad_4XLarge
    c5ad.4xlarge
    InstanceType_C5ad_8XLarge
    c5ad.8xlarge
    InstanceType_C5ad_Large
    c5ad.large
    InstanceType_C5ad_XLarge
    c5ad.xlarge
    InstanceType_C5d_12XLarge
    c5d.12xlarge
    InstanceType_C5d_18XLarge
    c5d.18xlarge
    InstanceType_C5d_24XLarge
    c5d.24xlarge
    InstanceType_C5d_2XLarge
    c5d.2xlarge
    InstanceType_C5d_4XLarge
    c5d.4xlarge
    InstanceType_C5d_9XLarge
    c5d.9xlarge
    InstanceType_C5d_Large
    c5d.large
    InstanceType_C5d_Metal
    c5d.metal
    InstanceType_C5d_XLarge
    c5d.xlarge
    InstanceType_C5n_18XLarge
    c5n.18xlarge
    InstanceType_C5n_2XLarge
    c5n.2xlarge
    InstanceType_C5n_4XLarge
    c5n.4xlarge
    InstanceType_C5n_9XLarge
    c5n.9xlarge
    InstanceType_C5n_Large
    c5n.large
    InstanceType_C5n_Metal
    c5n.metal
    InstanceType_C5n_XLarge
    c5n.xlarge
    InstanceType_C6a_12XLarge
    c6a.12xlarge
    InstanceType_C6a_16XLarge
    c6a.16xlarge
    InstanceType_C6a_24XLarge
    c6a.24xlarge
    InstanceType_C6a_2XLarge
    c6a.2xlarge
    InstanceType_C6a_32XLarge
    c6a.32xlarge
    InstanceType_C6a_48XLarge
    c6a.48xlarge
    InstanceType_C6a_4XLarge
    c6a.4xlarge
    InstanceType_C6a_8XLarge
    c6a.8xlarge
    InstanceType_C6a_Large
    c6a.large
    InstanceType_C6a_Metal
    c6a.metal
    InstanceType_C6a_XLarge
    c6a.xlarge
    InstanceType_C6g_12XLarge
    c6g.12xlarge
    InstanceType_C6g_16XLarge
    c6g.16xlarge
    InstanceType_C6g_2XLarge
    c6g.2xlarge
    InstanceType_C6g_4XLarge
    c6g.4xlarge
    InstanceType_C6g_8XLarge
    c6g.8xlarge
    InstanceType_C6g_Large
    c6g.large
    InstanceType_C6g_Medium
    c6g.medium
    InstanceType_C6g_Metal
    c6g.metal
    InstanceType_C6g_XLarge
    c6g.xlarge
    InstanceType_C6gd_12XLarge
    c6gd.12xlarge
    InstanceType_C6gd_16XLarge
    c6gd.16xlarge
    InstanceType_C6gd_2XLarge
    c6gd.2xlarge
    InstanceType_C6gd_4XLarge
    c6gd.4xlarge
    InstanceType_C6gd_8XLarge
    c6gd.8xlarge
    InstanceType_C6gd_Large
    c6gd.large
    InstanceType_C6gd_Medium
    c6gd.medium
    InstanceType_C6gd_Metal
    c6gd.metal
    InstanceType_C6gd_XLarge
    c6gd.xlarge
    InstanceType_C6gn_12XLarge
    c6gn.12xlarge
    InstanceType_C6gn_16XLarge
    c6gn.16xlarge
    InstanceType_C6gn_2XLarge
    c6gn.2xlarge
    InstanceType_C6gn_4XLarge
    c6gn.4xlarge
    InstanceType_C6gn_8XLarge
    c6gn.8xlarge
    InstanceType_C6gn_Large
    c6gn.large
    InstanceType_C6gn_Medium
    c6gn.medium
    InstanceType_C6gn_XLarge
    c6gn.xlarge
    InstanceType_C6i_12XLarge
    c6i.12xlarge
    InstanceType_C6i_16XLarge
    c6i.16xlarge
    InstanceType_C6i_24XLarge
    c6i.24xlarge
    InstanceType_C6i_2XLarge
    c6i.2xlarge
    InstanceType_C6i_32XLarge
    c6i.32xlarge
    InstanceType_C6i_4XLarge
    c6i.4xlarge
    InstanceType_C6i_8XLarge
    c6i.8xlarge
    InstanceType_C6i_Large
    c6i.large
    InstanceType_C6i_Metal
    c6i.metal
    InstanceType_C6i_XLarge
    c6i.xlarge
    InstanceType_C6id_12XLarge
    c6id.12xlarge
    InstanceType_C6id_16XLarge
    c6id.16xlarge
    InstanceType_C6id_24XLarge
    c6id.24xlarge
    InstanceType_C6id_2XLarge
    c6id.2xlarge
    InstanceType_C6id_32XLarge
    c6id.32xlarge
    InstanceType_C6id_4XLarge
    c6id.4xlarge
    InstanceType_C6id_8XLarge
    c6id.8xlarge
    InstanceType_C6id_Large
    c6id.large
    InstanceType_C6id_Metal
    c6id.metal
    InstanceType_C6id_XLarge
    c6id.xlarge
    InstanceType_C6in_12XLarge
    c6in.12xlarge
    InstanceType_C6in_16XLarge
    c6in.16xlarge
    InstanceType_C6in_24XLarge
    c6in.24xlarge
    InstanceType_C6in_2XLarge
    c6in.2xlarge
    InstanceType_C6in_32XLarge
    c6in.32xlarge
    InstanceType_C6in_4XLarge
    c6in.4xlarge
    InstanceType_C6in_8XLarge
    c6in.8xlarge
    InstanceType_C6in_Large
    c6in.large
    InstanceType_C6in_Metal
    c6in.metal
    InstanceType_C6in_XLarge
    c6in.xlarge
    InstanceType_C7a_12XLarge
    c7a.12xlarge
    InstanceType_C7a_16XLarge
    c7a.16xlarge
    InstanceType_C7a_24XLarge
    c7a.24xlarge
    InstanceType_C7a_2XLarge
    c7a.2xlarge
    InstanceType_C7a_32XLarge
    c7a.32xlarge
    InstanceType_C7a_48XLarge
    c7a.48xlarge
    InstanceType_C7a_4XLarge
    c7a.4xlarge
    InstanceType_C7a_8XLarge
    c7a.8xlarge
    InstanceType_C7a_Large
    c7a.large
    InstanceType_C7a_Medium
    c7a.medium
    InstanceType_C7a_Metal_48xl
    c7a.metal-48xl
    InstanceType_C7a_XLarge
    c7a.xlarge
    InstanceType_C7g_12XLarge
    c7g.12xlarge
    InstanceType_C7g_16XLarge
    c7g.16xlarge
    InstanceType_C7g_2XLarge
    c7g.2xlarge
    InstanceType_C7g_4XLarge
    c7g.4xlarge
    InstanceType_C7g_8XLarge
    c7g.8xlarge
    InstanceType_C7g_Large
    c7g.large
    InstanceType_C7g_Medium
    c7g.medium
    InstanceType_C7g_Metal
    c7g.metal
    InstanceType_C7g_XLarge
    c7g.xlarge
    InstanceType_C7gd_12XLarge
    c7gd.12xlarge
    InstanceType_C7gd_16XLarge
    c7gd.16xlarge
    InstanceType_C7gd_2XLarge
    c7gd.2xlarge
    InstanceType_C7gd_4XLarge
    c7gd.4xlarge
    InstanceType_C7gd_8XLarge
    c7gd.8xlarge
    InstanceType_C7gd_Large
    c7gd.large
    InstanceType_C7gd_Medium
    c7gd.medium
    InstanceType_C7gd_Metal
    c7gd.metal
    InstanceType_C7gd_XLarge
    c7gd.xlarge
    InstanceType_C7gn_12XLarge
    c7gn.12xlarge
    InstanceType_C7gn_16XLarge
    c7gn.16xlarge
    InstanceType_C7gn_2XLarge
    c7gn.2xlarge
    InstanceType_C7gn_4XLarge
    c7gn.4xlarge
    InstanceType_C7gn_8XLarge
    c7gn.8xlarge
    InstanceType_C7gn_Large
    c7gn.large
    InstanceType_C7gn_Medium
    c7gn.medium
    InstanceType_C7gn_Metal
    c7gn.metal
    InstanceType_C7gn_XLarge
    c7gn.xlarge
    InstanceType_C7i_12XLarge
    c7i.12xlarge
    InstanceType_C7i_16XLarge
    c7i.16xlarge
    InstanceType_C7i_24XLarge
    c7i.24xlarge
    InstanceType_C7i_2XLarge
    c7i.2xlarge
    InstanceType_C7i_48XLarge
    c7i.48xlarge
    InstanceType_C7i_4XLarge
    c7i.4xlarge
    InstanceType_C7i_8XLarge
    c7i.8xlarge
    InstanceType_C7i_Large
    c7i.large
    InstanceType_C7i_Metal_24xl
    c7i.metal-24xl
    InstanceType_C7i_Metal_48xl
    c7i.metal-48xl
    InstanceType_C7i_XLarge
    c7i.xlarge
    InstanceType_D2_2XLarge
    d2.2xlarge
    InstanceType_D2_4XLarge
    d2.4xlarge
    InstanceType_D2_8XLarge
    d2.8xlarge
    InstanceType_D2_XLarge
    d2.xlarge
    InstanceType_D3_2XLarge
    d3.2xlarge
    InstanceType_D3_4XLarge
    d3.4xlarge
    InstanceType_D3_8XLarge
    d3.8xlarge
    InstanceType_D3_XLarge
    d3.xlarge
    InstanceType_D3en_12XLarge
    d3en.12xlarge
    InstanceType_D3en_2XLarge
    d3en.2xlarge
    InstanceType_D3en_4XLarge
    d3en.4xlarge
    InstanceType_D3en_6XLarge
    d3en.6xlarge
    InstanceType_D3en_8XLarge
    d3en.8xlarge
    InstanceType_D3en_XLarge
    d3en.xlarge
    InstanceType_Dl1_24XLarge
    dl1.24xlarge
    InstanceType_Dl2q_24XLarge
    dl2q.24xlarge
    InstanceType_F1_16XLarge
    f1.16xlarge
    InstanceType_F1_2XLarge
    f1.2xlarge
    InstanceType_F1_4XLarge
    f1.4xlarge
    InstanceType_G3_16XLarge
    g3.16xlarge
    InstanceType_G3_4XLarge
    g3.4xlarge
    InstanceType_G3_8XLarge
    g3.8xlarge
    InstanceType_G3s_XLarge
    g3s.xlarge
    InstanceType_G4ad_16XLarge
    g4ad.16xlarge
    InstanceType_G4ad_2XLarge
    g4ad.2xlarge
    InstanceType_G4ad_4XLarge
    g4ad.4xlarge
    InstanceType_G4ad_8XLarge
    g4ad.8xlarge
    InstanceType_G4ad_XLarge
    g4ad.xlarge
    InstanceType_G4dn_12XLarge
    g4dn.12xlarge
    InstanceType_G4dn_16XLarge
    g4dn.16xlarge
    InstanceType_G4dn_2XLarge
    g4dn.2xlarge
    InstanceType_G4dn_4XLarge
    g4dn.4xlarge
    InstanceType_G4dn_8XLarge
    g4dn.8xlarge
    InstanceType_G4dn_Metal
    g4dn.metal
    InstanceType_G4dn_XLarge
    g4dn.xlarge
    InstanceType_G5_12XLarge
    g5.12xlarge
    InstanceType_G5_16XLarge
    g5.16xlarge
    InstanceType_G5_24XLarge
    g5.24xlarge
    InstanceType_G5_2XLarge
    g5.2xlarge
    InstanceType_G5_48XLarge
    g5.48xlarge
    InstanceType_G5_4XLarge
    g5.4xlarge
    InstanceType_G5_8XLarge
    g5.8xlarge
    InstanceType_G5_XLarge
    g5.xlarge
    InstanceType_G5g_16XLarge
    g5g.16xlarge
    InstanceType_G5g_2XLarge
    g5g.2xlarge
    InstanceType_G5g_4XLarge
    g5g.4xlarge
    InstanceType_G5g_8XLarge
    g5g.8xlarge
    InstanceType_G5g_Metal
    g5g.metal
    InstanceType_G5g_XLarge
    g5g.xlarge
    InstanceType_G6_12XLarge
    g6.12xlarge
    InstanceType_G6_16XLarge
    g6.16xlarge
    InstanceType_G6_24XLarge
    g6.24xlarge
    InstanceType_G6_2XLarge
    g6.2xlarge
    InstanceType_G6_48XLarge
    g6.48xlarge
    InstanceType_G6_4XLarge
    g6.4xlarge
    InstanceType_G6_8XLarge
    g6.8xlarge
    InstanceType_G6_XLarge
    g6.xlarge
    InstanceType_Gr6_4XLarge
    gr6.4xlarge
    InstanceType_Gr6_8XLarge
    gr6.8xlarge
    InstanceType_H1_16XLarge
    h1.16xlarge
    InstanceType_H1_2XLarge
    h1.2xlarge
    InstanceType_H1_4XLarge
    h1.4xlarge
    InstanceType_H1_8XLarge
    h1.8xlarge
    InstanceType_I2_2XLarge
    i2.2xlarge
    InstanceType_I2_4XLarge
    i2.4xlarge
    InstanceType_I2_8XLarge
    i2.8xlarge
    InstanceType_I2_XLarge
    i2.xlarge
    InstanceType_I3_16XLarge
    i3.16xlarge
    InstanceType_I3_2XLarge
    i3.2xlarge
    InstanceType_I3_4XLarge
    i3.4xlarge
    InstanceType_I3_8XLarge
    i3.8xlarge
    InstanceType_I3_Large
    i3.large
    InstanceType_I3_Metal
    i3.metal
    InstanceType_I3_XLarge
    i3.xlarge
    InstanceType_I3en_12XLarge
    i3en.12xlarge
    InstanceType_I3en_24XLarge
    i3en.24xlarge
    InstanceType_I3en_2XLarge
    i3en.2xlarge
    InstanceType_I3en_3XLarge
    i3en.3xlarge
    InstanceType_I3en_6XLarge
    i3en.6xlarge
    InstanceType_I3en_Large
    i3en.large
    InstanceType_I3en_Metal
    i3en.metal
    InstanceType_I3en_XLarge
    i3en.xlarge
    InstanceType_I4g_16XLarge
    i4g.16xlarge
    InstanceType_I4g_2XLarge
    i4g.2xlarge
    InstanceType_I4g_4XLarge
    i4g.4xlarge
    InstanceType_I4g_8XLarge
    i4g.8xlarge
    InstanceType_I4g_Large
    i4g.large
    InstanceType_I4g_XLarge
    i4g.xlarge
    InstanceType_I4i_12XLarge
    i4i.12xlarge
    InstanceType_I4i_16XLarge
    i4i.16xlarge
    InstanceType_I4i_24XLarge
    i4i.24xlarge
    InstanceType_I4i_2XLarge
    i4i.2xlarge
    InstanceType_I4i_32XLarge
    i4i.32xlarge
    InstanceType_I4i_4XLarge
    i4i.4xlarge
    InstanceType_I4i_8XLarge
    i4i.8xlarge
    InstanceType_I4i_Large
    i4i.large
    InstanceType_I4i_Metal
    i4i.metal
    InstanceType_I4i_XLarge
    i4i.xlarge
    InstanceType_Im4gn_16XLarge
    im4gn.16xlarge
    InstanceType_Im4gn_2XLarge
    im4gn.2xlarge
    InstanceType_Im4gn_4XLarge
    im4gn.4xlarge
    InstanceType_Im4gn_8XLarge
    im4gn.8xlarge
    InstanceType_Im4gn_Large
    im4gn.large
    InstanceType_Im4gn_XLarge
    im4gn.xlarge
    InstanceType_Inf1_24XLarge
    inf1.24xlarge
    InstanceType_Inf1_2XLarge
    inf1.2xlarge
    InstanceType_Inf1_6XLarge
    inf1.6xlarge
    InstanceType_Inf1_XLarge
    inf1.xlarge
    InstanceType_Inf2_24XLarge
    inf2.24xlarge
    InstanceType_Inf2_48XLarge
    inf2.48xlarge
    InstanceType_Inf2_8XLarge
    inf2.8xlarge
    InstanceType_Inf2_XLarge
    inf2.xlarge
    InstanceType_Is4gen_2XLarge
    is4gen.2xlarge
    InstanceType_Is4gen_4XLarge
    is4gen.4xlarge
    InstanceType_Is4gen_8XLarge
    is4gen.8xlarge
    InstanceType_Is4gen_Large
    is4gen.large
    InstanceType_Is4gen_Medium
    is4gen.medium
    InstanceType_Is4gen_XLarge
    is4gen.xlarge
    InstanceType_M1_Large
    m1.large
    InstanceType_M1_Medium
    m1.medium
    InstanceType_M1_Small
    m1.small
    InstanceType_M1_XLarge
    m1.xlarge
    InstanceType_M2_2XLarge
    m2.2xlarge
    InstanceType_M2_4XLarge
    m2.4xlarge
    InstanceType_M2_XLarge
    m2.xlarge
    InstanceType_M3_2XLarge
    m3.2xlarge
    InstanceType_M3_Large
    m3.large
    InstanceType_M3_Medium
    m3.medium
    InstanceType_M3_XLarge
    m3.xlarge
    InstanceType_M4_10XLarge
    m4.10xlarge
    InstanceType_M4_16XLarge
    m4.16xlarge
    InstanceType_M4_2XLarge