Manage organization virtual private clouds (VPCs) in Aiven Limited availability
Set up or delete an organization-wide VPC on the Aiven Platform.
Prerequisites
- Manage organization networking permissions
- One of the following tools for operating organization VPCs:
Create an organization VPC
Create an organization VPC using a tool of your choice:
- Aiven Console
- Aiven CLI
- Aiven API
- Aiven Provider for Terraform
- Log in to the Aiven Console, and click Admin in the top navigation bar.
- Click VPCs in the sidebar and Create VPC on the Virtual private clouds page.
- In the Create VPC window:
-
Select a cloud provider.
-
Select a cloud region.
-
Specify an IP range.
- Use an IP range that does not overlap with any networks to be connected via VPC
peering. For example, if your own networks use the range
11.1.1.0/8
, you can set the range for your Aiven organization's VPC to191.161.1.0/24
. - Use a network prefix that is 20-24 character long.
- Use an IP range that does not overlap with any networks to be connected via VPC
peering. For example, if your own networks use the range
-
Click Create VPC.
-
Your new organization VPC is ready to use as soon as its status visible on the Virtual private clouds page changes to Active.
Run the avn organization vpc create
command:
avn organization vpc create \
--cloud CLOUD_PROVIDER_REGION \
--network-cidr NETWORK_CIDR \
--organization-id ORGANIZATION_ID
Replace the following:
CLOUD_PROVIDER_REGION
with the cloud provider and region to host the VPC, for exampleaws-eu-west-1
NETWORK_CIDR
with the CIDR block (a range of IP addresses) for the VPC, for example,10.0.0.0/24
ORGANIZATION_ID
with the ID of your Aiven organization where to create the VPC, for example,org1a2b3c4d5e6
Make an API call to the OrganizationVpcCreate endpoint:
curl --request POST \
--url https://api.aiven.io/v1/organization/ORGANIZATION_ID/vpcs \
--header 'Authorization: Bearer BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '
{
"cloud_name": "CLOUD_PROVIDER_REGION",
"network_cidr": "NETWORK_CIDR"
}
'
Replace the following placeholders with meaningful data:
ORGANIZATION_ID
BEARER_TOKEN
CLOUD_PROVIDER_REGION
NETWORK_CIDR
Use the aiven_organization_vpc resource.
Delete an organization VPC
Remove all services from your VCP before you delete it. To remove the services from the VCP, either migrate them out of the VCP or delete them. Deleting the VPC terminates its peering connections, if any.
Delete an organization VPC using a tool of your choice:
- Aiven Console
- Aiven CLI
- Aiven API
- Log in to the Aiven Console, and click Admin in the top navigation bar.
- Click VPCs in the sidebar.
- On the Virtual private clouds page, find a VPC to be deleted and click Actions > Delete.
- In the Confirmation window, click Delete VPC.
Run the avn organization vpc delete
command:
avn organization vpc delete \
--organization-id ORGANIZATION_ID \
--organization-vpc-id ORGANIZATION_VPC_ID
Replace the following:
ORGANIZATION_ID
with the ID of your Aiven organization, for example,org1a2b3c4d5e6
ORGANIZATION_VPC_ID
with the ID of your Aiven organization VPC, for example,12345678-1a2b-3c4d-5f6g-1a2b3c4d5e6f
Make an API call to the OrganizationVpcDelete endpoint:
curl --request DELETE \
--url https://api.aiven.io/v1/organization/ORGANIZATION_ID/vpcs/ORGANIZATION_VPC_ID \
--header 'Authorization: Bearer BEARER_TOKEN' \
Replace the following placeholders with meaningful data:
ORGANIZATION_ID
ORGANIZATION_VPC_ID
BEARER_TOKEN
Related pages