Skip to content

Commit

Permalink
make docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Sep 30, 2024
1 parent 621e98d commit 2cbdc1f
Show file tree
Hide file tree
Showing 17 changed files with 103 additions and 104 deletions.
9 changes: 4 additions & 5 deletions docs/data-sources/infrastructure_access_targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ Use this data source to retrieve all Infrastructure Access Targets.

```terraform
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
}
```
<!-- schema generated by tfplugindocs -->
Expand Down
16 changes: 8 additions & 8 deletions docs/resources/access_application.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ resource "cloudflare_access_application" "staging_app" {
type = "self_hosted"
session_duration = "24h"
auto_redirect_to_identity = false
policies = [
cloudflare_access_policy.example_1.id,
cloudflare_access_policy.example_2.id
policies = [
cloudflare_access_policy.example_1.id,
cloudflare_access_policy.example_2.id
]
}
Expand All @@ -42,9 +42,9 @@ resource "cloudflare_access_application" "staging_app" {
domain = "staging.example.com"
type = "self_hosted"
session_duration = "24h"
policies = [
cloudflare_access_policy.example_1.id,
cloudflare_access_policy.example_2.id
policies = [
cloudflare_access_policy.example_1.id,
cloudflare_access_policy.example_2.id
]
cors_headers {
allowed_methods = ["GET", "POST", "OPTIONS"]
Expand All @@ -59,12 +59,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"]
}
}
Expand Down
24 changes: 12 additions & 12 deletions docs/resources/access_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ a particular resource.
```terraform
# 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]"]
Expand All @@ -42,9 +42,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]"]
Expand All @@ -58,10 +58,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]"]
Expand All @@ -79,12 +79,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"]
}
}
Expand Down
48 changes: 24 additions & 24 deletions docs/resources/healthcheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,55 +16,55 @@ without needing a Cloudflare Load Balancer.
```terraform
# 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
}
```
Expand Down
36 changes: 18 additions & 18 deletions docs/resources/infrastructure_access_target.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,28 @@ The [Infrastructure Access Target](https://developers.cloudflare.com/cloudflare-
```terraform
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"
}
}
}
```
<!-- schema generated by tfplugindocs -->
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ resource "cloudflare_list" "example" {
item {
value {
asn = 989
asn = 989
}
comment = "two"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/list_item.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "cloudflare_list_item" "example_asn_item" {
account_id = "f037e56e89293a057740de681ac9abbe"
list_id = cloudflare_list.example_asn_list.id
comment = "List Item Comment"
asn = 6789
asn = 6789
}
# Hostname List
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/observatory_scheduled_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Provides a Cloudflare Observatory Scheduled Test resource.

```terraform
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"
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/ruleset.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ resource "cloudflare_ruleset" "cache_settings_example" {
include = ["habc", "hdef"]
check_presence = ["habc_t", "hdef_t"]
exclude_origin = true
contains = {
contains = {
"accept" = ["image/webp", "image/png"]
"accept-encoding" = ["br", "zstd"]
"some-header" = ["some-value", "some-other-value"]
Expand All @@ -320,7 +320,7 @@ resource "cloudflare_ruleset" "cache_settings_example" {
}
}
cache_reserve = {
eligible = true
eligible = true
minimum_file_size = 100000
}
origin_error_page_passthru = false
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/teams_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ resource "cloudflare_teams_account" "example" {
}
proxy {
tcp = true
udp = true
root_ca = true
virtual_ip = false
tcp = true
udp = true
root_ca = true
virtual_ip = false
disable_for_time = 3600
}
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/tunnel_virtual_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ private IPs in your origins.
```terraform
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"
}
```
<!-- schema generated by tfplugindocs -->
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/waiting_room.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ resource "cloudflare_waiting_room" "example" {
host = "shop2.example.com"
}
queueing_status_code = 200
queueing_status_code = 200
enabled_origin_commands = ["revoke"]
}
Expand Down
10 changes: 5 additions & 5 deletions docs/resources/waiting_room_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ Provides a Cloudflare Waiting Room Event resource.
```terraform
# 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"
}
```
<!-- schema generated by tfplugindocs -->
Expand Down
12 changes: 6 additions & 6 deletions docs/resources/zero_trust_access_application.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ resource "cloudflare_zero_trust_access_application" "staging_app" {
type = "self_hosted"
session_duration = "24h"
auto_redirect_to_identity = false
policies = [
cloudflare_access_policy.example_1.id,
cloudflare_access_policy.example_2.id
policies = [
cloudflare_access_policy.example_1.id,
cloudflare_access_policy.example_2.id
]
}
Expand All @@ -42,9 +42,9 @@ resource "cloudflare_zero_trust_access_application" "staging_app" {
domain = "staging.example.com"
type = "self_hosted"
session_duration = "24h"
policies = [
cloudflare_access_policy.example_1.id,
cloudflare_access_policy.example_2.id
policies = [
cloudflare_access_policy.example_1.id,
cloudflare_access_policy.example_2.id
]
cors_headers {
allowed_methods = ["GET", "POST", "OPTIONS"]
Expand Down
12 changes: 6 additions & 6 deletions docs/resources/zero_trust_access_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ a particular resource.
```terraform
# 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]"]
Expand All @@ -42,9 +42,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]"]
Expand Down
Loading

0 comments on commit 2cbdc1f

Please sign in to comment.