Skip to content

Data Source: awsEc2InstanceTypeOfferings

Information about EC2 Instance Type Offerings.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsEc2InstanceTypeOfferings.DataAwsEc2InstanceTypeOfferings(
  this,
  "example",
  {
    filter: [
      {
        name: "instance-type",
        values: ["t2.micro", "t3.micro"],
      },
      {
        name: "location",
        values: ["usw2-az4"],
      },
    ],
    locationType: "availability-zone-id",
  }
);

Argument Reference

The following arguments are supported:

  • filter - (Optional) One or more configuration blocks containing name-values filters. See the EC2 API Reference for supported filters. Detailed below.
  • locationType - (Optional) Location type. Defaults to region. Valid values: availabilityZone, availabilityZoneId, and region.

filter Argument Reference

  • name - (Required) Name of the filter. The location filter depends on the top-level locationType argument and if not specified, defaults to the current region.
  • values - (Required) List of one or more values for the filter.

Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • id - AWS Region.
  • instanceTypes - List of EC2 Instance Types.
  • locations - List of locations.
  • locationTypes - List of location types.

Note that the indexes of Instance Type Offering instance types, locations and location types correspond.

Timeouts

Configuration options:

  • read - (Default 20M)