That’s the problem.
Its a google load balance server and it does not allow doing it at the load balane server.
They advise to manage the http to https redirection using http_x_forwarded_proto at the end server.
I have tried the same thing with Apache server running wordpress and this same rule works in similar set-up.
As a matter of fact, even Amazon’s ELB suggests the same solution.