mirror of
https://github.com/oscarhermoso/terraform-provider-binarylane
synced 2026-10-18 21:39:17 +11:00
11e0302e71
* 📚 add descriptions to resources * 📷 Create `images` data source, plus codegen for `sizes`, `regions` * 🍩 Create offerings example * 🧣 Create `regions` and `sizes` data sources
2.3 KiB
2.3 KiB
page_title, subcategory, description
| page_title | subcategory | description |
|---|---|---|
| binarylane_server_firewall_rules Resource - terraform-provider-binarylane | Retrieve details about the External Firewall Rules assigned to a BinaryLane server. |
binarylane_server_firewall_rules (Resource)
Retrieve details about the External Firewall Rules assigned to a BinaryLane server.
Example Usage
resource "binarylane_server" "example" {
# ...
}
resource "binarylane_server_firewall_rules" "example" {
server_id = binarylane_server.example.id
firewall_rules = [
{
description = "Allow SSH"
protocol = "tcp"
source_addresses = ["0.0.0.0/0"]
destination_addresses = [binarylane_server.example.private_ipv4_addresses.0]
destination_ports = ["22"]
action = "accept"
}
]
}
Schema
Required
firewall_rules(Attributes List) A list of rules for the server. NB: that any existing rules that are not included will be removed. Submit an empty list to clear all rules. (see below for nested schema)server_id(Number) The ID of the server for which firewall rules should be listed.
Nested Schema for firewall_rules
Required:
action(String) The action to take when there is a match on this rule.destination_addresses(List of String) The destination addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.protocol(String) The protocol to match for this rule.source_addresses(List of String) The source addresses to match for this rule. Each address may be an individual IPv4 address or a range in IPv4 CIDR notation.
Optional:
description(String) A description to assist in identifying this rule. Commonly used to record the reason for the rule or the intent behind it, e.g. "Block access to RDP" or "Allow access from HQ".destination_ports(List of String) The destination ports to match for this rule. Leave null or empty to match on all ports.
Import
Import is supported using the following syntax:
terraform import binarylane_server_firewall_rules.example "<server name or id>"