-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-content-scanning
- Loading branch information
Showing
23 changed files
with
599 additions
and
245 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:new-resource | ||
cloudflare_content_scanning_expression | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:enhancement | ||
resource/access_application: support multi-valued + Access service token authentication for SCIM provisioning to Access applications | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
resource/cloudflare_ruleset: handle when `disable_stale_while_updating` is an empty object but not nil | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:note | ||
resource/cloudflare_teams_location: remove unusable `policy_ids` attribute | ||
``` |
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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
page_title: "cloudflare_content_scanning_expression Resource - Cloudflare" | ||
subcategory: "" | ||
description: |- | ||
Provides a Cloudflare Content Scanning Expression resource for managing custom scan expression within a specific zone. | ||
--- | ||
|
||
# cloudflare_content_scanning_expression (Resource) | ||
|
||
Provides a Cloudflare Content Scanning Expression resource for managing custom scan expression within a specific zone. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Enable Content Scanning before trying to add custom scan expressions | ||
resource "cloudflare_content_scanning" "example" { | ||
zone_id = "399c6f4950c01a5a141b99ff7fbcbd8b" | ||
enabled = true | ||
} | ||
resource "cloudflare_content_scanning_expression" "first_example" { | ||
zone_id = cloudflare_content_scanning.example.zone_id | ||
payload = "lookup_json_string(http.request.body.raw, \"file\")" | ||
} | ||
resource "cloudflare_content_scanning_expression" "second_example" { | ||
zone_id = cloudflare_content_scanning.example.zone_id | ||
payload = "lookup_json_string(http.request.body.raw, \"document\")" | ||
} | ||
``` | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `payload` (String) Custom scan expression to tell the content scanner where to find the content objects. | ||
- `zone_id` (String) The zone identifier to target for the resource. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The identifier of this resource. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import cloudflare_content_scanning_expression.example <zone_id>/<resource_id> | ||
``` |
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
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
1 change: 1 addition & 0 deletions
1
examples/resources/cloudflare_content_scanning_expression/import.sh
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import cloudflare_content_scanning_expression.example <zone_id>/<resource_id> |
15 changes: 15 additions & 0 deletions
15
examples/resources/cloudflare_content_scanning_expression/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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Enable Content Scanning before trying to add custom scan expressions | ||
resource "cloudflare_content_scanning" "example" { | ||
zone_id = "399c6f4950c01a5a141b99ff7fbcbd8b" | ||
enabled = true | ||
} | ||
|
||
resource "cloudflare_content_scanning_expression" "first_example" { | ||
zone_id = cloudflare_content_scanning.example.zone_id | ||
payload = "lookup_json_string(http.request.body.raw, \"file\")" | ||
} | ||
|
||
resource "cloudflare_content_scanning_expression" "second_example" { | ||
zone_id = cloudflare_content_scanning.example.zone_id | ||
payload = "lookup_json_string(http.request.body.raw, \"document\")" | ||
} |
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
9 changes: 9 additions & 0 deletions
9
internal/framework/service/content_scanning_expression/model.go
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package content_scanning_expression | ||
|
||
import "github.com/hashicorp/terraform-plugin-framework/types" | ||
|
||
type ContentScanningExpressionModel struct { | ||
ZoneID types.String `tfsdk:"zone_id"` | ||
ID types.String `tfsdk:"id"` | ||
Payload types.String `tfsdk:"payload"` | ||
} |
Oops, something went wrong.