From 0da5a6f8734b9e0ecac58d2e1ea98a7d331ba688 Mon Sep 17 00:00:00 2001 From: Dorota Wojcik Date: Fri, 6 Dec 2024 17:33:02 +0100 Subject: [PATCH] manage org vpc via cli --- docs/platform/howto/manage-org-vpc-peering.md | 112 +++++++++++++ .../platform/howto/manage-organization-vpc.md | 149 ++++++++++++------ sidebars.ts | 1 + 3 files changed, 217 insertions(+), 45 deletions(-) create mode 100644 docs/platform/howto/manage-org-vpc-peering.md diff --git a/docs/platform/howto/manage-org-vpc-peering.md b/docs/platform/howto/manage-org-vpc-peering.md new file mode 100644 index 00000000..cc490949 --- /dev/null +++ b/docs/platform/howto/manage-org-vpc-peering.md @@ -0,0 +1,112 @@ +--- +title: Manage organization VPC peering in Aiven +sidebar_label: Manage organization VPC peering +--- + +import ConsoleLabel from "@site/src/components/ConsoleIcons"; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + +## Prerequisites + +## Create a peering connection + +## Delete a peering connection + +## Related pages + +- [VPCs in Aiven](/docs/platform/concepts/vpcs) +- [VPC peering in Aiven](/docs/platform/concepts/vpc-peering) +- [Manage organization VPCs](/docs/platform/howto/manage-organization-vpc) diff --git a/docs/platform/howto/manage-organization-vpc.md b/docs/platform/howto/manage-organization-vpc.md index 4350fcd8..9204fc2b 100644 --- a/docs/platform/howto/manage-organization-vpc.md +++ b/docs/platform/howto/manage-organization-vpc.md @@ -43,15 +43,35 @@ Your new organization VPC is ready to use as soon as its status visible on the +Run the `avn organization vpc create` command: + +```bash +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 example + `aws-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` + - - - +```bash +avn service update SERVICE_NAME \ + --project-vpc-id ORGANIZATION_VPC_ID +``` + +Replace the following: + +- `SERVICE_NAME` with the name of the service to be migrated, for example, + `pg-test` +- `ORGANIZATION_VPC_ID` with the ID of your organization VPC where to migrate the service, + for example, `12345678-1a2b-3c4d-5f6g-1a2b3c4d5e6f` + + + + + + ## Delete an organization VPC @@ -125,32 +189,27 @@ Delete an organization VPC using a tool of your choice: - - +Run the `avn organization vpc delete` command: - - +```bash +avn organization vpc delete \ + --organization-id ORGANIZATION_ID \ + --vpc-id VPC_ID +``` - +- [VPC peering](/docs/platform/concepts/vpc-peering) +- [Manage organization VPC peering connections](/docs/platform/howto/manage-org-vpc-peering) diff --git a/sidebars.ts b/sidebars.ts index 5dab5458..05d71fec 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -259,6 +259,7 @@ const sidebars: SidebarsConfig = { 'platform/concepts/vpc-peering', 'platform/howto/manage-project-vpc', 'platform/howto/manage-organization-vpc', + 'platform/howto/manage-org-vpc-peering', 'platform/howto/public-access-in-vpc', 'platform/howto/vpc-peering-gcp', 'platform/howto/vpc-peering-aws',