@@ -1514,6 +1514,19 @@ the provided metadata. Possible values: ["MATCH_ALL", "MATCH_ANY"]`,
1514
1514
},
1515
1515
},
1516
1516
},
1517
+ "path_template_match" : {
1518
+ Type : schema .TypeString ,
1519
+ Optional : true ,
1520
+ Description : `For satisfying the matchRule condition, the path of the request
1521
+ must match the wildcard pattern specified in pathTemplateMatch
1522
+ after removing any query parameters and anchor that may be part
1523
+ of the original URL.
1524
+
1525
+ pathTemplateMatch must be between 1 and 255 characters
1526
+ (inclusive). The pattern specified by pathTemplateMatch may
1527
+ have at most 5 wildcard operators and at most 5 variable
1528
+ captures in total.` ,
1529
+ },
1517
1530
"prefix_match" : {
1518
1531
Type : schema .TypeString ,
1519
1532
Optional : true ,
@@ -1874,6 +1887,24 @@ header is replaced with contents of hostRewrite. The value must be between 1 and
1874
1887
portion of the request's path is replaced by pathPrefixRewrite. The value must
1875
1888
be between 1 and 1024 characters.` ,
1876
1889
},
1890
+ "path_template_rewrite" : {
1891
+ Type : schema .TypeString ,
1892
+ Optional : true ,
1893
+ Description : `Prior to forwarding the request to the selected origin, if the
1894
+ request matched a pathTemplateMatch, the matching portion of the
1895
+ request's path is replaced re-written using the pattern specified
1896
+ by pathTemplateRewrite.
1897
+
1898
+ pathTemplateRewrite must be between 1 and 255 characters
1899
+ (inclusive), must start with a '/', and must only use variables
1900
+ captured by the route's pathTemplate matchers.
1901
+
1902
+ pathTemplateRewrite may only be used when all of a route's
1903
+ MatchRules specify pathTemplate.
1904
+
1905
+ Only one of pathPrefixRewrite and pathTemplateRewrite may be
1906
+ specified.` ,
1907
+ },
1877
1908
},
1878
1909
},
1879
1910
},
@@ -2857,6 +2888,7 @@ func flattenComputeRegionUrlMapPathMatcherRouteRulesMatchRules(v interface{}, d
2857
2888
"prefix_match" : flattenComputeRegionUrlMapPathMatcherRouteRulesMatchRulesPrefixMatch (original ["prefixMatch" ], d , config ),
2858
2889
"query_parameter_matches" : flattenComputeRegionUrlMapPathMatcherRouteRulesMatchRulesQueryParameterMatches (original ["queryParameterMatches" ], d , config ),
2859
2890
"regex_match" : flattenComputeRegionUrlMapPathMatcherRouteRulesMatchRulesRegexMatch (original ["regexMatch" ], d , config ),
2891
+ "path_template_match" : flattenComputeRegionUrlMapPathMatcherRouteRulesMatchRulesPathTemplateMatch (original ["pathTemplateMatch" ], d , config ),
2860
2892
})
2861
2893
}
2862
2894
return transformed
@@ -3066,6 +3098,10 @@ func flattenComputeRegionUrlMapPathMatcherRouteRulesMatchRulesRegexMatch(v inter
3066
3098
return v
3067
3099
}
3068
3100
3101
+ func flattenComputeRegionUrlMapPathMatcherRouteRulesMatchRulesPathTemplateMatch (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
3102
+ return v
3103
+ }
3104
+
3069
3105
func flattenComputeRegionUrlMapPathMatcherRouteRulesRouteAction (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
3070
3106
if v == nil {
3071
3107
return nil
@@ -3412,6 +3448,8 @@ func flattenComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewrite(v inte
3412
3448
flattenComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewriteHostRewrite (original ["hostRewrite" ], d , config )
3413
3449
transformed ["path_prefix_rewrite" ] =
3414
3450
flattenComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewritePathPrefixRewrite (original ["pathPrefixRewrite" ], d , config )
3451
+ transformed ["path_template_rewrite" ] =
3452
+ flattenComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewritePathTemplateRewrite (original ["pathTemplateRewrite" ], d , config )
3415
3453
return []interface {}{transformed }
3416
3454
}
3417
3455
func flattenComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewriteHostRewrite (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
@@ -3422,6 +3460,10 @@ func flattenComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewritePathPre
3422
3460
return v
3423
3461
}
3424
3462
3463
+ func flattenComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewritePathTemplateRewrite (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
3464
+ return v
3465
+ }
3466
+
3425
3467
func flattenComputeRegionUrlMapPathMatcherRouteRulesRouteActionWeightedBackendServices (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
3426
3468
if v == nil {
3427
3469
return v
@@ -5224,6 +5266,13 @@ func expandComputeRegionUrlMapPathMatcherRouteRulesMatchRules(v interface{}, d t
5224
5266
transformed ["regexMatch" ] = transformedRegexMatch
5225
5267
}
5226
5268
5269
+ transformedPathTemplateMatch , err := expandComputeRegionUrlMapPathMatcherRouteRulesMatchRulesPathTemplateMatch (original ["path_template_match" ], d , config )
5270
+ if err != nil {
5271
+ return nil , err
5272
+ } else if val := reflect .ValueOf (transformedPathTemplateMatch ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
5273
+ transformed ["pathTemplateMatch" ] = transformedPathTemplateMatch
5274
+ }
5275
+
5227
5276
req = append (req , transformed )
5228
5277
}
5229
5278
return req , nil
@@ -5507,6 +5556,10 @@ func expandComputeRegionUrlMapPathMatcherRouteRulesMatchRulesRegexMatch(v interf
5507
5556
return v , nil
5508
5557
}
5509
5558
5559
+ func expandComputeRegionUrlMapPathMatcherRouteRulesMatchRulesPathTemplateMatch (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
5560
+ return v , nil
5561
+ }
5562
+
5510
5563
func expandComputeRegionUrlMapPathMatcherRouteRulesRouteAction (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
5511
5564
l := v .([]interface {})
5512
5565
if len (l ) == 0 || l [0 ] == nil {
@@ -5951,6 +6004,13 @@ func expandComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewrite(v inter
5951
6004
transformed ["pathPrefixRewrite" ] = transformedPathPrefixRewrite
5952
6005
}
5953
6006
6007
+ transformedPathTemplateRewrite , err := expandComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewritePathTemplateRewrite (original ["path_template_rewrite" ], d , config )
6008
+ if err != nil {
6009
+ return nil , err
6010
+ } else if val := reflect .ValueOf (transformedPathTemplateRewrite ); val .IsValid () && ! tpgresource .IsEmptyValue (val ) {
6011
+ transformed ["pathTemplateRewrite" ] = transformedPathTemplateRewrite
6012
+ }
6013
+
5954
6014
return transformed , nil
5955
6015
}
5956
6016
@@ -5962,6 +6022,10 @@ func expandComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewritePathPref
5962
6022
return v , nil
5963
6023
}
5964
6024
6025
+ func expandComputeRegionUrlMapPathMatcherRouteRulesRouteActionUrlRewritePathTemplateRewrite (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
6026
+ return v , nil
6027
+ }
6028
+
5965
6029
func expandComputeRegionUrlMapPathMatcherRouteRulesRouteActionWeightedBackendServices (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
5966
6030
l := v .([]interface {})
5967
6031
req := make ([]interface {}, 0 , len (l ))
0 commit comments