1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. ec2
  6. SubnetCidrBlock

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.86.0
published on Wednesday, Nov 18, 2026 by Pulumi
aws-native logo aws-native logo AWS Cloud Control

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.86.0
published on Wednesday, Nov 18, 2026 by Pulumi

    The AWS::EC2::SubnetCidrBlock resource creates association between subnet and IPv6 CIDR

    Create SubnetCidrBlock Resource

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

    Constructor syntax

    new SubnetCidrBlock(name: string, args: SubnetCidrBlockArgs, opts?: CustomResourceOptions);
    @overload
    def SubnetCidrBlock(resource_name: str,
                        args: SubnetCidrBlockArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def SubnetCidrBlock(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        subnet_id: Optional[str] = None,
                        ipv6_cidr_block: Optional[str] = None,
                        ipv6_ipam_pool_id: Optional[str] = None,
                        ipv6_netmask_length: Optional[int] = None)
    func NewSubnetCidrBlock(ctx *Context, name string, args SubnetCidrBlockArgs, opts ...ResourceOption) (*SubnetCidrBlock, error)
    public SubnetCidrBlock(string name, SubnetCidrBlockArgs args, CustomResourceOptions? opts = null)
    public SubnetCidrBlock(String name, SubnetCidrBlockArgs args)
    public SubnetCidrBlock(String name, SubnetCidrBlockArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:SubnetCidrBlock
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws-native_ec2_subnet_cidr_block" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SubnetCidrBlockArgs
    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 SubnetCidrBlockArgs
    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 SubnetCidrBlockArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubnetCidrBlockArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubnetCidrBlockArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SubnetCidrBlock Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SubnetCidrBlock resource accepts the following input properties:

    SubnetId string
    The ID of the subnet
    Ipv6CidrBlock string
    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
    Ipv6IpamPoolId string
    The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
    Ipv6NetmaskLength int
    The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool
    SubnetId string
    The ID of the subnet
    Ipv6CidrBlock string
    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
    Ipv6IpamPoolId string
    The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
    Ipv6NetmaskLength int
    The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool
    subnet_id string
    The ID of the subnet
    ipv6_cidr_block string
    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
    ipv6_ipam_pool_id string
    The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
    ipv6_netmask_length number
    The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool
    subnetId String
    The ID of the subnet
    ipv6CidrBlock String
    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
    ipv6IpamPoolId String
    The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
    ipv6NetmaskLength Integer
    The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool
    subnetId string
    The ID of the subnet
    ipv6CidrBlock string
    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
    ipv6IpamPoolId string
    The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
    ipv6NetmaskLength number
    The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool
    subnet_id str
    The ID of the subnet
    ipv6_cidr_block str
    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
    ipv6_ipam_pool_id str
    The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
    ipv6_netmask_length int
    The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool
    subnetId String
    The ID of the subnet
    ipv6CidrBlock String
    The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
    ipv6IpamPoolId String
    The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
    ipv6NetmaskLength Number
    The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool

    Outputs

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

    AwsId string
    Information about the IPv6 association.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpSource string
    The IP Source of an IPv6 Subnet CIDR Block.
    Ipv6AddressAttribute string
    The value denoting whether an IPv6 Subnet CIDR Block is public or private.
    AwsId string
    Information about the IPv6 association.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpSource string
    The IP Source of an IPv6 Subnet CIDR Block.
    Ipv6AddressAttribute string
    The value denoting whether an IPv6 Subnet CIDR Block is public or private.
    aws_id string
    Information about the IPv6 association.
    id string
    The provider-assigned unique ID for this managed resource.
    ip_source string
    The IP Source of an IPv6 Subnet CIDR Block.
    ipv6_address_attribute string
    The value denoting whether an IPv6 Subnet CIDR Block is public or private.
    awsId String
    Information about the IPv6 association.
    id String
    The provider-assigned unique ID for this managed resource.
    ipSource String
    The IP Source of an IPv6 Subnet CIDR Block.
    ipv6AddressAttribute String
    The value denoting whether an IPv6 Subnet CIDR Block is public or private.
    awsId string
    Information about the IPv6 association.
    id string
    The provider-assigned unique ID for this managed resource.
    ipSource string
    The IP Source of an IPv6 Subnet CIDR Block.
    ipv6AddressAttribute string
    The value denoting whether an IPv6 Subnet CIDR Block is public or private.
    aws_id str
    Information about the IPv6 association.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_source str
    The IP Source of an IPv6 Subnet CIDR Block.
    ipv6_address_attribute str
    The value denoting whether an IPv6 Subnet CIDR Block is public or private.
    awsId String
    Information about the IPv6 association.
    id String
    The provider-assigned unique ID for this managed resource.
    ipSource String
    The IP Source of an IPv6 Subnet CIDR Block.
    ipv6AddressAttribute String
    The value denoting whether an IPv6 Subnet CIDR Block is public or private.

    Look up Existing SubnetCidrBlock Resource

    Get an existing SubnetCidrBlock 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>, opts?: CustomResourceOptions): SubnetCidrBlock
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> SubnetCidrBlock
    func GetSubnetCidrBlock(ctx *Context, name string, id IDInput, state *SubnetCidrBlockState, opts ...ResourceOption) (*SubnetCidrBlock, error)
    public static SubnetCidrBlock Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static SubnetCidrBlock get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingSubnetCidrBlock:    type: aws-native:ec2:SubnetCidrBlock    get:      id: ${id}
    import {
      to = aws-native_ec2_subnet_cidr_block.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state SubnetCidrBlockState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo AWS Cloud Control

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.86.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial