Updating Turbot managed AWS Security Groups (Networks created via Admin/ Networking tab)

Some legacy clusters utilize Turbot networking automation via the Admin panel. Creation of resources is automated and fairly trivial, but how to update created resources proves to be a bit less obvious. This guide will go over updating existing Turbot managed networks using the Turbot API. In this example we will update Bastion CIDR ranges to an existing network.

Updating CIDR ranges of an existing network:

1. Get the network title. This can be found by navigating to the Networking tab:

mceclip0.png

then:

mceclip1.png

2. Find the VPC that you would like to update. Get the NetworkId from this page.

mceclip2.png

3. Build the URI as follows: 

PATCH to https://{turbotURL}/api/v3/networks/networkId

In this example, we will be adding a new bastion CIDR range to this network. The body will look like such:

{
"boundaries": {
"outboundInternetAccess": "- 0.0.0.0/0",
"intranet": "# Standard Private Network CIDRs - https://en.wikipedia.org/wiki/Private_network\n- 10.0.0.0/8\n- 172.16.0.0/12\n- 192.168.0.0/16",
"internet": "- 0.0.0.0/0",
"bastion": "10.145.1.0/28"
}
}

4. A successful PATCH will result in a 200 status code response. Turbot will also return the metadata of the network post patch. 

More information about acceptable PATCH bodies can be found in our API documentation: https://poc.turbot.com/help/api

Specifically, searching for Networks and selecting Update will display the correct syntax and possible options:

mceclip3.png

Clicking on NetworkUpdate will show the schema expected when passing in information. 

To get a list of all Turbot created networks, one can use the following URI:

GET to https://{turbotURL}/api/v3/networks

Reach out to help@turbot.com if there are any questions or concerns.

Was this article helpful?
0 out of 0 found this helpful