Terraform to Deploy API Gateway multiple stages as DevOps

I could build and deploy a sample Lambda + API Gateway into “dev” stage.
I would like to use Terraform to deploy my serverless application in a CI/CD fashion in a incremental way of Dev -> QA -> PPE -> PROD. How this could be done / approached as the state details also needs to be managed by terraform files.
Any sample example / blog with regards to “Deploying Serverless using Terraform across DevOps pipeline into Dev -> QA -> Other stages” would be helpful.