Skip to content

Resource: awsEc2SubnetCidrReservation

Provides a subnet CIDR reservation resource.

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.ec2SubnetCidrReservation.Ec2SubnetCidrReservation(this, "example", {
  cidrBlock: "10.0.0.16/28",
  reservationType: "prefix",
  subnetId: "${aws_subnet.example.id}",
});

Argument Reference

The following arguments are supported:

  • cidrBlock - (Required) The CIDR block for the reservation.
  • reservationType - (Required) The type of reservation to create. Valid values: explicit, prefix
  • subnetId - (Required) The ID of the subnet to create the reservation for.
  • description - (Optional) A brief description of the reservation.

Attributes Reference

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

  • id - ID of the CIDR reservation.
  • ownerId - ID of the AWS account that owns this CIDR reservation.

Import

Existing CIDR reservations can be imported using SUBNET_ID:RESERVATION_ID, e.g.,

$ terraform import aws_ec2_subnet_cidr_reservation.example subnet-01llsxvsxabqiymcz:scr-4mnvz6wb7otksjcs9