Skip to content

Commit d603c3a

Browse files
committed
no longer need to input tunnel_secret in v5
1 parent 51728a9 commit d603c3a

File tree

5 files changed

+1
-33
lines changed

5 files changed

+1
-33
lines changed

src/content/docs/cloudflare-one/connections/connect-networks/deployment-guides/ansible.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,11 @@ The following configuration will modify settings in your Cloudflare account.
9090

9191

9292
```tf
93-
# Generates a 32-byte secret for the tunnel.
94-
resource "random_bytes" "tunnel_secret" {
95-
byte_length = 32
96-
}
9793
9894
# Creates a new remotely-managed tunnel for the GCP VM.
9995
resource "cloudflare_zero_trust_tunnel_cloudflared" "gcp_tunnel" {
10096
account_id = var.cloudflare_account_id
10197
name = "Ansible GCP tunnel"
102-
tunnel_secret = random_bytes.tunnel_secret.base64
10398
}
10499
105100
# Reads the token used to run the tunnel on the server.

src/content/docs/cloudflare-one/connections/connect-networks/deployment-guides/terraform.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,11 @@ The following configuration will modify settings in your Cloudflare account.
133133
<TabItem label="Terraform (v5)">
134134

135135
```tf
136-
# Generates a 32-byte secret for the tunnel.
137-
resource "random_bytes" "tunnel_secret" {
138-
byte_length = 32
139-
}
140136
141137
# Creates a new remotely-managed tunnel for the GCP VM.
142138
resource "cloudflare_zero_trust_tunnel_cloudflared" "gcp_tunnel" {
143139
account_id = var.cloudflare_account_id
144140
name = "Terraform GCP tunnel"
145-
tunnel_secret = random_bytes.tunnel_secret.base64
146141
}
147142
148143
# Reads the token used to run the tunnel on the server.

src/content/docs/cloudflare-one/connections/connect-networks/private-net/cloudflared/tunnel-virtual-networks.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,25 +93,15 @@ The following example demonstrates how to add two overlapping IP routes to Cloud
9393

9494
3. Create a Cloudflare Tunnel for each private network:
9595
```tf
96-
resource "random_bytes" "staging_tunnel_secret" {
97-
length = 64
98-
}
99-
10096
resource "cloudflare_zero_trust_tunnel_cloudflared" "staging_tunnel" {
10197
account_id = var.cloudflare_account_id
10298
name = "Staging tunnel"
103-
tunnel_secret = random_bytes.staging_tunnel_secret.base64
10499
config_src = "cloudflare"
105100
}
106101
107-
resource "random_bytes" "production_tunnel_secret" {
108-
length = 64
109-
}
110-
111102
resource "cloudflare_zero_trust_tunnel_cloudflared" "production_tunnel" {
112103
account_id = var.cloudflare_account_id
113104
name = "Production tunnel"
114-
tunnel_secret = random_bytes.production_tunnel_secret.base64
115105
config_src = "cloudflare"
116106
}
117107
```

src/content/docs/learning-paths/replace-vpn/connect-private-network/cloudflared.mdx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,12 @@ To connect your private network:
3030
1. Add the following permission to your [`cloudflare_api_token`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/api_token):
3131
- `Cloudflare Tunnel Write`
3232

33-
2. Generate a secret for the tunnel using Terraform's [`random` provider](https://registry.terraform.io/providers/hashicorp/random/latest/docs):
34-
35-
```tf
36-
resource "random_bytes" "tunnel_secret" {
37-
length = 64
38-
}
39-
```
40-
41-
3. Create a tunnel using the [`cloudflare_zero_trust_tunnel_cloudflare`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_tunnel_cloudflared) resource.
33+
2. Create a tunnel using the [`cloudflare_zero_trust_tunnel_cloudflare`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/zero_trust_tunnel_cloudflared) resource.
4234

4335
```tf
4436
resource "cloudflare_zero_trust_tunnel_cloudflared" "example_tunnel" {
4537
account_id = var.cloudflare_account_id
4638
name = "Example tunnel"
47-
tunnel_secret = random_bytes.tunnel_secret.base64
4839
config_src = "cloudflare"
4940
}
5041
```

src/content/partials/cloudflare-one/terraform/providers-v5.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ terraform {
1212
google = {
1313
source = "hashicorp/google"
1414
}
15-
random = {
16-
source = "hashicorp/random"
17-
}
1815
}
1916
required_version = ">= 1.2"
2017
}

0 commit comments

Comments
 (0)