Cannot set static port

According to the docs this is valid in the group stanza

group "somegroup" {
    network {
      port "whatever" {
        static = 5555
      }
    }

    task "sometask" {
      service {
        name = "somename"
        port "whatever" {}
      }
    }
}

Yet when I try and run the job I get

* 'port' expected type 'string', got unconvertible type '[]map[string]interface {}'

What is wrong with this configuration?

The network stanza looks correct, but the issue seems to come from your service which should like (if I remember correctly) this:

 task "sometask" {
      service {
        name = "somename"
        # port "whatever" {} <- your problem
        port = "whatever"  # <- what I remember
      }
    }