@@ -44,6 +44,11 @@ func resourceIpLoadbalancingHttpFrontend() *schema.Resource {
44
44
Optional : true ,
45
45
Elem : & schema.Schema {Type : schema .TypeString },
46
46
},
47
+ "http_header" : {
48
+ Type : schema .TypeList ,
49
+ Optional : true ,
50
+ Elem : & schema.Schema {Type : schema .TypeString },
51
+ },
47
52
"default_farm_id" : {
48
53
Type : schema .TypeInt ,
49
54
Optional : true ,
@@ -101,6 +106,7 @@ func resourceIpLoadbalancingHttpFrontendCreate(d *schema.ResourceData, meta inte
101
106
102
107
allowedSources , _ := helpers .StringsFromSchema (d , "allowed_source" )
103
108
dedicatedIpFo , _ := helpers .StringsFromSchema (d , "dedicated_ipfo" )
109
+ httpHeader , _ := helpers .StringsFromSchema (d , "http_header" )
104
110
105
111
for _ , s := range allowedSources {
106
112
if err := helpers .ValidateIpBlock (s ); err != nil {
@@ -123,6 +129,7 @@ func resourceIpLoadbalancingHttpFrontendCreate(d *schema.ResourceData, meta inte
123
129
Ssl : d .Get ("ssl" ).(bool ),
124
130
RedirectLocation : d .Get ("redirect_location" ).(string ),
125
131
DisplayName : d .Get ("display_name" ).(string ),
132
+ HttpHeader : httpHeader ,
126
133
}
127
134
128
135
frontend .DefaultFarmId = helpers .GetNilIntPointerFromData (d , "default_farm_id" )
@@ -160,6 +167,9 @@ func resourceIpLoadbalancingHttpFrontendRead(d *schema.ResourceData, meta interf
160
167
dedicatedIpFos := make ([]string , 0 )
161
168
dedicatedIpFos = append (dedicatedIpFos , r .DedicatedIpFo ... )
162
169
170
+ httpHeader := make ([]string , 0 )
171
+ httpHeader = append (httpHeader , r .HttpHeader ... )
172
+
163
173
d .Set ("allowed_source" , allowedSources )
164
174
d .Set ("dedicated_ipfo" , dedicatedIpFos )
165
175
d .Set ("default_farm_id" , r .DefaultFarmId )
@@ -170,6 +180,7 @@ func resourceIpLoadbalancingHttpFrontendRead(d *schema.ResourceData, meta interf
170
180
d .Set ("ssl" , r .Ssl )
171
181
d .Set ("zone" , r .Zone )
172
182
d .Set ("redirect_location" , r .RedirectLocation )
183
+ d .Set ("http_header" , httpHeader )
173
184
174
185
return nil
175
186
}
@@ -181,6 +192,7 @@ func resourceIpLoadbalancingHttpFrontendUpdate(d *schema.ResourceData, meta inte
181
192
182
193
allowedSources , _ := helpers .StringsFromSchema (d , "allowed_source" )
183
194
dedicatedIpFo , _ := helpers .StringsFromSchema (d , "dedicated_ipfo" )
195
+ httpHeader , _ := helpers .StringsFromSchema (d , "http_header" )
184
196
185
197
for _ , s := range allowedSources {
186
198
if err := helpers .ValidateIpBlock (s ); err != nil {
@@ -203,6 +215,7 @@ func resourceIpLoadbalancingHttpFrontendUpdate(d *schema.ResourceData, meta inte
203
215
Ssl : d .Get ("ssl" ).(bool ),
204
216
RedirectLocation : d .Get ("redirect_location" ).(string ),
205
217
DisplayName : d .Get ("display_name" ).(string ),
218
+ HttpHeader : httpHeader ,
206
219
}
207
220
208
221
frontend .DefaultFarmId = helpers .GetNilIntPointerFromData (d , "default_farm_id" )
0 commit comments