-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from antoninrykalsky/feat/73-metal-vrt
feat: metal vrf
- Loading branch information
Showing
8 changed files
with
692 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# metal_vrf | ||
|
||
Create a VRF in a metro, with IP ranges that you want the VRF to route and forward. | ||
|
||
|
||
- [Examples](#examples) | ||
- [Parameters](#parameters) | ||
- [Return Values](#return-values) | ||
|
||
## Examples | ||
|
||
```yaml | ||
- name: Create new Equinix Metal VRF | ||
hosts: localhost | ||
tasks: | ||
- equinix.cloud.metal_vrf: | ||
name: "example-vrf" | ||
description: "VRF with ASN 65000 and a pool of address space that includes 192.168.100.0/25" | ||
metro: "da" | ||
local_asn: 65000 | ||
ip_ranges: | ||
- "192.168.100.0/25" | ||
- "192.168.200.0/25" | ||
project_id: "your_project_id_here" | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
|-----------|------|----------|------------------------------------------------------------------------------| | ||
| `id` | <center>`str`</center> | <center>Optional</center> | UUID of the VRF. | | ||
| `description` | <center>`str`</center> | <center>Optional</center> | Description of the VRF. | | ||
| `name` | <center>`str`</center> | <center>Optional</center> | User-supplied name of the VRF, unique to the project. | | ||
| `metro` | <center>`str`</center> | <center>Optional</center> | Metro ID or Code where the VRF will be deployed. | | ||
| `local_asn` | <center>`int`</center> | <center>Optional</center> | The 4-byte ASN set on the VRF. **(Updatable)** | | ||
| `ip_ranges` | <center>`list`</center> | <center>Optional</center> | All IPv4 and IPv6 Ranges that will be available to BGP Peers. IPv4 addresses must be /8 or smaller with a minimum size of /29. IPv6 must be /56 or smaller with a minimum size of /64. Ranges must not overlap other ranges within the VRF. **(Updatable)** | | ||
| `project_id` | <center>`str`</center> | <center>Optional</center> | Project ID where the VRF will be deployed. | | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Return Values | ||
|
||
- `metal_vrf` - The module object | ||
|
||
- Sample Response: | ||
```json | ||
|
||
{ | ||
"changed": false, | ||
"description": "Test VRF with ASN 65000", | ||
"id": "f4a7863c-fcbf-419c-802c-3c6d3ad9529e", | ||
"ip_ranges": [ | ||
"192.168.100.0/25", | ||
"192.168.200.0/25" | ||
], | ||
"local_asn": 65000, | ||
"metro": { | ||
"href": "/metal/v1/locations/metros/108b2cfb-246b-45e3-885a-bf3e82fce1a0", | ||
"id": "108b2cfb-246b-45e3-885a-bf3e82fce1a0" | ||
}, | ||
"name": "ansible-integration-test-vrf-6yww6pyz", | ||
"project_id": "9934e474-04a1-46a3-842b-5f3dc0ed0eba" | ||
} | ||
|
||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# metal_vrf_info | ||
|
||
Gather information about Equinix VRFs | ||
|
||
|
||
- [Examples](#examples) | ||
- [Parameters](#parameters) | ||
- [Return Values](#return-values) | ||
|
||
## Examples | ||
|
||
```yaml | ||
- name: Gather information about VRFs in a project | ||
hosts: localhost | ||
tasks: | ||
- equinix.cloud.metal_vrf_info: | ||
project_id: 2a5122b9-c323-4d5c-b53c-9ad3f54273e7 | ||
|
||
``` | ||
|
||
```yaml | ||
- name: Retrieve information about resources within a specific VRF | ||
hosts: localhost | ||
tasks: | ||
- equinix.cloud.metal_vrf_info: | ||
project_id: 2a5122b9-c323-4d5c-b53c-9ad3f54273e7 | ||
vrf_id: f421024d-c1e6-4886-a64d-5b2515696200 | ||
|
||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
|-----------|------|----------|------------------------------------------------------------------------------| | ||
| `project_id` | <center>`str`</center> | <center>**Required**</center> | Project ID where to look up VRFs. | | ||
| `vrf_id` | <center>`str`</center> | <center>Optional</center> | ID of the VRF resource | | ||
|
||
|
||
|
||
|
||
|
||
|
||
## Return Values | ||
|
||
- `resources` - Found resources | ||
|
||
- Sample Response: | ||
```json | ||
|
||
|
||
[ | ||
{ | ||
"description": "Test VRF with ASN 65000", | ||
"id": "8b24de5b-c70e-4a4e-9dd2-064ceb09c587", | ||
"ip_ranges": [ | ||
"192.168.100.0/25", | ||
"192.168.200.0/25" | ||
], | ||
"local_asn": 65000, | ||
"metro": { | ||
"href": "/metal/v1/locations/metros/108b2cfb-246b-45e3-885a-bf3e82fce1a0", | ||
"id": "108b2cfb-246b-45e3-885a-bf3e82fce1a0" | ||
}, | ||
"name": "ansible-integration-test-vrf-nw6dgvh5", | ||
"project_id": "06aea391-fd87-4cc7-9f4b-76f9e38fd4a4" | ||
} | ||
] | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.