Terraform is an open-source infrastructure as code tool that lets you build, change, and version cloud and on-prem resources safely and efficiently.
The basic structure of Terraform that we will use in this guide includes:
count
, for_each
,…Modules: To facilitate management, we divide the lab into 3 modules, categorized into 2 types:
You can refer to the Terraform source code here.
Terraform module to create an S3 with Static Website hosting feature
Creating a complete pipeline using Terraform to automate the process of building and deploying a static website onto AWS.
Declaration and usage of the modules created in previous steps.
Running Terraform commands to manage resources on the AWS platform, from provisioning to cleanup.
After completing the lab, we hope you can draw conclusions about the two deployment methods.