New Terraform Tutorial: Use Application Load Balancers for Blue-Green and Canary Deployments
Learn how to use application load balancers for blue-green and canary deployments with this new tutorial on HashiCorp Learn.
Blue-green deployments and rolling upgrades (canary tests) allow you to release new software gradually and mitigate the potential blast radius of a failed release. Using this pattern, you can release new software with near-zero downtime.
In the new tutorial, Use Application Load Balancers for Blue-Green and Canary Deployments, you will use a combination of blue-green, canary, and rolling deployments to incrementally promote a new application version via HashiCorp Terraform feature toggles and an AWS application load balancer (ALB).
![Canary test/deployment. All traffic is directed to the blue environment initially. When you perform a canary test, 10% of the traffic is directed to the green environment.](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1616460032-canary-deployment.png&w=3840&q=75)
The ALB automatically distributes incoming traffic to the appropriate service at the application layer. ALBs are different from classic load balancers, which only route traffic to EC2 instances across multiple availability zones. You can define an ALB's listeners (rules) and target groups to dynamically route traffic to services. These rules enable you to run canary tests on and incrementally promote the green environment.
» What You’ll Learn
By the end of this tutorial, you will know how to use an application load balancer to incrementally deploy a new application release. In addition, you will have implemented feature toggles to codify and run three advanced deployment techniques in a consistent, reliable manner.
Sign up for the latest HashiCorp news
More blog posts like this one
![Terraform AWS provider tops 3 billion downloads](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1620155432-blog-library-product-terraform-aws-logomarks-dark.jpg&w=3840&q=75)
Terraform AWS provider tops 3 billion downloads
HashiCorp and AWS continue to support the widespread demand for standardized infrastructure as code.
![Terraform 1.9 enhances input variable validations](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1714171194-blog-library-product-terraform-black.jpg&w=3840&q=75)
Terraform 1.9 enhances input variable validations
Terraform 1.9 is now generally available, bringing enhancements to input variable validations, a new string templating function, and more.
![New Terraform integrations with Cisco, Dell, Red Hat, ServiceNow, and more](/_next/image?url=https%3A%2F%2Fwww.datocms-assets.com%2F2885%2F1718378819-screenshot-2024-06-14-at-11-26-26-am.png&w=3840&q=75)
New Terraform integrations with Cisco, Dell, Red Hat, ServiceNow, and more
17 new Terraform integrations from 13 partners provide more options to automate and secure cloud infrastructure management.