Skip to main content

vpc_cidr_blocks

Used to retrieve a list of vpc_cidr_blocks in a region or to create or delete a vpc_cidr_blocks resource, use vpc_cidr_block to read or update an individual resource.

Overview

Namevpc_cidr_blocks
TypeResource
DescriptionResource Type definition for AWS::EC2::VPCCidrBlock
Idaws.ec2.vpc_cidr_blocks

Fields

NameDatatypeDescription
idstringThe Id of the VPC associated CIDR Block.
vpc_idstringThe ID of the VPC.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTVpcId, region
delete_resourceDELETEdata__Identifier, region
list_resourceSELECTregion

SELECT Example

SELECT
region,
id,
vpc_id
FROM aws.ec2.vpc_cidr_blocks
WHERE region = 'us-east-1';

INSERT Example

Use the following StackQL query and manifest file to create a new vpc_cidr_block resource, using stack-deploy.

/*+ create */
INSERT INTO aws.ec2.vpc_cidr_blocks (
VpcId,
region
)
SELECT
'{{ VpcId }}',
'{{ region }}';

DELETE Example

/*+ delete */
DELETE FROM aws.ec2.vpc_cidr_blocks
WHERE data__Identifier = '<Id|VpcId>'
AND region = 'us-east-1';

Permissions

To operate on the vpc_cidr_blocks resource, the following permissions are required:

Create

ec2:AssociateVpcCidrBlock,
ec2:DescribeVpcs,
ec2:AllocateIpamPoolCidr

Delete

ec2:DescribeVpcs,
ec2:DisassociateVpcCidrBlock

List

ec2:DescribeVpcs