---
title: RUM
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/terraform)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# RUM

#### RUMSite Info

#### resource cloudflare\_web\_analytics\_site

##### required Expand Collapse

account\_id: String

Identifier.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20account_id>)

##### optional Expand Collapse

auto\_install?: Bool

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

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20auto_install>)

enabled?: Bool

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

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20enabled>)

host?: String

The hostname to use for gray-clouded sites.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20host>)

lite?: Bool

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

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20lite>)

zone\_tag?: String

The zone identifier.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20zone_tag>)

##### computed Expand Collapse

id: String

The Web Analytics site identifier.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20id>)

site\_tag: String

The Web Analytics site identifier.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20site_tag>)

created: Time

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20created>)

site\_token: String

The Web Analytics site token.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20site_token>)

snippet: String

Encoded JavaScript snippet.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20snippet>)

<details>

<summary>

rules: List\[Attributes]

A list of rules.

</summary>

id: String

The Web Analytics rule identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20id">Link to this property</a>

created: Time

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20created">Link to this property</a>

host: String

The hostname the rule will be applied to.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20host">Link to this property</a>

inclusive: Bool

Whether the rule includes or excludes traffic from being measured.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20inclusive">Link to this property</a>

is\_paused: Bool

Whether the rule is paused or not.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20is_paused">Link to this property</a>

paths: List\[String]

The paths the rule will be applied to.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20paths">Link to this property</a>

priority: Float64

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20priority">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20rules>)

<details>

<summary>

ruleset: Attributes

</summary>

id: String

The Web Analytics ruleset identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20id">Link to this property</a>

enabled: Bool

Whether the ruleset is enabled.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20enabled">Link to this property</a>

zone\_name: String

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20zone_name">Link to this property</a>

zone\_tag: String

The zone identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20zone_tag">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ruleset>)

### cloudflare\_web\_analytics\_site

Terraform

HTTPTypeScriptPythonGoTerraform

```
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.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20account_id>)

##### optional Expand Collapse

site\_id?: String

Identifier.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20site_id>)

<details>

<summary>

filter?: Attributes

</summary>

order\_by?: String

The property used to sort the list of results.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20filter%20%3E%20(attribute)%20order_by">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20filter>)

##### computed Expand Collapse

id: String

Identifier.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20id>)

auto\_install: Bool

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

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20auto_install>)

created: Time

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20created>)

site\_tag: String

The Web Analytics site identifier.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20site_tag>)

site\_token: String

The Web Analytics site token.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20site_token>)

snippet: String

Encoded JavaScript snippet.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20snippet>)

<details>

<summary>

rules: List\[Attributes]

A list of rules.

</summary>

id: String

The Web Analytics rule identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20id">Link to this property</a>

created: Time

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20created">Link to this property</a>

host: String

The hostname the rule will be applied to.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20host">Link to this property</a>

inclusive: Bool

Whether the rule includes or excludes traffic from being measured.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20inclusive">Link to this property</a>

is\_paused: Bool

Whether the rule is paused or not.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20is_paused">Link to this property</a>

paths: List\[String]

The paths the rule will be applied to.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20paths">Link to this property</a>

priority: Float64

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20priority">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20rules>)

<details>

<summary>

ruleset: Attributes

</summary>

id: String

The Web Analytics ruleset identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20id">Link to this property</a>

enabled: Bool

Whether the ruleset is enabled.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20enabled">Link to this property</a>

zone\_name: String

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20zone_name">Link to this property</a>

zone\_tag: String

The zone identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20zone_tag">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-single)%20%3E%20(attribute)%20ruleset>)

### cloudflare\_web\_analytics\_site

Terraform

HTTPTypeScriptPythonGoTerraform

```
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.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20account_id>)

##### optional Expand Collapse

order\_by?: String

The property used to sort the list of results.

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20order_by>)

max\_items?: Int64

Max items to fetch, default: 1000

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20max_items>)

##### computed Expand Collapse

<details>

<summary>

result: List\[Attributes]

The items returned by the data source

</summary>

id: String

The Web Analytics site identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20id">Link to this property</a>

auto\_install: Bool

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

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20auto_install">Link to this property</a>

created: Time

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20created">Link to this property</a>

<details>

<summary>

rules: List\[Attributes]

A list of rules.

</summary>

id: String

The Web Analytics rule identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20id">Link to this property</a>

created: Time

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20created">Link to this property</a>

host: String

The hostname the rule will be applied to.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20host">Link to this property</a>

inclusive: Bool

Whether the rule includes or excludes traffic from being measured.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20inclusive">Link to this property</a>

is\_paused: Bool

Whether the rule is paused or not.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20is_paused">Link to this property</a>

paths: List\[String]

The paths the rule will be applied to.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20paths">Link to this property</a>

priority: Float64

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20rules%20%3E%20(attribute)%20priority">Link to this property</a>

</details>

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20rules">Link to this property</a>

<details>

<summary>

ruleset: Attributes

</summary>

id: String

The Web Analytics ruleset identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20id">Link to this property</a>

enabled: Bool

Whether the ruleset is enabled.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20enabled">Link to this property</a>

zone\_name: String

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20zone_name">Link to this property</a>

zone\_tag: String

The zone identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20ruleset%20%3E%20(attribute)%20zone_tag">Link to this property</a>

</details>

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20ruleset">Link to this property</a>

site\_tag: String

The Web Analytics site identifier.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20site_tag">Link to this property</a>

site\_token: String

The Web Analytics site token.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20site_token">Link to this property</a>

snippet: String

Encoded JavaScript snippet.

<a href="#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result%20%3E%20(attribute)%20snippet">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rum.site_info%20%3E%20(terraform%20datasource-plural)%20%3E%20(attribute)%20result>)

### cloudflare\_web\_analytics\_sites

Terraform

HTTPTypeScriptPythonGoTerraform

```
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.

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20account_id>)

ruleset\_id: String

The Web Analytics ruleset identifier.

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20ruleset_id>)

##### optional Expand Collapse

host?: String

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20host>)

inclusive?: Bool

Whether the rule includes or excludes traffic from being measured.

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20inclusive>)

is\_paused?: Bool

Whether the rule is paused or not.

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20is_paused>)

paths?: List\[String]

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20paths>)

##### computed Expand Collapse

id: String

The Web Analytics rule identifier.

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20id>)

created: Time

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20created>)

priority: Float64

[Link to this property](<#(resource)%20rum.rules%20%3E%20(terraform%20resource)%20%3E%20(attribute)%20priority>)

### cloudflare\_web\_analytics\_rule

Terraform

HTTPTypeScriptPythonGoTerraform

```
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 = ["*"]
}
```