Skip to content

Commit b3136cb

Browse files
Revert stripquery change (#2023)
* Add back requireds on stripquery (#3443) (#2022) * Add back requireds on stripquery * Move required to terraform.yaml, add description on empty blocks' * Fixed to preserve backwards compatibility * Remove last default in description * Default back to false in ansible urlmaps Signed-off-by: Modular Magician <[email protected]> * Remove notes on changelog about stripquery Co-authored-by: The Magician <[email protected]>
1 parent 8c1ab10 commit b3136cb

File tree

6 files changed

+69
-61
lines changed

6 files changed

+69
-61
lines changed

.changelog/3443.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ IMPROVEMENTS:
1414
* cloudfunctions: Added validation to label keys for `google_cloudfunctions_function` as API errors aren't useful. ([#2009](https://github.com/terraform-providers/terraform-provider-google-beta/pull/2009))
1515
* compute: Added support for `stateful_disk` to both `google_compute_instance_group_manager` and `google_compute_region_instance_group_manager`. ([#2006](https://github.com/terraform-providers/terraform-provider-google-beta/pull/2006))
1616
* compute: Added support for default URL redirects to `google_compute_url_map` and `google_compute_region_url_map` ([#1998](https://github.com/terraform-providers/terraform-provider-google-beta/pull/1998))
17-
* compute: Made `google_compute_url_map` and `google_compute_region_url_map` field `strip_query` optional and default false ([#1986](https://github.com/terraform-providers/terraform-provider-google-beta/pull/1986))
1817
* dataflow: Added `additional_experiments` field to `google_dataflow_job` ([#2005](https://github.com/terraform-providers/terraform-provider-google-beta/pull/2005))
1918
* dns: Added `service_directory_config` field to`google_dns_managed_zone` ([#1976](https://github.com/terraform-providers/terraform-provider-google-beta/pull/1976))
2019
* compute: Added update of `google_compute_backend_service` and `google_compute_backend_service` field `locality_lb_policy ([#2012](https://github.com/terraform-providers/terraform-provider-google-beta/pull/2012))

google-beta/resource_compute_region_url_map.go

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ defaultRouteAction must not be set.`,
7777
MaxItems: 1,
7878
Elem: &schema.Resource{
7979
Schema: map[string]*schema.Schema{
80+
"strip_query": {
81+
Type: schema.TypeBool,
82+
Required: true,
83+
Description: `If set to true, any accompanying query portion of the original URL is removed prior
84+
to redirecting the request. If set to false, the query portion of the original URL is
85+
retained.
86+
This field is required to ensure an empty block is not set. The normal default value is false.`,
87+
},
8088
"host_redirect": {
8189
Type: schema.TypeString,
8290
Optional: true,
@@ -123,14 +131,6 @@ will be retained.
123131
- PERMANENT_REDIRECT, which corresponds to 308. In this case,
124132
the request method will be retained. Possible values: ["FOUND", "MOVED_PERMANENTLY_DEFAULT", "PERMANENT_REDIRECT", "SEE_OTHER", "TEMPORARY_REDIRECT"]`,
125133
},
126-
"strip_query": {
127-
Type: schema.TypeBool,
128-
Optional: true,
129-
Description: `If set to true, any accompanying query portion of the original URL is removed prior
130-
to redirecting the request. If set to false, the query portion of the original URL is
131-
retained. The default is set to false.`,
132-
Default: false,
133-
},
134134
},
135135
},
136136
ExactlyOneOf: []string{"default_service", "default_url_redirect"},
@@ -177,6 +177,14 @@ defaultRouteAction must not be set.`,
177177
MaxItems: 1,
178178
Elem: &schema.Resource{
179179
Schema: map[string]*schema.Schema{
180+
"strip_query": {
181+
Type: schema.TypeBool,
182+
Required: true,
183+
Description: `If set to true, any accompanying query portion of the original URL is removed prior
184+
to redirecting the request. If set to false, the query portion of the original URL is
185+
retained.
186+
This field is required to ensure an empty block is not set. The normal default value is false.`,
187+
},
180188
"host_redirect": {
181189
Type: schema.TypeString,
182190
Optional: true,
@@ -223,14 +231,6 @@ will be retained.
223231
- PERMANENT_REDIRECT, which corresponds to 308. In this case,
224232
the request method will be retained. Possible values: ["FOUND", "MOVED_PERMANENTLY_DEFAULT", "PERMANENT_REDIRECT", "SEE_OTHER", "TEMPORARY_REDIRECT"]`,
225233
},
226-
"strip_query": {
227-
Type: schema.TypeBool,
228-
Optional: true,
229-
Description: `If set to true, any accompanying query portion of the original URL is removed prior
230-
to redirecting the request. If set to false, the query portion of the original URL is
231-
retained. The default is set to false.`,
232-
Default: false,
233-
},
234234
},
235235
},
236236
ExactlyOneOf: []string{},
@@ -706,6 +706,14 @@ be set.`,
706706
MaxItems: 1,
707707
Elem: &schema.Resource{
708708
Schema: map[string]*schema.Schema{
709+
"strip_query": {
710+
Type: schema.TypeBool,
711+
Required: true,
712+
Description: `If set to true, any accompanying query portion of the original URL is removed
713+
prior to redirecting the request. If set to false, the query portion of the
714+
original URL is retained.
715+
This field is required to ensure an empty block is not set. The normal default value is false.`,
716+
},
709717
"host_redirect": {
710718
Type: schema.TypeString,
711719
Optional: true,
@@ -755,14 +763,6 @@ will be retained.
755763
- PERMANENT_REDIRECT, which corresponds to 308. In this case,
756764
the request method will be retained. Possible values: ["FOUND", "MOVED_PERMANENTLY_DEFAULT", "PERMANENT_REDIRECT", "SEE_OTHER", "TEMPORARY_REDIRECT"]`,
757765
},
758-
"strip_query": {
759-
Type: schema.TypeBool,
760-
Optional: true,
761-
Description: `If set to true, any accompanying query portion of the original URL is removed
762-
prior to redirecting the request. If set to false, the query portion of the
763-
original URL is retained.`,
764-
Default: false,
765-
},
766766
},
767767
},
768768
},
@@ -1605,7 +1605,7 @@ the request method will be retained. Possible values: ["FOUND", "MOVED_PERMANENT
16051605
Optional: true,
16061606
Description: `If set to true, any accompanying query portion of the original URL is
16071607
removed prior to redirecting the request. If set to false, the query
1608-
portion of the original URL is retained. The default is set to false.`,
1608+
portion of the original URL is retained. The default value is false.`,
16091609
Default: false,
16101610
},
16111611
},

google-beta/resource_compute_url_map.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ defaultRouteAction must not be set.`,
7070
MaxItems: 1,
7171
Elem: &schema.Resource{
7272
Schema: map[string]*schema.Schema{
73+
"strip_query": {
74+
Type: schema.TypeBool,
75+
Required: true,
76+
Description: `If set to true, any accompanying query portion of the original URL is removed prior
77+
to redirecting the request. If set to false, the query portion of the original URL is
78+
retained. The default is set to false.
79+
This field is required to ensure an empty block is not set. The normal default value is false.`,
80+
},
7381
"host_redirect": {
7482
Type: schema.TypeString,
7583
Optional: true,
@@ -116,14 +124,6 @@ will be retained.
116124
- PERMANENT_REDIRECT, which corresponds to 308. In this case,
117125
the request method will be retained. Possible values: ["FOUND", "MOVED_PERMANENTLY_DEFAULT", "PERMANENT_REDIRECT", "SEE_OTHER", "TEMPORARY_REDIRECT"]`,
118126
},
119-
"strip_query": {
120-
Type: schema.TypeBool,
121-
Optional: true,
122-
Description: `If set to true, any accompanying query portion of the original URL is removed prior
123-
to redirecting the request. If set to false, the query portion of the original URL is
124-
retained. The default is set to false.`,
125-
Default: false,
126-
},
127127
},
128128
},
129129
ExactlyOneOf: []string{"default_service", "default_url_redirect"},
@@ -255,6 +255,14 @@ defaultRouteAction must not be set.`,
255255
MaxItems: 1,
256256
Elem: &schema.Resource{
257257
Schema: map[string]*schema.Schema{
258+
"strip_query": {
259+
Type: schema.TypeBool,
260+
Required: true,
261+
Description: `If set to true, any accompanying query portion of the original URL is removed prior
262+
to redirecting the request. If set to false, the query portion of the original URL is
263+
retained.
264+
This field is required to ensure an empty block is not set. The normal default value is false.`,
265+
},
258266
"host_redirect": {
259267
Type: schema.TypeString,
260268
Optional: true,
@@ -301,14 +309,6 @@ will be retained.
301309
- PERMANENT_REDIRECT, which corresponds to 308. In this case,
302310
the request method will be retained. Possible values: ["FOUND", "MOVED_PERMANENTLY_DEFAULT", "PERMANENT_REDIRECT", "SEE_OTHER", "TEMPORARY_REDIRECT"]`,
303311
},
304-
"strip_query": {
305-
Type: schema.TypeBool,
306-
Optional: true,
307-
Description: `If set to true, any accompanying query portion of the original URL is removed prior
308-
to redirecting the request. If set to false, the query portion of the original URL is
309-
retained. The default is set to false.`,
310-
Default: false,
311-
},
312312
},
313313
},
314314
ExactlyOneOf: []string{},
@@ -862,6 +862,14 @@ be set.`,
862862
MaxItems: 1,
863863
Elem: &schema.Resource{
864864
Schema: map[string]*schema.Schema{
865+
"strip_query": {
866+
Type: schema.TypeBool,
867+
Required: true,
868+
Description: `If set to true, any accompanying query portion of the original URL is
869+
removed prior to redirecting the request. If set to false, the query
870+
portion of the original URL is retained.
871+
This field is required to ensure an empty block is not set. The normal default value is false.`,
872+
},
865873
"host_redirect": {
866874
Type: schema.TypeString,
867875
Optional: true,
@@ -911,14 +919,6 @@ will be retained.
911919
- PERMANENT_REDIRECT, which corresponds to 308. In this case,
912920
the request method will be retained. Possible values: ["FOUND", "MOVED_PERMANENTLY_DEFAULT", "PERMANENT_REDIRECT", "SEE_OTHER", "TEMPORARY_REDIRECT"]`,
913921
},
914-
"strip_query": {
915-
Type: schema.TypeBool,
916-
Optional: true,
917-
Description: `If set to true, any accompanying query portion of the original URL is
918-
removed prior to redirecting the request. If set to false, the query
919-
portion of the original URL is retained. The default is set to false.`,
920-
Default: false,
921-
},
922922
},
923923
},
924924
},

website/docs/r/compute_region_url_map.html.markdown

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ The `url_redirect` block supports:
12481248
(Optional)
12491249
If set to true, any accompanying query portion of the original URL is
12501250
removed prior to redirecting the request. If set to false, the query
1251-
portion of the original URL is retained. The default is set to false.
1251+
portion of the original URL is retained. The default value is false.
12521252

12531253
The `path_rule` block supports:
12541254

@@ -1640,10 +1640,11 @@ The `url_redirect` block supports:
16401640
* `TEMPORARY_REDIRECT`
16411641

16421642
* `strip_query` -
1643-
(Optional)
1643+
(Required)
16441644
If set to true, any accompanying query portion of the original URL is removed
16451645
prior to redirecting the request. If set to false, the query portion of the
16461646
original URL is retained.
1647+
This field is required to ensure an empty block is not set. The normal default value is false.
16471648

16481649
The `default_url_redirect` block supports:
16491650

@@ -1694,10 +1695,11 @@ The `default_url_redirect` block supports:
16941695
* `TEMPORARY_REDIRECT`
16951696

16961697
* `strip_query` -
1697-
(Optional)
1698+
(Required)
16981699
If set to true, any accompanying query portion of the original URL is removed prior
16991700
to redirecting the request. If set to false, the query portion of the original URL is
1700-
retained. The default is set to false.
1701+
retained.
1702+
This field is required to ensure an empty block is not set. The normal default value is false.
17011703

17021704
The `test` block supports:
17031705

@@ -1766,10 +1768,11 @@ The `default_url_redirect` block supports:
17661768
* `TEMPORARY_REDIRECT`
17671769

17681770
* `strip_query` -
1769-
(Optional)
1771+
(Required)
17701772
If set to true, any accompanying query portion of the original URL is removed prior
17711773
to redirecting the request. If set to false, the query portion of the original URL is
1772-
retained. The default is set to false.
1774+
retained.
1775+
This field is required to ensure an empty block is not set. The normal default value is false.
17731776

17741777
## Attributes Reference
17751778

website/docs/r/compute_url_map.html.markdown

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,10 +1090,11 @@ The `url_redirect` block supports:
10901090
* `TEMPORARY_REDIRECT`
10911091

10921092
* `strip_query` -
1093-
(Optional)
1093+
(Required)
10941094
If set to true, any accompanying query portion of the original URL is
10951095
removed prior to redirecting the request. If set to false, the query
1096-
portion of the original URL is retained. The default is set to false.
1096+
portion of the original URL is retained.
1097+
This field is required to ensure an empty block is not set. The normal default value is false.
10971098

10981099
The `route_rules` block supports:
10991100

@@ -1788,10 +1789,11 @@ The `default_url_redirect` block supports:
17881789
* `TEMPORARY_REDIRECT`
17891790

17901791
* `strip_query` -
1791-
(Optional)
1792+
(Required)
17921793
If set to true, any accompanying query portion of the original URL is removed prior
17931794
to redirecting the request. If set to false, the query portion of the original URL is
1794-
retained. The default is set to false.
1795+
retained.
1796+
This field is required to ensure an empty block is not set. The normal default value is false.
17951797

17961798
The `test` block supports:
17971799

@@ -1860,10 +1862,11 @@ The `default_url_redirect` block supports:
18601862
* `TEMPORARY_REDIRECT`
18611863

18621864
* `strip_query` -
1863-
(Optional)
1865+
(Required)
18641866
If set to true, any accompanying query portion of the original URL is removed prior
18651867
to redirecting the request. If set to false, the query portion of the original URL is
18661868
retained. The default is set to false.
1869+
This field is required to ensure an empty block is not set. The normal default value is false.
18671870

18681871
## Attributes Reference
18691872

0 commit comments

Comments
 (0)