Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table linode_firewall Closes #54 #58

Merged
merged 3 commits into from
Aug 9, 2024
Merged

Add table linode_firewall Closes #54 #58

merged 3 commits into from
Aug 9, 2024

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Aug 8, 2024

Example query results

Results
> select
  f.id,
  f.label,
  o ->> 'label' as outbound_label,
  o ->> 'ports' as outbound_ports,
  o ->> 'action' as outbound_action,
  o ->> 'protocol' as outbound_protocol,
  o ->> 'description' as outbound_description,
  o -> 'addresses' as outbound_addresses
from
  linode_firewall as f,
  jsonb_array_elements(rules -> 'outbound') as o;
+--------+---------+----------------------+----------------+-----------------+-------------------+----------------------+--------------------+
| id     | label   | outbound_label       | outbound_ports | outbound_action | outbound_protocol | outbound_description | outbound_addresses |
+--------+---------+----------------------+----------------+-----------------+-------------------+----------------------+--------------------+
| 756626 | testf43 | accept-outbound-HTTP | 80             | DROP            | TCP               | tsss                 | {"ipv6":["::/0"]}  |
+--------+---------+----------------------+----------------+-----------------+-------------------+----------------------+--------------------+

Time: 1.5s. Rows returned: 1. Rows fetched: 1. Hydrate calls: 0.

Scans:
  1) linode_firewall.linode: Time: 1.4s. Fetched: 1. Hydrates: 0.

> select
  f.id,
  f.label,
  i ->> 'label' as inbound_label,
  i ->> 'ports' as inbound_ports,
  i ->> 'action' as inbound_action,
  i ->> 'protocol' as inbound_protocol,
  i ->> 'description' as inbound_description,
  i -> 'addresses' as inbound_addresses
from
  linode_firewall as f,
  jsonb_array_elements(rules -> 'inbound') as i;
+--------+---------+---------------------+---------------+----------------+------------------+---------------------+------------------------+
| id     | label   | inbound_label       | inbound_ports | inbound_action | inbound_protocol | inbound_description | inbound_addresses      |
+--------+---------+---------------------+---------------+----------------+------------------+---------------------+------------------------+
| 756626 | testf43 | accept-inbound-HTTP | 80            | ACCEPT         | TCP              | testing             | {"ipv4":["0.0.0.0/0"]} |
+--------+---------+---------------------+---------------+----------------+------------------+---------------------+------------------------+

Time: 54ms. Rows returned: 1. Rows fetched: 1 (cached). Hydrate calls: 0.

Scans:
  1) linode_firewall.linode: Time: 5ms. Fetched: 1 (cached). Hydrates: 0.

@ParthaI ParthaI requested a review from misraved August 8, 2024 15:10
@ParthaI ParthaI self-assigned this Aug 8, 2024
@ParthaI ParthaI linked an issue Aug 8, 2024 that may be closed by this pull request
@khushboo9024 khushboo9024 merged commit 91755f2 into main Aug 9, 2024
1 check passed
@khushboo9024 khushboo9024 deleted the issue-54 branch August 9, 2024 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table linode_firewalls
2 participants