Skip to content
Start here

Magic Network Monitoring

Magic Network MonitoringConfigs

resource cloudflare_magic_network_monitoring_configuration

required Expand Collapse
account_id: String
name: String

The account name.

optional Expand Collapse
router_ips?: List[String]
warp_devices?: List[Attributes]
id: String

Unique identifier for the warp device.

name: String

Name of the warp device.

router_ip: String

IPv4 CIDR of the router sourcing flow data associated with this warp device. Only /32 addresses are currently supported.

default_sampling?: Float64

Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.

cloudflare_magic_network_monitoring_configuration

resource "cloudflare_magic_network_monitoring_configuration" "example_magic_network_monitoring_configuration" {
  account_id = "6f91088a406011ed95aed352566e8d4c"
  default_sampling = 1
  name = "cloudflare user\'s account"
  router_ips = ["203.0.113.1"]
  warp_devices = [{
    id = "5360368d-b351-4791-abe1-93550dabd351"
    name = "My warp device"
    router_ip = "203.0.113.1"
  }]
}

data cloudflare_magic_network_monitoring_configuration

required Expand Collapse
account_id: String
computed Expand Collapse
default_sampling: Float64

Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.

name: String

The account name.

router_ips: List[String]
warp_devices: List[Attributes]
id: String

Unique identifier for the warp device.

name: String

Name of the warp device.

router_ip: String

IPv4 CIDR of the router sourcing flow data associated with this warp device. Only /32 addresses are currently supported.

cloudflare_magic_network_monitoring_configuration

data "cloudflare_magic_network_monitoring_configuration" "example_magic_network_monitoring_configuration" {
  account_id = "6f91088a406011ed95aed352566e8d4c"
}

Magic Network MonitoringRules

resource cloudflare_magic_network_monitoring_rule

required Expand Collapse
account_id: String
name: String

The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.

optional Expand Collapse
automatic_advertisement?: Bool

Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.

bandwidth?: Float64

The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

packet_threshold?: Float64

The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

prefixes?: List[String]
duration?: String

The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].

computed Expand Collapse
id: String

The id of the rule. Must be unique.

bandwidth_threshold: Float64

The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

prefix_match: String

Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.

type: String

MNM rule type.

zscore_sensitivity: String

Level of sensitivity set for zscore rules.

zscore_target: String

Target of the zscore rule analysis.

cloudflare_magic_network_monitoring_rule

resource "cloudflare_magic_network_monitoring_rule" "example_magic_network_monitoring_rule" {
  account_id = "6f91088a406011ed95aed352566e8d4c"
  duration = "1m"
  name = "my_rule_1"
  automatic_advertisement = true
  bandwidth = 1000
  packet_threshold = 10000
  prefixes = ["203.0.113.1/32"]
}

data cloudflare_magic_network_monitoring_rule

required Expand Collapse
rule_id: String

The id of the rule. Must be unique.

account_id: String
computed Expand Collapse
id: String

The id of the rule. Must be unique.

automatic_advertisement: Bool

Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.

bandwidth_threshold: Float64

The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

duration: String

The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].

name: String

The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.

packet_threshold: Float64

The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

prefix_match: String

Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.

type: String

MNM rule type.

zscore_sensitivity: String

Level of sensitivity set for zscore rules.

zscore_target: String

Target of the zscore rule analysis.

prefixes: List[String]

cloudflare_magic_network_monitoring_rule

data "cloudflare_magic_network_monitoring_rule" "example_magic_network_monitoring_rule" {
  account_id = "6f91088a406011ed95aed352566e8d4c"
  rule_id = "2890e6fa406311ed9b5a23f70f6fb8cf"
}

data cloudflare_magic_network_monitoring_rules

required Expand Collapse
account_id: String
optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

automatic_advertisement: Bool

Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.

name: String

The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.

prefixes: List[String]
type: String

MNM rule type.

id: String

The id of the rule. Must be unique.

bandwidth_threshold: Float64

The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

duration: String

The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].

packet_threshold: Float64

The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.

prefix_match: String

Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.

zscore_sensitivity: String

Level of sensitivity set for zscore rules.

zscore_target: String

Target of the zscore rule analysis.

cloudflare_magic_network_monitoring_rules

data "cloudflare_magic_network_monitoring_rules" "example_magic_network_monitoring_rules" {
  account_id = "6f91088a406011ed95aed352566e8d4c"
}