@@ -86,6 +86,16 @@ func resourceFortiadcLoadbalanceVirtualServer() *schema.Resource {
8686 Optional : true ,
8787 Default : 0 ,
8888 },
89+ "error_page" : & schema.Schema {
90+ Type : schema .TypeString ,
91+ Optional : true ,
92+ Default : "" ,
93+ },
94+ "error_msg" : & schema.Schema {
95+ Type : schema .TypeString ,
96+ Optional : true ,
97+ Default : "Server-unavailable!" ,
98+ },
8999 "interface" : & schema.Schema {
90100 Type : schema .TypeString ,
91101 Optional : true ,
@@ -202,6 +212,8 @@ func resourceFortiadcLoadbalanceVirtualServerCreate(d *schema.ResourceData, m in
202212 Pool : d .Get ("pool" ).(string ),
203213 ClientSSLProfile : d .Get ("client_ssl_profile" ).(string ),
204214 HTTP2HTTPS : http2https ,
215+ ErrorMsg : d .Get ("error_msg" ).(string ),
216+ ErrorPage : d .Get ("error_page" ).(string ),
205217 }
206218
207219 err := client .LoadbalanceCreateVirtualServer (req )
@@ -269,6 +281,8 @@ func resourceFortiadcLoadbalanceVirtualServerRead(d *schema.ResourceData, m inte
269281 d .Set ("pool" , rs .Pool )
270282 d .Set ("client_ssl_profile" , rs .ClientSSLProfile )
271283 d .Set ("http_to_https" , http2https )
284+ d .Set ("error_msg" , rs .ErrorMsg )
285+ d .Set ("error_page" , rs .ErrorPage )
272286
273287 port , err := strconv .ParseInt (strings .TrimSpace (rs .Port ), 10 , 64 )
274288 if err != nil {
@@ -374,6 +388,8 @@ func resourceFortiadcLoadbalanceVirtualServerUpdate(d *schema.ResourceData, m in
374388 Pool : d .Get ("pool" ).(string ),
375389 ClientSSLProfile : d .Get ("client_ssl_profile" ).(string ),
376390 HTTP2HTTPS : http2https ,
391+ ErrorMsg : d .Get ("error_msg" ).(string ),
392+ ErrorPage : d .Get ("error_page" ).(string ),
377393 }
378394
379395 err := client .LoadbalanceUpdateVirtualServer (req )
0 commit comments