Skip to content

Commit 07dc55e

Browse files
Support empty TLS blocks in ingress_v1
1 parent 7798e31 commit 07dc55e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kubernetes/structure_ingress_spec_v1.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,15 @@ func expandIngressV1Backend(l []interface{}) *networking.IngressBackend {
252252
}
253253

254254
func expandIngressV1TLS(l []interface{}) []networking.IngressTLS {
255-
if len(l) == 0 || l[0] == nil {
255+
if len(l) == 0 {
256256
return nil
257257
}
258258

259259
tlsList := make([]networking.IngressTLS, len(l))
260260
for i, t := range l {
261+
if t == nil {
262+
t = map[string]interface{}{}
263+
}
261264
in := t.(map[string]interface{})
262265
obj := networking.IngressTLS{}
263266

0 commit comments

Comments
 (0)