Skip to content

Commit bcbfccd

Browse files
(DOCSP-11826)(DOCSP-11850)(DOCSP-11834): atlas networking peering ls|… (#231)
* (DOCSP-11826)(DOCSP-11850)(DOCSP-11834): atlas networking peering ls|delete|create aws * (DOCSP-11826)(DOCSP-11850)(DOCSP-11834): fix example code block indentation
1 parent 271aa11 commit bcbfccd

File tree

5 files changed

+508
-0
lines changed

5 files changed

+508
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
|service| uses the specified |cidr| block for all other Network Peering
2+
connections created in the project. The |service| |cidr| block must be
3+
at least a ``/24`` and at most a ``/21`` in one of the following :rfc:`private networks <1918#section-3>`.
4+
5+
.. list-table::
6+
:header-rows: 1
7+
:widths: 40 40 20
8+
9+
* - Lower Bound
10+
- Upper Bound
11+
- Prefix
12+
13+
* - ``10.0.0.0``
14+
- ``10.255.255.255``
15+
- 10/8
16+
17+
* - ``172.16.0.0``
18+
- ``172.31.255.255``
19+
- 172.16/12
20+
21+
* - ``192.168.0.0``
22+
- ``192.168.255.255``
23+
- 192.168/16
24+
25+
|service| locks this value if an ``M10+`` cluster or a Network Peering
26+
connection already exists. To modify the |cidr| block, ensure there are
27+
no ``M10+`` clusters in the project *and* no other |vpc| peering
28+
connections in the project.
29+
30+
Alternatively, :ref:`create a new project <mcli-iam-project-create>`
31+
and create a Network Peering Connection to set the desired |service|
32+
|vpc| |cidr| block for that project.
33+
34+
.. important::
35+
36+
|service| limits the number of MongoDB nodes per Network Peering
37+
connection based on the |cidr| block and the region selected for the project.
38+
39+
.. example::
40+
41+
A project in an |aws| region supporting 3 availability
42+
zones and a |service| |cidr| |vpc| block of ``/24`` is
43+
limited to the equivalent of 27 three-node replica sets.
44+
45+
Contact :website:`MongoDB Support </contact>` for any questions on
46+
|service| limits of MongoDB nodes per |vpc|.

source/reference/atlas/networking-commands.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Atlas ``networking`` Commands
1111

1212
List Containers </reference/atlas/networking-containers-list>
1313
Delete One Container </reference/atlas/networking-containers-delete>
14+
List All Network Peering Connections </reference/atlas/networking-peering-list>
15+
Create One Network Peering Connection to an AWS VPC </reference/atlas/networking-peering-create-aws>
1416
Create One Network Peering Connection to an Azure VNet </reference/atlas/networking-peering-create-azure>
1517
Create One Network Peering Connection to a Google Cloud Platform VPC </reference/atlas/networking-peering-create-gcp>
18+
Delete One Network Peering Connection </reference/atlas/networking-peering-delete>
1619
Watch One Network Peering Connection </reference/atlas/networking-peering-watch>
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
.. _mcli-atlas-networking-peering-create-aws-cmd:
2+
3+
============================================
4+
mongocli atlas networking peering aws create
5+
============================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
.. include:: /includes/styles/corrections.rst
16+
17+
The ``networking peering create aws`` command creates a peering
18+
connection between the |service| VPC and your AWS VPC for
19+
a given |service| project.
20+
21+
The ``networking peering create aws`` command checks if a VPC exists for
22+
your |service| project. If one exists, the {+mcli+} creates the peering
23+
connection between that VPC and your VPC. If an |service| VPC does not
24+
exist, the {+mcli+} creates one and creates a connection between it and
25+
your VPC.
26+
27+
Syntax
28+
------
29+
30+
.. code-block:: text
31+
32+
mongocli atlas networking peering aws create
33+
--accountId <aws-account-id>
34+
[ --atlasCidrBlock <atlas-cidr-block> ]
35+
--region <atlas-vpc-region>
36+
--routeTableCidrBlock <vpc-cidr-block-or-subnet>
37+
--vpcId <aws-vpc-id>
38+
[ --output|-o <output-format> ]
39+
[ --profile|-P <profile-name> ]
40+
[ --projectId <project-ID> ]
41+
42+
.. include:: /includes/fact-command-line-help.rst
43+
44+
.. _atlas-networking-peering-create-aws-options:
45+
46+
Options
47+
-------
48+
49+
.. list-table::
50+
:widths: 20 10 60 10
51+
:header-rows: 1
52+
53+
* - Option
54+
- Type
55+
- Description
56+
- Required?
57+
58+
* - ``--accountId``
59+
- string
60+
- AWS Account ID of the owner of the peer VPC.
61+
- yes
62+
63+
* - ``--atlasCidrBlock``
64+
- string
65+
- CIDR block that |service| uses for your clusters. Required only
66+
if you do not already have an |service| VPC.
67+
68+
.. include:: /includes/fact-vpc-cidr-block.rst
69+
- no
70+
71+
* - ``--region``
72+
- string
73+
- AWS region in which the peer VPC resides. See the
74+
:atlas:`Atlas documentation </reference/amazon-aws/>` for a list
75+
of supported regions.
76+
- yes
77+
78+
* - ``--routeTableCidrBlock``
79+
- string
80+
- Peer AWS VPC CIDR block or subnet.
81+
- yes
82+
83+
* - ``--vpcId``
84+
- string
85+
- Unique identifier of the peer AWS VPC.
86+
- yes
87+
88+
* - ``--output``, ``-o``
89+
- string
90+
- .. include:: /includes/extracts/fact-basic-options-output.rst
91+
- no
92+
93+
* - ``--profile``, ``-P``
94+
- string
95+
- Name of the profile where the public and private
96+
keys for the project are saved. If omitted, uses the
97+
{+default-profile+}. To learn more about creating a
98+
profile, see :ref:`mcli-configure`.
99+
- no
100+
101+
* - ``--projectId``
102+
- string
103+
- Unique identifier of the project for which you want to add
104+
the interface endpoint. If omitted, uses the
105+
project ID in the profile or :ref:`environment variable
106+
<mcli-env-var>`.
107+
- no
108+
109+
.. _atlas-networking-peering-create-aws-output:
110+
111+
Output
112+
------
113+
114+
If the command succeeds, it returns the following output in the default
115+
format. If the command returns errors, see
116+
:ref:`Troubleshooting <troubleshooting>` for recommended solutions.
117+
118+
.. code-block:: sh
119+
:copyable: false
120+
121+
Network peering connection '<peering-connection-id>' created.
122+
123+
.. include:: /includes/fact-default-output.rst
124+
125+
- :atlas:`Atlas API </reference/api/vpc-create-peering-connection/#request-body-parameters>`
126+
127+
Example
128+
-------
129+
130+
.. tabs::
131+
132+
.. tab:: Default Output
133+
:tabid: default-output
134+
135+
The following command creates a peering connection between the
136+
|service| VPC and your AWS VPC for a project using the
137+
{+default-profile+}, which contains credentials and the project
138+
ID. The output is returned in the default format.
139+
140+
.. code-block:: sh
141+
142+
atlas networking peering create aws --accountId <aws-account-id> \
143+
--atlasCidrBlock 192.168.0.0/24 --region us-east-1 \
144+
--routeTableCidrBlock 10.0.0.0/24 --vpcId vpc-078ac381aa90e1e63
145+
146+
The previous command prints the following to the terminal.
147+
148+
.. code-block:: sh
149+
:copyable: false
150+
151+
Network peering connection '5f60c5bd0948295c093565ba' created.
152+
153+
.. tab:: JSON Output
154+
:tabid: json-output
155+
156+
The following command creates a peering connection between the
157+
|service| VPC and your AWS VPC for a project using the
158+
{+default-profile+}, which contains credentials and the project
159+
ID. The output is returned in |json| format.
160+
161+
.. code-block:: sh
162+
163+
atlas networking peering create aws --accountId <aws-account-id> \
164+
--atlasCidrBlock 192.168.0.0/24 --region us-east-1 \
165+
--routeTableCidrBlock 10.0.0.0/24 --vpcId vpc-078ac381aa90e1e63 \
166+
--output json
167+
168+
The previous command prints the following to the terminal in
169+
|json| format.
170+
171+
.. code-block:: json
172+
:copyable: false
173+
174+
{
175+
"awsAccountId": "<aws-account-id>",
176+
"containerId": "5f4eb2178c9ff67e809a3619",
177+
"id": "5f60c5bd0948295c093565ba",
178+
"routeTableCidrBlock": "10.0.0.0/24",
179+
"statusName": "INITIATING",
180+
"vpcId": "vpc-078ac381aa90e1e63"
181+
}
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
.. _mcli-atlas-networking-peering-delete-cmd:
2+
3+
========================================
4+
mongocli atlas networking peering delete
5+
========================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
.. include:: /includes/styles/corrections.rst
16+
17+
The ``networking peering delete`` command deletes one
18+
network peering connection for a given |service| project.
19+
20+
Syntax
21+
------
22+
23+
.. code-block:: text
24+
25+
mongocli atlas network peering delete <peering-connection-id>
26+
[ --force ]
27+
[ --profile|-P <profile-name> ]
28+
[ --projectId <project-ID> ]
29+
30+
.. include:: /includes/fact-command-line-help.rst
31+
32+
.. _atlas-networking-peering-delete-arguments:
33+
34+
Arguments
35+
---------
36+
37+
.. list-table::
38+
:header-rows: 1
39+
:widths: 20 10 60 10
40+
41+
* - Argument
42+
- Type
43+
- Description
44+
- Required?
45+
46+
* - ``<peering-connection-id>``
47+
- string
48+
- Unique identifier of the network peering connection that you
49+
want to delete.
50+
- yes
51+
52+
.. _atlas-networking-peering-delete-options:
53+
54+
Options
55+
-------
56+
57+
.. list-table::
58+
:widths: 20 10 60 10
59+
:header-rows: 1
60+
61+
* - Option
62+
- Type
63+
- Description
64+
- Required?
65+
66+
* - ``--force``
67+
-
68+
- Flag that indicates that the agent API key can
69+
be deleted without requiring confirmation.
70+
- no
71+
72+
* - ``--profile``, ``-P``
73+
- string
74+
- Name of the profile where the public and private
75+
keys for the project are saved. If omitted, uses the
76+
{+default-profile+}. To learn more about creating a
77+
profile, see :ref:`mcli-configure`.
78+
- no
79+
80+
* - ``--projectId``
81+
- string
82+
- Unique identifier of the project that contains the network
83+
peering connection that you want to delete. If omitted, uses the
84+
project ID in the profile or :ref:`environment variable
85+
<mcli-env-var>`.
86+
- no
87+
88+
.. _atlas-networking-peering-delete-output:
89+
90+
Output
91+
------
92+
93+
If the command succeeds, it returns the following output in the default
94+
format. If the command returns errors, see
95+
:ref:`Troubleshooting <troubleshooting>` for recommended solutions.
96+
97+
.. code-block:: sh
98+
:copyable: false
99+
100+
? Are you sure you want to delete: <peering-connection-id> Yes
101+
Peering connection '<peering-connection-id>' deleted
102+
103+
Example
104+
-------
105+
106+
The following command deletes one network peering connection for a
107+
project using the {+default-profile+}, which contains credentials and
108+
the project ID. The output is returned in the default format.
109+
110+
.. code-block:: sh
111+
112+
mongocli atlas networking peering delete 5f60c5bd0948295c093565ba
113+
114+
The previous command prints the following to the terminal.
115+
116+
.. code-block:: sh
117+
:copyable: false
118+
119+
? Are you sure you want to delete: 5f60c5bd0948295c093565ba Yes
120+
Peering connection '5f4fc14da2b47835a58c63a2' deleted

0 commit comments

Comments
 (0)