Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.21 KB

firewall_rule.md

File metadata and controls

50 lines (37 loc) · 1.21 KB
page_title subcategory description
twc_firewall_rule Resource - Timeweb Cloud
Resource for describing needed firewall rule and provides actual information about its status

twc_firewall_rule (Resource)

Resource for describing needed firewall rule and provides actual information about its status

Примеры использования

// Create example firewall
resource "twc_firewall" "example-firewall" {
  name = "example-firewall"
  description = "Some example firewall"
}

// Add rule to created firewall that allow TCP on 80 port from any source
resource "twc_firewall_rule" "example-firewall-rules" {
  firewall_id = resource.twc_firewall.example-firewall.id
  description = "Some example firewall rule"

  direction = "ingress"
  port = 80
  protocol = "tcp"
  cidr = "0.0.0.0/0"
}

Schema

Required

  • direction (String) Rule direction
  • firewall_id (String) ID of target firewall
  • protocol (String) Rule protocol

Optional

  • cidr (String) Rule CIDR
  • description (String) Description for firewall
  • port (Number) Port when rule protocol is TCP or UDP

Read-Only

  • id (String) The ID of this resource.