Skip to content
Start here

Sites

resource cloudflare_magic_transit_site

required Expand Collapse
account_id: String

Identifier

name: String

The name of the site.

optional Expand Collapse
ha_mode?: Bool

Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.

connector_id?: String

Magic Connector identifier tag.

description?: String
secondary_connector_id?: String

Magic Connector identifier tag. Used when high availability mode is on.

location?: Attributes

Location of site in latitude and longitude.

lat?: String

Latitude

lon?: String

Longitude

computed Expand Collapse
id: String

Identifier

cloudflare_magic_transit_site

resource "cloudflare_magic_transit_site" "example_magic_transit_site" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  name = "site_1"
  connector_id = "ac60d3d0435248289d446cedd870bcf4"
  description = "description"
  ha_mode = true
  location = {
    lat = "37.6192"
    lon = "122.3816"
  }
  secondary_connector_id = "8d67040d3835dbcf46ce29da440dc482"
}

data cloudflare_magic_transit_site

required Expand Collapse
account_id: String

Identifier

optional Expand Collapse
site_id?: String

Identifier

filter?: Attributes
connectorid?: String

Identifier

computed Expand Collapse
id: String

Identifier

connector_id: String

Magic Connector identifier tag.

description: String
ha_mode: Bool

Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.

name: String

The name of the site.

secondary_connector_id: String

Magic Connector identifier tag. Used when high availability mode is on.

location: Attributes

Location of site in latitude and longitude.

lat: String

Latitude

lon: String

Longitude

cloudflare_magic_transit_site

data "cloudflare_magic_transit_site" "example_magic_transit_site" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_magic_transit_sites

required Expand Collapse
account_id: String

Identifier

optional Expand Collapse
connectorid?: String

Identifier

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Identifier

connector_id: String

Magic Connector identifier tag.

description: String
ha_mode: Bool

Site high availability mode. If set to true, the site can have two connectors and runs in high availability mode.

location: Attributes

Location of site in latitude and longitude.

lat: String

Latitude

lon: String

Longitude

name: String

The name of the site.

secondary_connector_id: String

Magic Connector identifier tag. Used when high availability mode is on.

cloudflare_magic_transit_sites

data "cloudflare_magic_transit_sites" "example_magic_transit_sites" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  connectorid = "023e105f4ecef8ad9ca31a8372d0c353"
}

SitesACLs

resource cloudflare_magic_transit_site_acl

required Expand Collapse
account_id: String

Identifier

site_id: String

Identifier

name: String

The name of the ACL.

lan_1: Attributes
lan_id: String

The identifier for the LAN you want to create an ACL policy with.

lan_name?: String

The name of the LAN based on the provided lan_id.

port_ranges?: List[String]

Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.

ports?: List[Int64]

Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.

subnets?: List[String]

Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed.

lan_2: Attributes
lan_id: String

The identifier for the LAN you want to create an ACL policy with.

lan_name?: String

The name of the LAN based on the provided lan_id.

port_ranges?: List[String]

Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.

ports?: List[Int64]

Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.

subnets?: List[String]

Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed.

optional Expand Collapse
description?: String

Description for the ACL.

forward_locally?: Bool

The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.

unidirectional?: Bool

The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.

protocols?: List[String]
computed Expand Collapse
id: String

Identifier

cloudflare_magic_transit_site_acl

resource "cloudflare_magic_transit_site_acl" "example_magic_transit_site_acl" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
  lan_1 = {
    lan_id = "lan_id"
    lan_name = "lan_name"
    port_ranges = ["8080-9000"]
    ports = [1]
    subnets = ["192.0.2.1"]
  }
  lan_2 = {
    lan_id = "lan_id"
    lan_name = "lan_name"
    port_ranges = ["8080-9000"]
    ports = [1]
    subnets = ["192.0.2.1"]
  }
  name = "PIN Pad - Cash Register"
  description = "Allows local traffic between PIN pads and cash register."
  forward_locally = true
  protocols = ["tcp"]
  unidirectional = true
}

data cloudflare_magic_transit_site_acl

required Expand Collapse
acl_id: String

Identifier

account_id: String

Identifier

site_id: String

Identifier

computed Expand Collapse
id: String

Identifier

description: String

Description for the ACL.

forward_locally: Bool

The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.

name: String

The name of the ACL.

unidirectional: Bool

The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.

protocols: List[String]
lan_1: Attributes
lan_id: String

The identifier for the LAN you want to create an ACL policy with.

lan_name: String

The name of the LAN based on the provided lan_id.

port_ranges: List[String]

Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.

ports: List[Int64]

Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.

subnets: List[String]

Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed.

lan_2: Attributes
lan_id: String

The identifier for the LAN you want to create an ACL policy with.

lan_name: String

The name of the LAN based on the provided lan_id.

port_ranges: List[String]

Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.

ports: List[Int64]

Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.

subnets: List[String]

Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed.

cloudflare_magic_transit_site_acl

data "cloudflare_magic_transit_site_acl" "example_magic_transit_site_acl" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
  acl_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_magic_transit_site_acls

required Expand Collapse
account_id: String

Identifier

site_id: String

Identifier

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

id: String

Identifier

description: String

Description for the ACL.

forward_locally: Bool

The desired forwarding action for this ACL policy. If set to "false", the policy will forward traffic to Cloudflare. If set to "true", the policy will forward traffic locally on the Magic Connector. If not included in request, will default to false.

lan_1: Attributes
lan_id: String

The identifier for the LAN you want to create an ACL policy with.

lan_name: String

The name of the LAN based on the provided lan_id.

port_ranges: List[String]

Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.

ports: List[Int64]

Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.

subnets: List[String]

Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed.

lan_2: Attributes
lan_id: String

The identifier for the LAN you want to create an ACL policy with.

lan_name: String

The name of the LAN based on the provided lan_id.

port_ranges: List[String]

Array of port ranges on the provided LAN that will be included in the ACL. If no ports or port rangess are provided, communication on any port on this LAN is allowed.

ports: List[Int64]

Array of ports on the provided LAN that will be included in the ACL. If no ports or port ranges are provided, communication on any port on this LAN is allowed.

subnets: List[String]

Array of subnet IPs within the LAN that will be included in the ACL. If no subnets are provided, communication on any subnets on this LAN are allowed.

name: String

The name of the ACL.

protocols: List[String]
unidirectional: Bool

The desired traffic direction for this ACL policy. If set to "false", the policy will allow bidirectional traffic. If set to "true", the policy will only allow traffic in one direction. If not included in request, will default to false.

cloudflare_magic_transit_site_acls

data "cloudflare_magic_transit_site_acls" "example_magic_transit_site_acls" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

SitesLANs

resource cloudflare_magic_transit_site_lan

required Expand Collapse
account_id: String

Identifier

site_id: String

Identifier

optional Expand Collapse
bond_id?: Int64
is_breakout?: Bool

mark true to use this LAN for source-based breakout traffic

is_prioritized?: Bool

mark true to use this LAN for source-based prioritized traffic

name?: String
physport?: Int64
vlan_tag?: Int64

VLAN ID. Use zero for untagged.

nat?: Attributes
static_prefix?: String

A valid CIDR notation representing an IP range.

routed_subnets?: List[Attributes]
next_hop: String

A valid IPv4 address.

prefix: String

A valid CIDR notation representing an IP range.

nat?: Attributes
static_prefix?: String

A valid CIDR notation representing an IP range.

static_addressing?: Attributes

If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address.

address: String

A valid CIDR notation representing an IP range.

dhcp_relay?: Attributes
server_addresses?: List[String]

List of DHCP server IPs.

dhcp_server?: Attributes
dhcp_pool_end?: String

A valid IPv4 address.

dhcp_pool_start?: String

A valid IPv4 address.

dns_server?: String

A valid IPv4 address.

dns_servers?: List[String]
reservations?: Map[String]

Mapping of MAC addresses to IP addresses

secondary_address?: String

A valid CIDR notation representing an IP range.

virtual_address?: String

A valid CIDR notation representing an IP range.

computed Expand Collapse
id: String

Identifier

cloudflare_magic_transit_site_lan

resource "cloudflare_magic_transit_site_lan" "example_magic_transit_site_lan" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
  bond_id = 2
  ha_link = true
  is_breakout = true
  is_prioritized = true
  name = "name"
  nat = {
    static_prefix = "192.0.2.0/24"
  }
  physport = 1
  routed_subnets = [{
    next_hop = "192.0.2.1"
    prefix = "192.0.2.0/24"
    nat = {
      static_prefix = "192.0.2.0/24"
    }
  }]
  static_addressing = {
    address = "192.0.2.0/24"
    dhcp_relay = {
      server_addresses = ["192.0.2.1"]
    }
    dhcp_server = {
      dhcp_pool_end = "192.0.2.1"
      dhcp_pool_start = "192.0.2.1"
      dns_server = "192.0.2.1"
      dns_servers = ["192.0.2.1"]
      reservations = {
        "00:11:22:33:44:55" = "192.0.2.100"
        "AA:BB:CC:DD:EE:FF" = "192.168.1.101"
      }
    }
    secondary_address = "192.0.2.0/24"
    virtual_address = "192.0.2.0/24"
  }
  vlan_tag = 42
}

data cloudflare_magic_transit_site_lan

required Expand Collapse
lan_id: String

Identifier

account_id: String

Identifier

site_id: String

Identifier

computed Expand Collapse
id: String

Identifier

bond_id: Int64
is_breakout: Bool

mark true to use this LAN for source-based breakout traffic

is_prioritized: Bool

mark true to use this LAN for source-based prioritized traffic

name: String
physport: Int64
vlan_tag: Int64

VLAN ID. Use zero for untagged.

nat: Attributes
static_prefix: String

A valid CIDR notation representing an IP range.

routed_subnets: List[Attributes]
next_hop: String

A valid IPv4 address.

prefix: String

A valid CIDR notation representing an IP range.

nat: Attributes
static_prefix: String

A valid CIDR notation representing an IP range.

static_addressing: Attributes

If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address.

address: String

A valid CIDR notation representing an IP range.

dhcp_relay: Attributes
server_addresses: List[String]

List of DHCP server IPs.

dhcp_server: Attributes
dhcp_pool_end: String

A valid IPv4 address.

dhcp_pool_start: String

A valid IPv4 address.

dns_server: String

A valid IPv4 address.

dns_servers: List[String]
reservations: Map[String]

Mapping of MAC addresses to IP addresses

secondary_address: String

A valid CIDR notation representing an IP range.

virtual_address: String

A valid CIDR notation representing an IP range.

cloudflare_magic_transit_site_lan

data "cloudflare_magic_transit_site_lan" "example_magic_transit_site_lan" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
  lan_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_magic_transit_site_lans

required Expand Collapse
account_id: String

Identifier

site_id: String

Identifier

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

id: String

Identifier

bond_id: Int64
is_breakout: Bool

mark true to use this LAN for source-based breakout traffic

is_prioritized: Bool

mark true to use this LAN for source-based prioritized traffic

name: String
nat: Attributes
static_prefix: String

A valid CIDR notation representing an IP range.

physport: Int64
routed_subnets: List[Attributes]
next_hop: String

A valid IPv4 address.

prefix: String

A valid CIDR notation representing an IP range.

nat: Attributes
static_prefix: String

A valid CIDR notation representing an IP range.

site_id: String

Identifier

static_addressing: Attributes

If the site is not configured in high availability mode, this configuration is optional (if omitted, use DHCP). However, if in high availability mode, static_address is required along with secondary and virtual address.

address: String

A valid CIDR notation representing an IP range.

dhcp_relay: Attributes
server_addresses: List[String]

List of DHCP server IPs.

dhcp_server: Attributes
dhcp_pool_end: String

A valid IPv4 address.

dhcp_pool_start: String

A valid IPv4 address.

dns_server: String

A valid IPv4 address.

dns_servers: List[String]
reservations: Map[String]

Mapping of MAC addresses to IP addresses

secondary_address: String

A valid CIDR notation representing an IP range.

virtual_address: String

A valid CIDR notation representing an IP range.

vlan_tag: Int64

VLAN ID. Use zero for untagged.

cloudflare_magic_transit_site_lans

data "cloudflare_magic_transit_site_lans" "example_magic_transit_site_lans" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

SitesWANs

resource cloudflare_magic_transit_site_wan

required Expand Collapse
account_id: String

Identifier

site_id: String

Identifier

physport: Int64
optional Expand Collapse
name?: String
priority?: Int64
vlan_tag?: Int64

VLAN ID. Use zero for untagged.

static_addressing?: Attributes

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

address: String

A valid CIDR notation representing an IP range.

gateway_address: String

A valid IPv4 address.

secondary_address?: String

A valid CIDR notation representing an IP range.

computed Expand Collapse
id: String

Identifier

health_check_rate: String

Magic WAN health check rate for tunnels created on this link. The default value is mid.

cloudflare_magic_transit_site_wan

resource "cloudflare_magic_transit_site_wan" "example_magic_transit_site_wan" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
  physport = 1
  name = "name"
  priority = 0
  static_addressing = {
    address = "192.0.2.0/24"
    gateway_address = "192.0.2.1"
    secondary_address = "192.0.2.0/24"
  }
  vlan_tag = 42
}

data cloudflare_magic_transit_site_wan

required Expand Collapse
wan_id: String

Identifier

account_id: String

Identifier

site_id: String

Identifier

computed Expand Collapse
id: String

Identifier

health_check_rate: String

Magic WAN health check rate for tunnels created on this link. The default value is mid.

name: String
physport: Int64
priority: Int64

Priority of WAN for traffic loadbalancing.

vlan_tag: Int64

VLAN ID. Use zero for untagged.

static_addressing: Attributes

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

address: String

A valid CIDR notation representing an IP range.

gateway_address: String

A valid IPv4 address.

secondary_address: String

A valid CIDR notation representing an IP range.

cloudflare_magic_transit_site_wan

data "cloudflare_magic_transit_site_wan" "example_magic_transit_site_wan" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
  wan_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_magic_transit_site_wans

required Expand Collapse
account_id: String

Identifier

site_id: String

Identifier

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

id: String

Identifier

health_check_rate: String

Magic WAN health check rate for tunnels created on this link. The default value is mid.

name: String
physport: Int64
priority: Int64

Priority of WAN for traffic loadbalancing.

site_id: String

Identifier

static_addressing: Attributes

(optional) if omitted, use DHCP. Submit secondary_address when site is in high availability mode.

address: String

A valid CIDR notation representing an IP range.

gateway_address: String

A valid IPv4 address.

secondary_address: String

A valid CIDR notation representing an IP range.

vlan_tag: Int64

VLAN ID. Use zero for untagged.

cloudflare_magic_transit_site_wans

data "cloudflare_magic_transit_site_wans" "example_magic_transit_site_wans" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
}