Skip to content

Commit 89687bd

Browse files
authored
[ZT] Gateway proxy and global WARP settings in Terraform (#23083)
* enable gateway proxy * global warp settings
1 parent a9889ba commit 89687bd

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

src/content/docs/learning-paths/replace-vpn/configure-device-agent/enable-proxy.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@ import { Render } from "~/components"
1212

1313
## Enable the proxy
1414

15-
<Render file="tunnel/enable-gateway-proxy" product="cloudflare-one" />
16-
17-
Cloudflare will now proxy traffic from enrolled devices, except for the traffic excluded in your [split tunnel settings](/cloudflare-one/connections/connect-networks/private-net/cloudflared/#3-route-private-network-ips-through-warp). For more information on how Gateway forwards traffic, refer to [Gateway proxy](/cloudflare-one/policies/gateway/proxy/).
15+
<Render file="tunnel/enable-gateway-proxy" product="cloudflare-one" />

src/content/partials/cloudflare-one/tunnel/enable-gateway-proxy.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@ import { Tabs, TabItem } from "~/components";
1515
</TabItem>
1616
<TabItem label="Terraform (v5)">
1717

18-
Proxy settings are not currently supported by the Terraform v5 provider (as of version 5.3.0). To turn on the Gateway proxy, use the dashboard or API.
18+
1. Add the following permission to your [`cloudflare_api_token`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/api_token):
19+
- `Zero Trust Write`
20+
21+
2. Turn on the TCP and/or UDP proxy using the [`cloudflare_zero_trust_device_settings`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_device_settings) resource:
22+
23+
```tf
24+
resource "cloudflare_zero_trust_device_settings "global_warp_settings" {
25+
account_id = var.cloudflare_account_id
26+
gateway_proxy_enabled = true
27+
gateway_udp_proxy_enabled = true
28+
}
29+
```
1930

2031
</TabItem>
2132
</Tabs>

src/content/partials/learning-paths/zero-trust/device-profiles.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ To customize the default settings:
3636

3737
4. Save the profile.
3838

39-
5. Under [**Global settings**](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#global-settings),
39+
5. Configure [global settings](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#global-settings) for all device profiles:
4040
1. (Recommended) Enable **Admin override code** if you turned on **Lock WARP switch**.
4141
2. Enable **Install CA to system certificate store** if you want users to see a [custom block page](/cloudflare-one/policies/gateway/block-page/).
4242

@@ -105,7 +105,16 @@ https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/devices/settings \
105105
}
106106
```
107107

108-
3. [Global settings](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#global-settings) are not currently supported by the Terraform v5 provider (as of version 5.3.0). To turn on **Admin override code** and **Install CA to system certificate store**, use the dashboard or API.
108+
3. Configure [global settings](/cloudflare-one/connections/connect-devices/warp/configure-warp/warp-settings/#global-settings) using the [`cloudflare_zero_trust_device_settings`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_device_settings) resource:
109+
110+
```tf
111+
resource "cloudflare_zero_trust_device_settings" "global_warp_settings" {
112+
account_id = var.cloudflare_account_id
113+
disable_for_time = 3600
114+
root_certificate_installation_enabled = true
115+
use_zt_virtual_ip = false
116+
}
117+
```
109118

110119
</TabItem>
111120
</Tabs>

0 commit comments

Comments
 (0)