Skip to content

Commit 13147be

Browse files
committed
Add TF for application policy
1 parent 6915edf commit 13147be

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

src/content/partials/cloudflare-one/gateway/policies/dash-plus-api/dns-block-applications.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { Tabs, TabItem } from "~/components";
1111
| Application | in | _Artificial Intelligence_ | Block |
1212

1313
</TabItem>
14-
1514
<TabItem label="API">
1615

1716
```bash
@@ -31,4 +30,21 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rule \
3130
}'
3231
```
3332

33+
</TabItem>
34+
35+
<TabItem label="Terraform">
36+
37+
```tf
38+
resource "cloudflare_zero_trust_gateway_policy" "block_unauthorized_apps" {
39+
account_id = var.account_id
40+
name = "All-DNS-Application-Blocklist"
41+
description = "Block access to unauthorized AI applications"
42+
enabled = true
43+
action = "block"
44+
filters = ["dns"]
45+
traffic = "any(app.type.ids[*] in {25})"
46+
identity = ""
47+
}
48+
```
49+
3450
</TabItem> </Tabs>

src/content/partials/cloudflare-one/gateway/policies/dash-plus-api/http-block-content-categories.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,19 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rule \
3232
```
3333

3434
</TabItem>
35-
</Tabs>
35+
<TabItem label="Terraform">
36+
37+
```tf
38+
resource "cloudflare_zero_trust_gateway_policy" "block_unauthorized_apps" {
39+
account_id = var.account_id
40+
name = "All-HTTP-Application-Blocklist"
41+
description = "Block access to unauthorized AI applications"
42+
enabled = true
43+
action = "block"
44+
filters = ["dns"]
45+
traffic = "any(app.type.ids[*] in {25})"
46+
identity = ""
47+
}
48+
```
49+
50+
</TabItem> </Tabs>

0 commit comments

Comments
 (0)