resource "kubernetes_service" "echoheaders" {
metadata {
name = "echoheaders"
namespace = "platform"
labels = { app = "echoheaders" }
}
spec {
port {
name = "http"
protocol = "TCP"
port = 80
target_port = "8080"
}
selector = { app = "echoheaders" }
type = "NodePort"
}
}
panic: must not call MapVal with empty map
goroutine 1 [running]:
github.com/zclconf/go-cty/cty.MapVal(0xc0002ce030, 0x27d9201, 0x14, 0xc0007896c0, 0x1)
/go/pkg/mod/github.com/zclconf/[email protected]/cty/value_init.go:198 +0x556
main.(*ObjectWalker).closeBlock(0xc0000fe0b0, 0x0)
/drone/src/hcl_writer.go:219 +0x160
main.(*ObjectWalker).Exit(0xc0000fe0b0, 0x1, 0x195, 0x3b7e6b0)
/drone/src/hcl_writer.go:253 +0x48
github.com/mitchellh/reflectwalk.walkMap(0x256c800, 0xc000132118, 0x195, 0x2788a20, 0xc0000fe0b0, 0x0, 0x2544ee5)
/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:243 +0x361
github.com/mitchellh/reflectwalk.walk(0x256c800, 0xc000132118, 0x195, 0x2788a20, 0xc0000fe0b0, 0x2bdb401, 0x256c800)
/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:182 +0x4cb
github.com/mitchellh/reflectwalk.walkStruct(0x26bd180, 0xc000132108, 0x199, 0x2788a20, 0xc0000fe0b0, 0x0, 0x24cb961)
/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:385 +0x3d5
github.com/mitchellh/reflectwalk.walk(0x26bd180, 0xc000132108, 0x199, 0x2788a20, 0xc0000fe0b0, 0x2bdb401, 0x26bd180)
/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:188 +0x571
github.com/mitchellh/reflectwalk.walkStruct(0x26bd0a0, 0xc000132000, 0x199, 0x2788a20, 0xc0000fe0b0, 0x100, 0xc000593200)
/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:385 +0x3d5
github.com/mitchellh/reflectwalk.walk(0x27a9d40, 0xc000132000, 0x16, 0x2788a20, 0xc0000fe0b0, 0x23d3b01, 0x2757c40)
/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:188 +0x571
github.com/mitchellh/reflectwalk.Walk(0x27a9d40, 0xc000132000, 0x2788a20, 0xc0000fe0b0, 0x0, 0x0)
/go/pkg/mod/github.com/mitchellh/[email protected]/reflectwalk.go:92 +0x182
main.WriteObject(0x2b6afc0, 0xc000132000, 0xc000023860, 0x0, 0x0, 0x1)
/drone/src/hcl_writer.go:30 +0x89
main.main()
/drone/src/main.go:62 +0x2b6