awscc_ec2_ipam_allocation (Resource)

Resource Schema of AWS::EC2::IPAMAllocation Type

Example Usage

Specify cidr

data "aws_region" "current" {}

resource "awscc_ec2_ipam" "example" {
  operating_regions = [
    {
      region_name = data.aws_region.current.name
    }
  ]
}

resource "awscc_ec2_ipam_pool" "example" {
  address_family = "ipv4"
  ipam_scope_id  = awscc_ec2_ipam.example.private_default_scope_id
  locale         = data.aws_region.current.name

  provisioned_cidrs = [
    {
      cidr = "10.0.0.0/16"
    }
  ]
}

resource "awscc_ec2_ipam_allocation" "example" {
  ipam_pool_id = awscc_ec2_ipam_pool.example.id
  description  = "reserved using cidr"

  cidr = "10.0.0.0/32"
}

Specify netmask length

data "aws_region" "current" {}

resource "awscc_ec2_ipam" "example" {
  operating_regions = [
    {
      region_name = data.aws_region.current.name
    }
  ]
}

resource "awscc_ec2_ipam_pool" "example" {
  address_family = "ipv4"
  ipam_scope_id  = awscc_ec2_ipam.example.private_default_scope_id
  locale         = data.aws_region.current.name

  provisioned_cidrs = [
    {
      cidr = "10.0.0.0/16"
    }
  ]
}

resource "awscc_ec2_ipam_allocation" "example" {
  ipam_pool_id = awscc_ec2_ipam_pool.example.id
  description  = "reserved using netmask length"

  netmask_length = 32
}

Schema

Required

Optional

Read-Only

Import

Import is supported using the following syntax:

$ terraform import awscc_ec2_ipam_allocation.example <resource ID>