This works, but its critical you define "wait_for_elb_capacity" if this is in reference to an autoscaling group associated with an ELB serving any sort of inbound requests. Otherwise terraform will create the new resources, and then immediately terminate the old resources before the new resources are fully available ("f--- it, we'll do it live" mode).
This won't do a rolling deploy per se, it'll just bring up all new resources, wait for them to be healthy, and then terminate the old resources; if you want to do rolling changes, you'll need Cloudformation (or if its deploy-specific, tooling like Spinnaker).