Day 8 - Understanding Meta Arguments
Today was Day 08 of my AWS Terraform challenge. The topic was Terraform meta arguments. At first, this topic was not very clear to me because there were several new concepts like count, for_each, depends_on, lifecycle, provider, and for expressions. After practicing with simple S3 bucket examples, I understood how powerful these are. What are Meta Arguments Meta arguments are special arguments in Terraform that can be used with any resource to control how it behaves. Instead of writing multiple resource blocks, we can use these to create and manage resources efficiently. Folder Structure Used Day 08 folder structure in VS Code I used the following files: backend.tf provider.tf variables.tf locals.tf main.tf outputs.tf terraform.tfvars Understanding count count is used when we want to create multiple similar resources using numbers. variables.tf showing count_buckets main.tf showing count block Terraform creates resources like: aws_s3_bucket.count_demo[0] aws_s3_bucket.count_demo...