Data Source: aws_ec2_host

Use this data source to get information about an EC2 Dedicated Host.

Example Usage

resource "aws_ec2_host" "test" {
  instance_type     = "c5.18xlarge"
  availability_zone = "us-west-2a"
}

data "aws_ec2_host" "test" {
  host_id = aws_ec2_host.test.id
}

Filter Example

data "aws_ec2_host" "test" {
  filter {
    name   = "instance-type"
    values = ["c5.18xlarge"]
  }
}

Argument Reference

The arguments of this data source act as filters for querying the available EC2 Hosts in the current region. The given filters must match exactly one host whose data will be exported as attributes.

filter

This block allows for complex filters. You can use one or more filter blocks.

The following arguments are required:

Attribute Reference

This data source exports the following attributes in addition to the arguments above:

Timeouts

Configuration options: