Skip to content

Commit af6b3e8

Browse files
stainless-app[bot]jacobbednarz1000hzmeorphisdackerman
authored
release: 5.4.0 (#5527)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Jacob Bednarz <[email protected]> Co-authored-by: Jacob Bednarz <[email protected]> Co-authored-by: Cina Saffary <[email protected]> Co-authored-by: meorphis <[email protected]> Co-authored-by: David Ackerman <[email protected]>
1 parent 9f0cd35 commit af6b3e8

File tree

630 files changed

+5748
-7869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

630 files changed

+5748
-7869
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: CI
22
on:
33
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
9-
- next
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
1010

1111
jobs:
1212
lint:
13-
runs-on: lx64
13+
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
1414
steps:
1515
- uses: actions/checkout@v4
1616

@@ -26,7 +26,7 @@ jobs:
2626
run: ./scripts/lint
2727

2828
test:
29-
runs-on: lx64
29+
runs-on: ${{ github.repository == 'stainless-sdks/cloudflare-terraform' && 'depot-ubuntu-24.04' || 'lx64' }}
3030
steps:
3131
- uses: actions/checkout@v4
3232

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "5.3.0"
2+
".": "5.4.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1707
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6097206cf3de7c784cff3dff4b60492b70824915c5bcb712111a5b355f9349dc.yml
3-
openapi_spec_hash: 2ea12f49a88b823d2dca959b5112e50c
4-
config_hash: 6513c164fa0cced545d790fbd720f666
1+
configured_endpoints: 1713
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1e19b3654a9835d48a6f365f6cbd1f564da9e0f1c82c5d1e3eaf1fee54e87d11.yml
3+
openapi_spec_hash: f340abaa8fa4e47f15da3109aa50529b
4+
config_hash: 92ed089a306b4e31a35318562d26d51a

CHANGELOG.md

Lines changed: 293 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# Cloudflare Terraform Provider
22

3-
## Requirements
4-
5-
Terraform 1.2 or newer. We recommend running the [latest version](https://developer.hashicorp.com/terraform/downloads?product_intent=terraform) for optimal compatibility with the Cloudflare provider. Terraform versions older than 1.2 have known issues with newer features and internals.
3+
The [Cloudflare Terraform provider](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs) provides convenient access to
4+
the [Cloudflare REST API](https://developers.cloudflare.com/api) from Terraform.
65

7-
## Documentation
6+
## Requirements
87

9-
Full, comprehensive documentation is available on the [Terraform Registry](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs). [API documentation](https://api.cloudflare.com) and [Developer documentation](https://developers.cloudflare.com) is also available
10-
for non-Terraform or service specific information.
8+
This provider requires Terraform CLI 1.0 or later. You can [install it for your system](https://developer.hashicorp.com/terraform/install)
9+
on Hashicorp's website.
1110

1211
## Usage
1312

13+
Add the following to your `main.tf` file:
14+
1415
<!-- x-release-please-start-version -->
1516

1617
```hcl
@@ -26,7 +27,14 @@ terraform {
2627
2728
# Initialize the provider
2829
provider "cloudflare" {
30+
# The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).
2931
api_token = "Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY" # or set CLOUDFLARE_API_TOKEN env variable
32+
# The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
33+
api_key = "144c9defac04969c7bfad8efaa8ea194" # or set CLOUDFLARE_API_KEY env variable
34+
# The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
35+
api_email = "[email protected]" # or set CLOUDFLARE_EMAIL env variable
36+
# Used when interacting with the Origin CA certificates API. [View/change your key](https://developers.cloudflare.com/fundamentals/api/get-started/ca-keys/#viewchange-your-origin-ca-keys).
37+
user_service_key = "v1.0-144c9defac04969c7bfad8ef-631a41d003a32d25fe878081ef365c49503f7fada600da935e2851a1c7326084b85cbf6429c4b859de8475731dc92a9c329631e6d59e6c73da7b198497172b4cefe071d90d0f5d2719" # or set CLOUDFLARE_API_USER_SERVICE_KEY env variable
3038
}
3139
3240
# Configure a resource
@@ -43,15 +51,32 @@ resource "cloudflare_zone" "example_zone" {
4351

4452
Initialize your project by running `terraform init` in the directory.
4553

46-
## Migrating to Terraform from using the Dashboard
54+
Additional examples can be found in the [./examples](./examples) folder within this repository, and you can
55+
refer to the full documentation on [the Terraform Registry](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs).
56+
57+
### Provider Options
58+
59+
When you initialize the provider, the following options are supported. It is recommended to use environment variables for sensitive values like access tokens.
60+
If an environment variable is provided, then the option does not need to be set in the terraform source.
61+
62+
| Property | Environment variable | Required | Default value |
63+
| ---------------- | --------------------------------- | -------- | ------------- |
64+
| user_service_key | `CLOUDFLARE_API_USER_SERVICE_KEY` | false ||
65+
| api_token | `CLOUDFLARE_API_TOKEN` | false ||
66+
| api_key | `CLOUDFLARE_API_KEY` | false ||
67+
| api_email | `CLOUDFLARE_EMAIL` | false ||
68+
69+
## Semantic versioning
70+
71+
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
72+
73+
1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
74+
2. Changes that we do not expect to impact the vast majority of users in practice.
4775

48-
Do you have an existing Cloudflare account (or many!) that you'd like to transition
49-
to be managed via Terraform? Check out [cf-terraforming](https://github.com/cloudflare/cf-terraforming)
50-
which is a tool Cloudflare has built to help dump the existing resources and
51-
import them into Terraform.
76+
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
5277

53-
## Maintenance
78+
We are keen for your feedback; please open an [issue](https://www.github.com/cloudflare/terraform-provider-cloudflare/issues) with questions, bugs, or suggestions.
5479

55-
This SDK is actively maintained, however, many issues are tracked outside of GitHub on internal Cloudflare systems. Members of the community are welcome to join and discuss your issues during our weekly triage meetings. For urgent issues, please contact [Cloudflare support](https://www.support.cloudflare.com/s/?language=en_US).
80+
## Contributing
5681

57-
* [Community triage meeting](https://calendar.google.com/calendar/embed?src=c_dbf6ce250643f2e60f806d28f3fc09a9de24cbe0ab3ffb699838303d2adfc9e4%40group.calendar.google.com&ctz=America%2FLos_Angeles)
82+
See [the contributing documentation](./CONTRIBUTING.md).

docs/data-sources/access_rule.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ data "cloudflare_access_rule" "example_access_rule" {
2626

2727
- `account_id` (String) The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
2828
- `filter` (Attributes) (see [below for nested schema](#nestedatt--filter))
29-
- `rule_id` (String) Unique identifier for a rule
29+
- `rule_id` (String) Unique identifier for a rule.
3030
- `zone_id` (String) The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
3131

3232
### Read-Only
3333

3434
- `allowed_modes` (List of String) The available actions that a rule can apply to a matched request.
3535
- `configuration` (Attributes) The rule configuration. (see [below for nested schema](#nestedatt--configuration))
3636
- `created_on` (String) The timestamp of when the rule was created.
37-
- `id` (String) Unique identifier for a rule
37+
- `id` (String) Unique identifier for a rule.
3838
- `mode` (String) The action to apply to a matched request.
3939
Available values: "block", "challenge", "whitelist", "js_challenge", "managed_challenge".
4040
- `modified_on` (String) The timestamp of when the rule was last modified.
@@ -47,25 +47,25 @@ Available values: "block", "challenge", "whitelist", "js_challenge", "managed_ch
4747
Optional:
4848

4949
- `configuration` (Attributes) (see [below for nested schema](#nestedatt--filter--configuration))
50-
- `direction` (String) The direction used to sort returned rules.
50+
- `direction` (String) Defines the direction used to sort returned rules.
5151
Available values: "asc", "desc".
52-
- `match` (String) When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.
52+
- `match` (String) Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.
5353
Available values: "any", "all".
5454
- `mode` (String) The action to apply to a matched request.
5555
Available values: "block", "challenge", "whitelist", "js_challenge", "managed_challenge".
56-
- `notes` (String) The string to search for in the notes of existing IP Access rules.
56+
- `notes` (String) Defines the string to search for in the notes of existing IP Access rules.
5757
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.
58-
- `order` (String) The field used to sort returned rules.
58+
- `order` (String) Defines the field used to sort returned rules.
5959
Available values: "configuration.target", "configuration.value", "mode".
6060

6161
<a id="nestedatt--filter--configuration"></a>
6262
### Nested Schema for `filter.configuration`
6363

6464
Optional:
6565

66-
- `target` (String) The target to search in existing rules.
66+
- `target` (String) Defines the target to search in existing rules.
6767
Available values: "ip", "ip_range", "asn", "country".
68-
- `value` (String) The target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.
68+
- `value` (String) Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.
6969
Notes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code.
7070

7171

@@ -86,8 +86,8 @@ Available values: "ip".
8686
Read-Only:
8787

8888
- `email` (String) The contact email address of the user.
89-
- `id` (String) Identifier
90-
- `type` (String) The scope of the rule.
89+
- `id` (String) Defines an identifier.
90+
- `type` (String) Defines the scope of the rule.
9191
Available values: "user", "organization".
9292

9393

docs/data-sources/access_rules.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ data "cloudflare_access_rules" "example_access_rules" {
3333

3434
- `account_id` (String) The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
3535
- `configuration` (Attributes) (see [below for nested schema](#nestedatt--configuration))
36-
- `direction` (String) The direction used to sort returned rules.
36+
- `direction` (String) Defines the direction used to sort returned rules.
3737
Available values: "asc", "desc".
38-
- `match` (String) When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.
38+
- `match` (String) Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.
3939
Available values: "any", "all".
4040
- `max_items` (Number) Max items to fetch, default: 1000
4141
- `mode` (String) The action to apply to a matched request.
4242
Available values: "block", "challenge", "whitelist", "js_challenge", "managed_challenge".
43-
- `notes` (String) The string to search for in the notes of existing IP Access rules.
43+
- `notes` (String) Defines the string to search for in the notes of existing IP Access rules.
4444
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.
45-
- `order` (String) The field used to sort returned rules.
45+
- `order` (String) Defines the field used to sort returned rules.
4646
Available values: "configuration.target", "configuration.value", "mode".
4747
- `zone_id` (String) The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
4848

@@ -55,9 +55,9 @@ Available values: "configuration.target", "configuration.value", "mode".
5555

5656
Optional:
5757

58-
- `target` (String) The target to search in existing rules.
58+
- `target` (String) Defines the target to search in existing rules.
5959
Available values: "ip", "ip_range", "asn", "country".
60-
- `value` (String) The target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.
60+
- `value` (String) Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.
6161
Notes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code.
6262

6363

@@ -92,8 +92,8 @@ Available values: "ip".
9292
Read-Only:
9393

9494
- `email` (String) The contact email address of the user.
95-
- `id` (String) Identifier
96-
- `type` (String) The scope of the rule.
95+
- `id` (String) Defines an identifier.
96+
- `type` (String) Defines the scope of the rule.
9797
Available values: "user", "organization".
9898

9999

docs/data-sources/account_dns_settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ data "cloudflare_account_dns_settings" "example_account_dns_settings" {
2222

2323
### Required
2424

25-
- `account_id` (String) Identifier
25+
- `account_id` (String) Identifier.
2626

2727
### Read-Only
2828

docs/data-sources/account_dns_settings_internal_view.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@ data "cloudflare_account_dns_settings_internal_view" "example_account_dns_settin
2323

2424
### Required
2525

26-
- `account_id` (String) Identifier
26+
- `account_id` (String) Identifier.
2727

2828
### Optional
2929

3030
- `filter` (Attributes) (see [below for nested schema](#nestedatt--filter))
31-
- `view_id` (String) Identifier
31+
- `view_id` (String) Identifier.
3232

3333
### Read-Only
3434

3535
- `created_time` (String) When the view was created.
36-
- `id` (String) Identifier
36+
- `id` (String) Identifier.
3737
- `modified_time` (String) When the view was last modified.
3838
- `name` (String) The name of the view.
3939
- `zones` (List of String) The list of zones linked to this view.

docs/data-sources/account_dns_settings_internal_views.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ data "cloudflare_account_dns_settings_internal_views" "example_account_dns_setti
3131

3232
### Required
3333

34-
- `account_id` (String) Identifier
34+
- `account_id` (String) Identifier.
3535

3636
### Optional
3737

@@ -67,7 +67,7 @@ Optional:
6767
Read-Only:
6868

6969
- `created_time` (String) When the view was created.
70-
- `id` (String) Identifier
70+
- `id` (String) Identifier.
7171
- `modified_time` (String) When the view was last modified.
7272
- `name` (String) The name of the view.
7373
- `zones` (List of String) The list of zones linked to this view.

0 commit comments

Comments
 (0)