-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fed7cb7
commit 621e98d
Showing
17 changed files
with
103 additions
and
104 deletions.
There are no files selected for viewing
9 changes: 4 additions & 5 deletions
9
examples/data-sources/cloudflare_infrastructure_access_targets/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
data "cloudflare_infrastructure_access_targets" "example" { | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
# Query parameters | ||
hostname_contains = "example" | ||
ipv4 = "210.26.29.230" | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
hostname_contains = "example" | ||
ipv4 = "210.26.29.230" | ||
} | ||
|
||
# output the list of targets the data source contains | ||
output "targets" { | ||
value = data.cloudflare_infrastructure_access_targets.example.targets | ||
value = data.cloudflare_infrastructure_access_targets.example.targets | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Allowing access to `[email protected]` email address only | ||
resource "cloudflare_access_policy" "test_policy" { | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "staging policy" | ||
decision = "allow" | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "staging policy" | ||
decision = "allow" | ||
|
||
include { | ||
email = ["[email protected]"] | ||
|
@@ -16,9 +16,9 @@ resource "cloudflare_access_policy" "test_policy" { | |
# Allowing `[email protected]` to access but only when coming from a | ||
# specific IP. | ||
resource "cloudflare_access_policy" "test_policy" { | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "staging policy" | ||
decision = "allow" | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "staging policy" | ||
decision = "allow" | ||
|
||
include { | ||
email = ["[email protected]"] | ||
|
@@ -32,10 +32,10 @@ resource "cloudflare_access_policy" "test_policy" { | |
# Access policy for an infrastructure application | ||
resource "cloudflare_access_policy" "infra-app-example-allow" { | ||
application_id = cloudflare_zero_trust_access_application.infra-app-example.id | ||
account_id = "0da42c8d2132a9ddaf714f9e7c920711" | ||
name = "infra-app-example-allow" | ||
decision = "allow" | ||
precedence = 1 | ||
account_id = "0da42c8d2132a9ddaf714f9e7c920711" | ||
name = "infra-app-example-allow" | ||
decision = "allow" | ||
precedence = 1 | ||
|
||
include { | ||
email = ["[email protected]"] | ||
|
@@ -53,12 +53,12 @@ resource "cloudflare_zero_trust_access_application" "infra-app-example" { | |
account_id = "0da42c8d2132a9ddaf714f9e7c920711" | ||
name = "infra-app" | ||
type = "infrastructure" | ||
|
||
target_criteria { | ||
port = 22 | ||
protocol = "SSH" | ||
target_attributes { | ||
name = "hostname" | ||
name = "hostname" | ||
values = ["tfgo-tests-useast", "tfgo-tests-uswest"] | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
# HTTPS Healthcheck | ||
resource "cloudflare_healthcheck" "http_health_check" { | ||
zone_id = var.cloudflare_zone_id | ||
name = "http-health-check" | ||
zone_id = var.cloudflare_zone_id | ||
name = "http-health-check" | ||
description = "example http health check" | ||
address = "example.com" | ||
suspended = false | ||
address = "example.com" | ||
suspended = false | ||
check_regions = [ | ||
"WEU", | ||
"EEU" | ||
] | ||
type = "HTTPS" | ||
port = 443 | ||
method = "GET" | ||
path = "/health" | ||
type = "HTTPS" | ||
port = 443 | ||
method = "GET" | ||
path = "/health" | ||
expected_body = "alive" | ||
expected_codes = [ | ||
"2xx", | ||
"301" | ||
] | ||
follow_redirects = true | ||
allow_insecure = false | ||
allow_insecure = false | ||
header { | ||
header = "Host" | ||
values = ["example.com"] | ||
} | ||
timeout = 10 | ||
retries = 2 | ||
interval = 60 | ||
consecutive_fails = 3 | ||
timeout = 10 | ||
retries = 2 | ||
interval = 60 | ||
consecutive_fails = 3 | ||
consecutive_successes = 2 | ||
} | ||
|
||
# TCP Healthcheck | ||
resource "cloudflare_healthcheck" "tcp_health_check" { | ||
zone_id = var.cloudflare_zone_id | ||
name = "tcp-health-check" | ||
zone_id = var.cloudflare_zone_id | ||
name = "tcp-health-check" | ||
description = "example tcp health check" | ||
address = "example.com" | ||
suspended = false | ||
address = "example.com" | ||
suspended = false | ||
check_regions = [ | ||
"WEU", | ||
"EEU" | ||
] | ||
type = "TCP" | ||
port = 22 | ||
method = "connection_established" | ||
timeout = 10 | ||
retries = 2 | ||
interval = 60 | ||
consecutive_fails = 3 | ||
type = "TCP" | ||
port = 22 | ||
method = "connection_established" | ||
timeout = 10 | ||
retries = 2 | ||
interval = 60 | ||
consecutive_fails = 3 | ||
consecutive_successes = 2 | ||
} |
36 changes: 18 additions & 18 deletions
36
examples/resources/cloudflare_infrastructure_access_target/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
resource "cloudflare_infrastructure_access_target" "example" { | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
hostname = "example-target" | ||
ip = { | ||
ipv4 = { | ||
ip_addr = "210.26.29.230" | ||
virtual_network_id = "238dccd1-149b-463d-8228-560ab83a54fd" | ||
} | ||
ipv6 = { | ||
ip_addr = "24c0:64e8:f0b4:8dbf:7104:72b0:ef8f:f5e0" | ||
virtual_network_id = "238dccd1-149b-463d-8228-560ab83a54fd" | ||
} | ||
} | ||
hostname = "example-target" | ||
ip = { | ||
ipv4 = { | ||
ip_addr = "210.26.29.230" | ||
virtual_network_id = "238dccd1-149b-463d-8228-560ab83a54fd" | ||
} | ||
ipv6 = { | ||
ip_addr = "24c0:64e8:f0b4:8dbf:7104:72b0:ef8f:f5e0" | ||
virtual_network_id = "238dccd1-149b-463d-8228-560ab83a54fd" | ||
} | ||
} | ||
} | ||
|
||
resource "cloudflare_infrastructure_access_target" "ipv4_only_example" { | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
hostname = "example-ipv4-only" | ||
ip = { | ||
ipv4 = { | ||
ip_addr = "210.26.29.230" | ||
virtual_network_id = "238dccd1-149b-463d-8228-560ab83a54fd" | ||
} | ||
} | ||
hostname = "example-ipv4-only" | ||
ip = { | ||
ipv4 = { | ||
ip_addr = "210.26.29.230" | ||
virtual_network_id = "238dccd1-149b-463d-8228-560ab83a54fd" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,7 @@ resource "cloudflare_list" "example" { | |
|
||
item { | ||
value { | ||
asn = 989 | ||
asn = 989 | ||
} | ||
comment = "two" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
examples/resources/cloudflare_observatory_scheduled_test/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
resource "cloudflare_observatory_scheduled_test" "example" { | ||
zone_id = "0da42c8d2132a9ddaf714f9e7c920711" | ||
url = "example.com" | ||
region = "us-central1" | ||
zone_id = "0da42c8d2132a9ddaf714f9e7c920711" | ||
url = "example.com" | ||
region = "us-central1" | ||
frequency = "WEEKLY" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
examples/resources/cloudflare_tunnel_virtual_network/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
resource "cloudflare_tunnel_virtual_network" "example" { | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "vnet-for-documentation" | ||
comment = "New tunnel virtual network for documentation" | ||
name = "vnet-for-documentation" | ||
comment = "New tunnel virtual network for documentation" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
examples/resources/cloudflare_waiting_room_event/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Waiting Room Event | ||
resource "cloudflare_waiting_room_event" "example" { | ||
zone_id = "0da42c8d2132a9ddaf714f9e7c920711" | ||
waiting_room_id = "d41d8cd98f00b204e9800998ecf8427e" | ||
name = "foo" | ||
event_start_time = "2006-01-02T15:04:05Z" | ||
event_end_time = "2006-01-02T20:04:05Z" | ||
zone_id = "0da42c8d2132a9ddaf714f9e7c920711" | ||
waiting_room_id = "d41d8cd98f00b204e9800998ecf8427e" | ||
name = "foo" | ||
event_start_time = "2006-01-02T15:04:05Z" | ||
event_end_time = "2006-01-02T20:04:05Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Allowing access to `[email protected]` email address only | ||
resource "cloudflare_zero_trust_access_policy" "test_policy" { | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "staging policy" | ||
decision = "allow" | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "staging policy" | ||
decision = "allow" | ||
|
||
include { | ||
email = ["[email protected]"] | ||
|
@@ -16,9 +16,9 @@ resource "cloudflare_zero_trust_access_policy" "test_policy" { | |
# Allowing `[email protected]` to access but only when coming from a | ||
# specific IP. | ||
resource "cloudflare_zero_trust_access_policy" "test_policy" { | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "staging policy" | ||
decision = "allow" | ||
account_id = "f037e56e89293a057740de681ac9abbe" | ||
name = "staging policy" | ||
decision = "allow" | ||
|
||
include { | ||
email = ["[email protected]"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.