Skip to content
Start here

RUM

RUMSite Info

resource cloudflare_web_analytics_site

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
auto_install?: Bool

If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.

enabled?: Bool

Enables or disables RUM. This option can be used only when auto_install is set to true.

host?: String

The hostname to use for gray-clouded sites.

lite?: Bool

If enabled, the JavaScript snippet will not be injected for visitors from the EU.

zone_tag?: String

The zone identifier.

computed Expand Collapse
id: String

The Web Analytics site identifier.

site_tag: String

The Web Analytics site identifier.

created: Time
site_token: String

The Web Analytics site token.

snippet: String

Encoded JavaScript snippet.

rules: List[Attributes]

A list of rules.

id: String

The Web Analytics rule identifier.

created: Time
host: String

The hostname the rule will be applied to.

inclusive: Bool

Whether the rule includes or excludes traffic from being measured.

is_paused: Bool

Whether the rule is paused or not.

paths: List[String]

The paths the rule will be applied to.

priority: Float64
ruleset: Attributes
id: String

The Web Analytics ruleset identifier.

enabled: Bool

Whether the ruleset is enabled.

zone_name: String
zone_tag: String

The zone identifier.

cloudflare_web_analytics_site

resource "cloudflare_web_analytics_site" "example_web_analytics_site" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  auto_install = true
  host = "example.com"
  zone_tag = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_web_analytics_site

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
site_id?: String

Identifier.

filter?: Attributes
order_by?: String

The property used to sort the list of results.

computed Expand Collapse
id: String

Identifier.

auto_install: Bool

If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.

created: Time
site_tag: String

The Web Analytics site identifier.

site_token: String

The Web Analytics site token.

snippet: String

Encoded JavaScript snippet.

rules: List[Attributes]

A list of rules.

id: String

The Web Analytics rule identifier.

created: Time
host: String

The hostname the rule will be applied to.

inclusive: Bool

Whether the rule includes or excludes traffic from being measured.

is_paused: Bool

Whether the rule is paused or not.

paths: List[String]

The paths the rule will be applied to.

priority: Float64
ruleset: Attributes
id: String

The Web Analytics ruleset identifier.

enabled: Bool

Whether the ruleset is enabled.

zone_name: String
zone_tag: String

The zone identifier.

cloudflare_web_analytics_site

data "cloudflare_web_analytics_site" "example_web_analytics_site" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  site_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_web_analytics_sites

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
order_by?: String

The property used to sort the list of results.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

The Web Analytics site identifier.

auto_install: Bool

If enabled, the JavaScript snippet is automatically injected for orange-clouded sites.

created: Time
rules: List[Attributes]

A list of rules.

id: String

The Web Analytics rule identifier.

created: Time
host: String

The hostname the rule will be applied to.

inclusive: Bool

Whether the rule includes or excludes traffic from being measured.

is_paused: Bool

Whether the rule is paused or not.

paths: List[String]

The paths the rule will be applied to.

priority: Float64
ruleset: Attributes
id: String

The Web Analytics ruleset identifier.

enabled: Bool

Whether the ruleset is enabled.

zone_name: String
zone_tag: String

The zone identifier.

site_tag: String

The Web Analytics site identifier.

site_token: String

The Web Analytics site token.

snippet: String

Encoded JavaScript snippet.

cloudflare_web_analytics_sites

data "cloudflare_web_analytics_sites" "example_web_analytics_sites" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  order_by = "host"
}

RUMRules

resource cloudflare_web_analytics_rule

required Expand Collapse
account_id: String

Identifier.

ruleset_id: String

The Web Analytics ruleset identifier.

optional Expand Collapse
host?: String
inclusive?: Bool

Whether the rule includes or excludes traffic from being measured.

is_paused?: Bool

Whether the rule is paused or not.

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

The Web Analytics rule identifier.

created: Time
priority: Float64

cloudflare_web_analytics_rule

resource "cloudflare_web_analytics_rule" "example_web_analytics_rule" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  ruleset_id = "f174e90a-fafe-4643-bbbc-4a0ed4fc8415"
  host = "example.com"
  inclusive = true
  is_paused = false
  paths = ["*"]
}