What are Terraform Dynamic blocks? - Part 8

Published: 09 August 2021
on channel: Rahul Wagh
22,578
360

▬▬▬▬▬▬ * Instruction's Guides * ▬▬▬▬▬▬

1. Terraform dynamic block - https://jhooq.com/terraform-dynamic-b...
2. Setup EC2 instance on AWS(access_key, secret_key) - https://jhooq.com/terraform-ec2-insta...

Terraform dynamic block behaves pretty much the same as for or for-each loop. It not only iterates over the value range but also creates nested dynamic blocks which can be complex.

Terraform dynamic block usually consists of three elements -

1. Name of dynamic block
2. for_each
3. content

1. Name of dynamic block - You can keep the name of the block as per your choice, terraform does not have very strict rules on defining the dynamic block names

2. for_each - Here you need to provide any collection or structural values which can be iterated

3. content - It is a terraform block or body which will be generated for each value of the for-each loop



▬▬▬▬▬▬ ⭐️ 🕘Timestamps ⭐️ ▬▬▬▬▬▬
0:00 Introduction
0:44 What is terraform dynamic block?
2:20 Terraform block syntax
5:33 Demo of Terraform dynamic block on aws
8:29 Execute terraform dynamic block
10:34 Best practices for using Terraform dynamic block


To learn more on DevOps visit - https://jhooq.com


Disclaimer/Policy: All the content/instructions are solely mine. The source is completely open-source.

Video is copyrighted and can not be re-distributed on any platform.



#devops #aws #terraform #cloud


Watch video What are Terraform Dynamic blocks? - Part 8 online without registration, duration hours minute second in high quality. This video was added by user Rahul Wagh 09 August 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 22,578 once and liked it 360 people.