@@ -41,6 +41,18 @@ func ResourceTLSStage() *schema.Resource {
4141 Computed : true ,
4242 Description : "The cache stage ID the TLS stage will be linked to" ,
4343 },
44+ "waf_stage_id" : {
45+ Type : schema .TypeString ,
46+ Optional : true ,
47+ Computed : true ,
48+ Description : "The WAF stage ID the TLS stage will be linked to" ,
49+ },
50+ "route_stage_id" : {
51+ Type : schema .TypeString ,
52+ Optional : true ,
53+ Computed : true ,
54+ Description : "The route stage ID the TLS stage will be linked to" ,
55+ },
4456 "managed_certificate" : {
4557 Type : schema .TypeBool ,
4658 Optional : true ,
@@ -94,6 +106,8 @@ func ResourceTLSStageCreate(ctx context.Context, d *schema.ResourceData, m inter
94106 PipelineID : d .Get ("pipeline_id" ).(string ),
95107 BackendStageID : types .ExpandStringPtr (d .Get ("backend_stage_id" ).(string )),
96108 CacheStageID : types .ExpandStringPtr (d .Get ("cache_stage_id" ).(string )),
109+ RouteStageID : types .ExpandStringPtr (d .Get ("route_stage_id" ).(string )),
110+ WafStageID : types .ExpandStringPtr (d .Get ("waf_stage_id" ).(string )),
97111 ManagedCertificate : types .ExpandBoolPtr (d .Get ("managed_certificate" ).(bool )),
98112 Secrets : expandTLSSecrets (d .Get ("secrets" ), region ),
99113 }, scw .WithContext (ctx ))
@@ -124,6 +138,8 @@ func ResourceTLSStageRead(ctx context.Context, d *schema.ResourceData, m interfa
124138
125139 _ = d .Set ("backend_stage_id" , types .FlattenStringPtr (tlsStage .BackendStageID ))
126140 _ = d .Set ("cache_stage_id" , types .FlattenStringPtr (tlsStage .CacheStageID ))
141+ _ = d .Set ("route_stage_id" , types .FlattenStringPtr (tlsStage .RouteStageID ))
142+ _ = d .Set ("waf_stage_id" , types .FlattenStringPtr (tlsStage .WafStageID ))
127143 _ = d .Set ("pipeline_id" , tlsStage .PipelineID )
128144 _ = d .Set ("managed_certificate" , tlsStage .ManagedCertificate )
129145 _ = d .Set ("secrets" , flattenTLSSecrets (tlsStage .Secrets ))
@@ -156,6 +172,16 @@ func ResourceTLSStageUpdate(ctx context.Context, d *schema.ResourceData, m inter
156172 hasChanged = true
157173 }
158174
175+ if d .HasChange ("route_stage_id" ) {
176+ updateRequest .RouteStageID = types .ExpandUpdatedStringPtr (d .Get ("route_stage_id" ))
177+ hasChanged = true
178+ }
179+
180+ if d .HasChange ("waf_stage_id" ) {
181+ updateRequest .WafStageID = types .ExpandUpdatedStringPtr (d .Get ("waf_stage_id" ))
182+ hasChanged = true
183+ }
184+
159185 if d .HasChange ("managed_certificate" ) {
160186 updateRequest .ManagedCertificate = types .ExpandBoolPtr (d .Get ("managed_certificate" ))
161187 hasChanged = true
0 commit comments