Skip to content

Commit cafad57

Browse files
author
Matheus Politano
committed
chore: update doc
1 parent 72d079c commit cafad57

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

docs/data-sources/cdn_distribution.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Read-Only:
5151

5252
- `backend` (Attributes) The configured backend for the distribution (see [below for nested schema](#nestedatt--config--backend))
5353
- `optimizer` (Attributes) Configuration for the Image Optimizer. This is a paid feature that automatically optimizes images to reduce their file size for faster delivery, leading to improved website performance and a better user experience. (see [below for nested schema](#nestedatt--config--optimizer))
54+
- `redirects` (Attributes) A wrapper for a list of redirect rules that allows for redirect settings on a distribution (see [below for nested schema](#nestedatt--config--redirects))
5455
- `regions` (List of String) The configured regions where content will be hosted
5556

5657
<a id="nestedatt--config--backend"></a>
@@ -74,6 +75,36 @@ Read-Only:
7475
- `enabled` (Boolean)
7576

7677

78+
<a id="nestedatt--config--redirects"></a>
79+
### Nested Schema for `config.redirects`
80+
81+
Read-Only:
82+
83+
- `rules` (Attributes List) A list of redirect rules. The order of rules matters for evaluation (see [below for nested schema](#nestedatt--config--redirects--rules))
84+
85+
<a id="nestedatt--config--redirects--rules"></a>
86+
### Nested Schema for `config.redirects.rules`
87+
88+
Read-Only:
89+
90+
- `description` (String) An optional description for the redirect rule
91+
- `enabled` (Boolean) A toggle to enable or disable the redirect rule. Default to true
92+
- `matchers` (Attributes List) A list of matchers that define when this rule should apply. At least one matcher is required (see [below for nested schema](#nestedatt--config--redirects--rules--matchers))
93+
- `rule_match_condition` (String) Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
94+
- `status_code` (Number) The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
95+
- `target_url` (String) The target URL to redirect to. Must be a valid URI
96+
97+
<a id="nestedatt--config--redirects--rules--matchers"></a>
98+
### Nested Schema for `config.redirects.rules.matchers`
99+
100+
Read-Only:
101+
102+
- `value_match_condition` (String) Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
103+
- `values` (List of String) A list of glob patterns to match against the request path. At least one value is required. Examples: "/shop/*" or "*/img/*"
104+
105+
106+
107+
77108

78109
<a id="nestedatt--domains"></a>
79110
### Nested Schema for `domains`

docs/resources/cdn_distribution.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Optional:
9696

9797
- `blocked_countries` (List of String) The configured countries where distribution of content is blocked
9898
- `optimizer` (Attributes) Configuration for the Image Optimizer. This is a paid feature that automatically optimizes images to reduce their file size for faster delivery, leading to improved website performance and a better user experience. (see [below for nested schema](#nestedatt--config--optimizer))
99+
- `redirects` (Attributes) A wrapper for a list of redirect rules that allows for redirect settings on a distribution (see [below for nested schema](#nestedatt--config--redirects))
99100

100101
<a id="nestedatt--config--backend"></a>
101102
### Nested Schema for `config.backend`
@@ -131,6 +132,42 @@ Optional:
131132
- `enabled` (Boolean)
132133

133134

135+
<a id="nestedatt--config--redirects"></a>
136+
### Nested Schema for `config.redirects`
137+
138+
Required:
139+
140+
- `rules` (Attributes List) A list of redirect rules. The order of rules matters for evaluation (see [below for nested schema](#nestedatt--config--redirects--rules))
141+
142+
<a id="nestedatt--config--redirects--rules"></a>
143+
### Nested Schema for `config.redirects.rules`
144+
145+
Required:
146+
147+
- `matchers` (Attributes List) A list of matchers that define when this rule should apply. At least one matcher is required (see [below for nested schema](#nestedatt--config--redirects--rules--matchers))
148+
- `status_code` (Number) The HTTP status code for the redirect. Must be one of 301, 302, 303, 307, or 308.
149+
- `target_url` (String) The target URL to redirect to. Must be a valid URI
150+
151+
Optional:
152+
153+
- `description` (String) An optional description for the redirect rule
154+
- `enabled` (Boolean) A toggle to enable or disable the redirect rule. Default to true
155+
- `rule_match_condition` (String) Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
156+
157+
<a id="nestedatt--config--redirects--rules--matchers"></a>
158+
### Nested Schema for `config.redirects.rules.matchers`
159+
160+
Required:
161+
162+
- `values` (List of String) A list of glob patterns to match against the request path. At least one value is required. Examples: "/shop/*" or "*/img/*"
163+
164+
Optional:
165+
166+
- `value_match_condition` (String) Defines how multiple matchers within this rule are combined (ALL, ANY, NONE). Defaults to ANY.
167+
168+
169+
170+
134171

135172
<a id="nestedatt--domains"></a>
136173
### Nested Schema for `domains`

0 commit comments

Comments
 (0)