Skip to content

Commit

Permalink
Use tables for parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
LBGarber committed May 26, 2022
1 parent 9f5d08f commit 1ab615b
Show file tree
Hide file tree
Showing 19 changed files with 614 additions and 211 deletions.
36 changes: 23 additions & 13 deletions docs/modules/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,33 @@ Manage Linode Domains.
```
## Parameters
| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `domain` | `str` | **Required** | The domain this Domain represents. |
| `state` | `str` | **Required** | The desired state of the target. (Choices: `present` `absent`) |
| `axfr_ips` | `list` | Optional | The list of IPs that may perform a zone transfer for this Domain. |
| `description` | `str` | Optional | The list of IPs that may perform a zone transfer for this Domain. |
| `expire_sec` | `int` | Optional | The amount of time in seconds that may pass before this Domain is no longer authoritative. |
| `master_ips` | `list` | Optional | The IP addresses representing the master DNS for this Domain. |
| `refresh_sec` | `int` | Optional | The amount of time in seconds before this Domain should be refreshed. |
| `retry_sec` | `int` | Optional | The interval, in seconds, at which a failed refresh should be retried. |
| `soa_email` | `str` | Optional | The Start of Authority email address. |
| `status` | `str` | Optional | Used to control whether this Domain is currently being rendered. |
| `tags` | `list` | Optional | An array of tags applied to this object. |
| `ttl_sec` | `int` | Optional | the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. |
| `type` | `str` | Optional | Whether this Domain represents the authoritative source of information for the domain it describes (master), or whether it is a read-only copy of a master (slave). |



- `domain` (`str`) - **(Required)** The domain this Domain represents.
- `state` (`str`) - **(Required)** The desired state of the target. (Choices: `present` `absent`)
- `axfr_ips` (`list`) - The list of IPs that may perform a zone transfer for this Domain.
- `description` (`str`) - The list of IPs that may perform a zone transfer for this Domain.
- `expire_sec` (`int`) - The amount of time in seconds that may pass before this Domain is no longer authoritative.
- `master_ips` (`list`) - The IP addresses representing the master DNS for this Domain.
- `refresh_sec` (`int`) - The amount of time in seconds before this Domain should be refreshed.
- `retry_sec` (`int`) - The interval, in seconds, at which a failed refresh should be retried.
- `soa_email` (`str`) - The Start of Authority email address.
- `status` (`str`) - Used to control whether this Domain is currently being rendered.
- `tags` (`list`) - An array of tags applied to this object.
- `ttl_sec` (`int`) - the amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers.
- `type` (`str`) - Whether this Domain represents the authoritative source of information for the domain it describes (master), or whether it is a read-only copy of a master (slave).


## Return Values
Expand Down
14 changes: 12 additions & 2 deletions docs/modules/domain_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@ Get info about a Linode Domain.
```
## Parameters
| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `id` | `int` | Optional | The unique domain name of the Domain. Optional if `domain` is defined. |
| `domain` | `str` | Optional | The unique id of the Domain. Optional if `id` is defined. |



- `id` (`int`) - The unique domain name of the Domain. Optional if `domain` is defined.
- `domain` (`str`) - The unique id of the Domain. Optional if `id` is defined.


## Return Values
Expand Down
38 changes: 24 additions & 14 deletions docs/modules/domain_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,34 @@ NOTE: Domain records are identified by their name, target, and type.
```
## Parameters
| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `state` | `str` | **Required** | The desired state of the target. (Choices: `present` `absent`) |
| `domain_id` | `int` | Optional | The ID of the parent Domain. |
| `domain` | `str` | Optional | The name of the parent Domain. |
| `record_id` | `int` | Optional | The id of the record to modify. |
| `name` | `str` | Optional | The name of this Record. |
| `port` | `int` | Optional | The port this Record points to. Only valid and required for SRV record requests. |
| `priority` | `int` | Optional | The priority of the target host for this Record. Lower values are preferred. Only valid for MX and SRV record requests. Required for SRV record requests. |
| `protocol` | `str` | Optional | The protocol this Record’s service communicates with. An underscore (_) is prepended automatically to the submitted value for this property. |
| `service` | `str` | Optional | An underscore (_) is prepended and a period (.) is appended automatically to the submitted value for this property. Only valid and required for SRV record requests. The name of the service. |
| `tag` | `str` | Optional | The tag portion of a CAA record. Only valid and required for CAA record requests. |
| `target` | `str` | Optional | The target for this Record. |
| `ttl_sec` | `int` | Optional | The amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers. |
| `type` | `str` | Optional | The type of Record this is in the DNS system. |
| `weight` | `int` | Optional | The relative weight of this Record used in the case of identical priority. |



- `state` (`str`) - **(Required)** The desired state of the target. (Choices: `present` `absent`)
- `domain_id` (`int`) - The ID of the parent Domain.
- `domain` (`str`) - The name of the parent Domain.
- `record_id` (`int`) - The id of the record to modify.
- `name` (`str`) - The name of this Record.
- `port` (`int`) - The port this Record points to. Only valid and required for SRV record requests.
- `priority` (`int`) - The priority of the target host for this Record. Lower values are preferred. Only valid for MX and SRV record requests. Required for SRV record requests.
- `protocol` (`str`) - The protocol this Record’s service communicates with. An underscore (_) is prepended automatically to the submitted value for this property.
- `service` (`str`) - An underscore (_) is prepended and a period (.) is appended automatically to the submitted value for this property. Only valid and required for SRV record requests. The name of the service.
- `tag` (`str`) - The tag portion of a CAA record. Only valid and required for CAA record requests.
- `target` (`str`) - The target for this Record.
- `ttl_sec` (`int`) - The amount of time in seconds that this Domain’s records may be cached by resolvers or other domain servers.
- `type` (`str`) - The type of Record this is in the DNS system.
- `weight` (`int`) - The relative weight of this Record used in the case of identical priority.


## Return Values
Expand Down
18 changes: 14 additions & 4 deletions docs/modules/domain_record_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,24 @@ Get info about a Linode Domain Records.
```
## Parameters
| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `domain_id` | `int` | Optional | The ID of the parent Domain. Optional if `domain` is defined. |
| `domain` | `str` | Optional | The name of the parent Domain. Optional if `domain_id` is defined. |
| `id` | `int` | Optional | The unique id of the subdomain. Optional if `name` is defined. |
| `name` | `str` | Optional | The name of the domain record. Optional if `id` is defined. |



- `domain_id` (`int`) - The ID of the parent Domain. Optional if `domain` is defined.
- `domain` (`str`) - The name of the parent Domain. Optional if `domain_id` is defined.
- `id` (`int`) - The unique id of the subdomain. Optional if `name` is defined.
- `name` (`str`) - The name of the domain record. Optional if `id` is defined.


## Return Values
Expand Down
107 changes: 80 additions & 27 deletions docs/modules/firewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,37 +53,90 @@ Manage Linode Firewalls.
```
## Parameters
| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `state` | `str` | **Required** | The desired state of the target. (Choices: `present` `absent`) |
| `label` | `str` | Optional | The unique label to give this Firewall. |
| [`devices` (sub-options)](#devices) | `list` | Optional | The devices that are attached to this Firewall. |
| [`rules` (sub-options)](#rules) | `dict` | Optional | The inbound and outbound access rules to apply to this Firewall. |
| `status` | `str` | Optional | The status of this Firewall. |





### devices

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `id` | `int` | **Required** | The unique ID of the device to attach to this Firewall. |
| `type` | `str` | Optional | The type of device to be attached to this Firewall. ( Default: `linode`) |





### rules

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| [`inbound` (sub-options)](#inbound) | `list` | Optional | A list of rules for inbound traffic. |
| `inbound_policy` | `str` | Optional | The default behavior for inbound traffic. |
| [`outbound` (sub-options)](#outbound) | `list` | Optional | A list of rules for outbound traffic. |
| `outbound_policy` | `str` | Optional | The default behavior for outbound traffic. |





### inbound

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `label` | `str` | **Required** | The label of this rule. |
| `action` | `str` | **Required** | Controls whether traffic is accepted or dropped by this rule. |
| [`addresses` (sub-options)](#addresses) | `dict` | Optional | Allowed IPv4 or IPv6 addresses. |
| `description` | `str` | Optional | A description for this rule. |
| `ports` | `str` | Optional | A string representing the port or ports on which traffic will be allowed. See U(https://www.linode.com/docs/api/networking/#firewall-create) |
| `protocol` | `str` | Optional | The type of network traffic to allow. |





### addresses

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `ipv4` | `list` | Optional | A list of IPv4 addresses or networks. Must be in IP/mask format. |
| `ipv6` | `list` | Optional | A list of IPv4 addresses or networks. Must be in IP/mask format. |





### outbound

| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `label` | `str` | **Required** | The label of this rule. |
| `action` | `str` | **Required** | Controls whether traffic is accepted or dropped by this rule. |
| [`addresses` (sub-options)](#addresses) | `dict` | Optional | Allowed IPv4 or IPv6 addresses. |
| `description` | `str` | Optional | A description for this rule. |
| `ports` | `str` | Optional | A string representing the port or ports on which traffic will be allowed. See U(https://www.linode.com/docs/api/networking/#firewall-create) |
| `protocol` | `str` | Optional | The type of network traffic to allow. |



- `state` (`str`) - **(Required)** The desired state of the target. (Choices: `present` `absent`)
- `label` (`str`) - The unique label to give this Firewall.
- `devices` (`list`) - The devices that are attached to this Firewall.
- `id` (`int`) - **(Required)** The unique ID of the device to attach to this Firewall.
- `type` (`str`) - The type of device to be attached to this Firewall. ( Default: `linode`)
- `rules` (`dict`) - The inbound and outbound access rules to apply to this Firewall.
- `inbound` (`list`) - A list of rules for inbound traffic.
- `label` (`str`) - **(Required)** The label of this rule.
- `action` (`str`) - **(Required)** Controls whether traffic is accepted or dropped by this rule.
- `addresses` (`dict`) - Allowed IPv4 or IPv6 addresses.
- `ipv4` (`list`) - A list of IPv4 addresses or networks. Must be in IP/mask format.
- `ipv6` (`list`) - A list of IPv4 addresses or networks. Must be in IP/mask format.
- `description` (`str`) - A description for this rule.
- `ports` (`str`) - A string representing the port or ports on which traffic will be allowed. See U(https://www.linode.com/docs/api/networking/#firewall-create)
- `protocol` (`str`) - The type of network traffic to allow.
- `inbound_policy` (`str`) - The default behavior for inbound traffic.
- `outbound` (`list`) - A list of rules for outbound traffic.
- `label` (`str`) - **(Required)** The label of this rule.
- `action` (`str`) - **(Required)** Controls whether traffic is accepted or dropped by this rule.
- `addresses` (`dict`) - Allowed IPv4 or IPv6 addresses.
- `ipv4` (`list`) - A list of IPv4 addresses or networks. Must be in IP/mask format.
- `ipv6` (`list`) - A list of IPv4 addresses or networks. Must be in IP/mask format.
- `description` (`str`) - A description for this rule.
- `ports` (`str`) - A string representing the port or ports on which traffic will be allowed. See U(https://www.linode.com/docs/api/networking/#firewall-create)
- `protocol` (`str`) - The type of network traffic to allow.
- `outbound_policy` (`str`) - The default behavior for outbound traffic.
- `status` (`str`) - The status of this Firewall.


## Return Values
Expand Down
43 changes: 38 additions & 5 deletions docs/modules/firewall_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,51 @@ Manage Linode Firewall Devices.

## Examples

```yaml["\n- name: Create a Firewall\n linode.cloud.firewall:\n label: my-firewall\n rules:\n inbound_policy: DROP\n state: present\n register: firewall_result\n\n- name: Create an Instance\n linode.cloud.instance:\n label: my-instance\n region: us-east\n private_ip: true\n type: g6-standard-1\n state: present\n register: instance_result\n\n- name: Attach the instance to the Firewall\n linode.cloud.firewall_device:\n firewall_id: '{{ firewall_result.firewall.id }}'\n entity_id: '{{ instance_result.instance.id }}'\n entity_type: 'linode'\n state: present"]
```yaml
- name: Create a Firewall
linode.cloud.firewall:
label: my-firewall
rules:
inbound_policy: DROP
state: present
register: firewall_result

- name: Create an Instance
linode.cloud.instance:
label: my-instance
region: us-east
private_ip: true
type: g6-standard-1
state: present
register: instance_result

- name: Attach the instance to the Firewall
linode.cloud.firewall_device:
firewall_id: '{{ firewall_result.firewall.id }}'
entity_id: '{{ instance_result.instance.id }}'
entity_type: 'linode'
state: present
```
## Parameters
| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `firewall_id` | `int` | **Required** | The ID of the Firewall that contains this device. |
| `entity_id` | `int` | **Required** | The ID for this Firewall Device. This will be the ID of the Linode Entity. |
| `entity_type` | `str` | **Required** | The type of Linode Entity. Currently only supports linode. (Choices: `linode`) |
| `state` | `str` | **Required** | The desired state of the target. (Choices: `present` `absent`) |



- `firewall_id` (`int`) - **(Required)** The ID of the Firewall that contains this device.
- `entity_id` (`int`) - **(Required)** The ID for this Firewall Device. This will be the ID of the Linode Entity.
- `entity_type` (`str`) - **(Required)** The type of Linode Entity. Currently only supports linode. (Choices: `linode`)
- `state` (`str`) - **(Required)** The desired state of the target. (Choices: `present` `absent`)


## Return Values
Expand Down
14 changes: 12 additions & 2 deletions docs/modules/firewall_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,22 @@ Get info about a Linode Firewall.
```
## Parameters
| Field | Type | Required | Description |
|-----------|------|----------|------------------------------------------------------------------------------|
| `id` | `int` | Optional | The unique id of the Firewall. Optional if `label` is defined. |
| `label` | `str` | Optional | The Firewall’s label. Optional if `id` is defined. |



- `id` (`int`) - The unique id of the Firewall. Optional if `label` is defined.
- `label` (`str`) - The Firewall’s label. Optional if `id` is defined.


## Return Values
Expand Down
Loading

0 comments on commit 1ab615b

Please sign in to comment.