@@ -410,6 +410,11 @@ func resourceTencentCloudCdnDomain() *schema.Resource {
410410 Description : "Forced redirect status code. Valid values are `301` and `302`. " +
411411 "When `switch` setting `off`, this property does not need to be set or set to `302`. Default value is `302`." ,
412412 },
413+ "carry_headers" : {
414+ Type : schema .TypeString ,
415+ Optional : true ,
416+ Description : "Whether to return the newly added header during force redirection. Values: `on`, `off`." ,
417+ },
413418 },
414419 },
415420 },
@@ -1856,6 +1861,9 @@ func resourceTencentCloudCdnDomainCreate(d *schema.ResourceData, meta interface{
18561861 if rsc := redirectMap ["redirect_status_code" ]; rsc .(int ) != 0 {
18571862 redirect .RedirectStatusCode = helper .Int64 (int64 (rsc .(int )))
18581863 }
1864+ if ch := redirectMap ["carry_headers" ]; ch .(string ) != "" {
1865+ redirect .CarryHeaders = helper .String (ch .(string ))
1866+ }
18591867 request .ForceRedirect = & redirect
18601868 }
18611869 }
@@ -2522,6 +2530,7 @@ func resourceTencentCloudCdnDomainRead(d *schema.ResourceData, meta interface{})
25222530 "switch" : domainConfig .ForceRedirect .Switch ,
25232531 "redirect_type" : domainConfig .ForceRedirect .RedirectType ,
25242532 "redirect_status_code" : domainConfig .ForceRedirect .RedirectStatusCode ,
2533+ "carry_headers" : domainConfig .ForceRedirect .CarryHeaders ,
25252534 },
25262535 }
25272536 }
@@ -3102,6 +3111,9 @@ func resourceTencentCloudCdnDomainUpdate(d *schema.ResourceData, meta interface{
31023111 if rsc := redirectMap ["redirect_status_code" ]; rsc .(int ) != 0 {
31033112 redirect .RedirectStatusCode = helper .Int64 (int64 (rsc .(int )))
31043113 }
3114+ if ch := redirectMap ["carry_headers" ]; ch .(string ) != "" {
3115+ redirect .CarryHeaders = helper .String (ch .(string ))
3116+ }
31053117 request .ForceRedirect = & redirect
31063118 }
31073119 }
0 commit comments