Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for zone cache variants #1454

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions website/cloudflare.erb
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@
<li<%= sidebar_current("docs-cloudflare-resource-zone") %>>
<a href="/docs/providers/cloudflare/r/zone.html">cloudflare_zone</a>
</li>
<li<%= sidebar_current("docs-cloudflare-resource-zone-cache-variants") %>>
<a href="/docs/providers/cloudflare/r/zone_cache_variants.html">cloudflare_zone_cache_variants</a>
</li>
<li<%= sidebar_current("docs-cloudflare-resource-zone-lockdown") %>>
<a href="/docs/providers/cloudflare/r/zone_lockdown.html">cloudflare_zone_lockdown</a>
</li>
Expand Down
49 changes: 49 additions & 0 deletions website/docs/r/zone_cache_variants.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
layout: "cloudflare"
page_title: "Cloudflare: cloudflare_zone_cache_variants"
sidebar_current: "docs-cloudflare-resource-zone-cache-variants"
description: |-
Provides a resource which customizes Cloudflare zone cache variants setting.
---

# cloudflare_zone_cache_variants

Provides a resource which customizes Cloudflare zone cache variants.

## Example Usage

```hcl
resource "cloudflare_zone_cache_variants" "example" {
zone_id = "7df50664b7f90274f4d77cdfee701380"

avif = ["image/avif", "image/webp"]
bmp = ["image/bmp", "image/webp"]
gif = ["image/gif", "image/webp"]
jpeg = ["image/jpeg", "image/webp"]
jpg = ["image/jpg", "image/webp"]
jpg2 = ["image/jpg2", "image/webp"]
jp2 = ["image/jp2", "image/webp"]
png = ["image/png", "image/webp"]
tiff = ["image/tiff", "image/webp"]
tif = ["image/tif", "image/webp"]
webp = ["image/jpeg", "image/webp"]
}
```

## Argument Reference

The following arguments are supported:

* `zone_id` - (Required) The ID of the DNS zone in which to apply the cache variants setting
* `avif` - (Optional) List of strings with the MIME types of all the variants that should be served for avif
* `bmp` - (Optional) List of strings with the MIME types of all the variants that should be served for bmp
* `gif` - (Optional) List of strings with the MIME types of all the variants that should be served for gif
* `jpeg` - (Optional) List of strings with the MIME types of all the variants that should be served for jpeg
* `jpg` - (Optional) List of strings with the MIME types of all the variants that should be served for jpg
* `jpg2` - (Optional) List of strings with the MIME types of all the variants that should be served for jpg2
* `jp2` - (Optional) List of strings with the MIME types of all the variants that should be served for jp2
* `png` - (Optional) List of strings with the MIME types of all the variants that should be served for png
* `tiff` - (Optional) List of strings with the MIME types of all the variants that should be served for tiff
* `tif` - (Optional) List of strings with the MIME types of all the variants that should be served for tif
* `webp` - (Optional) List of strings with the MIME types of all the variants that should be served for webp