Skip to content

Commit 1a56070

Browse files
authored
[Gateway] Secure Internet Traffic network policies API + TF (#20150)
1 parent f3c4010 commit 1a56070

File tree

10 files changed

+347
-22
lines changed

10 files changed

+347
-22
lines changed

src/content/docs/learning-paths/secure-internet-traffic/build-dns-policies/create-list.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To create a new DNS policy using **Terraform** to allow access to all approved c
5252

5353
```tf
5454
resource "cloudflare_zero_trust_gateway_policy" "allow_corporate_domain_access" {
55-
account_id = var.account_id
55+
account_id = var.cloudflare_account_id
5656
name = "All-DNS-CorporateDomain-AllowList"
5757
description = "Allow access to the corporate domains defined under the Corporate Domains list"
5858
precedence = 1

src/content/docs/learning-paths/secure-internet-traffic/build-dns-policies/create-policy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ To create a new DNS policy using **Terraform**:
6565
6666
```tf
6767
resource "cloudflare_zero_trust_gateway_policy" "security_risks_dns_policy" {
68-
account_id = var.account_id
68+
account_id = var.cloudflare_account_id
6969
name = "All-DNS-SecurityCategories-Blocklist"
7070
description = "Block known security risks based on Cloudflare's threat intelligence"
7171
precedence = 0

src/content/docs/learning-paths/secure-internet-traffic/build-dns-policies/recommended-dns-policies.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
4949

5050
```tf
5151
resource "cloudflare_zero_trust_gateway_policy" "dns_whitelist_policy" {
52-
account_id = var.account_id
52+
account_id = var.cloudflare_account_id
5353
name = "All-DNS-Domain-Allowlist"
5454
description = "Allowlist any known domains and hostnames"
5555
precedence = 0
@@ -105,7 +105,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
105105

106106
```tf
107107
resource "cloudflare_zero_trust_gateway_policy" "dns_restrict_quarantined_users" {
108-
account_id = var.account_id
108+
account_id = var.cloudflare_account_id
109109
name = "Quarantined-Users-DNS-Restricted-Access"
110110
description = "Restrict access for users included in an identity provider (IdP) user group for risky users"
111111
precedence = 10
@@ -189,7 +189,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
189189

190190
```tf
191191
resource "cloudflare_zero_trust_gateway_policy" "dns_geolocation_block_policy" {
192-
account_id = var.account_id
192+
account_id = var.cloudflare_account_id
193193
name = "All-DNS-GeoCountryIP-Blocklist"
194194
description = "Block traffic hosted in countries categorized as high security risks"
195195
precedence = 50
@@ -242,7 +242,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
242242

243243
```tf
244244
resource "cloudflare_zero_trust_gateway_policy" "dns_blacklist_policy" {
245-
account_id = var.account_id
245+
account_id = var.cloudflare_account_id
246246
name = "All-DNS-DomainTopLevel-Blocklist"
247247
description = "Block DNS queries of known risky TLDs"
248248
precedence = 60
@@ -296,7 +296,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
296296

297297
```tf
298298
resource "cloudflare_zero_trust_gateway_policy" "dns_phishing_domains_block" {
299-
account_id = var.account_id
299+
account_id = var.cloudflare_account_id
300300
name = "All-DNS-DomainPhishing-Blocklist"
301301
description = "Block misused domains used in phishing campaigns"
302302
precedence = 70
@@ -351,7 +351,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
351351

352352
```tf
353353
resource "cloudflare_zero_trust_gateway_policy" "dns_resolvedip_blocklist_rule" {
354-
account_id = var.account_id
354+
account_id = var.cloudflare_account_id
355355
name = "All-DNS-ResolvedIP-Blocklist"
356356
description = "Block specific IP addresses deemed to be a risk to the Organization"
357357
precedence = 80
@@ -409,7 +409,7 @@ curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/gateway/rules \
409409

410410
```tf
411411
resource "cloudflare_zero_trust_gateway_policy" "block_dns_domain_host" {
412-
account_id = var.account_id
412+
account_id = var.cloudflare_account_id
413413
name = "All-DNS-DomainHost-Blocklist"
414414
description = "Block specific domains or hosts that are malicious or pose a threat to your organization."
415415
precedence = 90

0 commit comments

Comments
 (0)