Terraform 101 - How to pass list of values between modules in Terraform
Автор: vNerd Central
Загружено: 2022-09-09
Просмотров: 4137
Описание:
This video explains how to pass the vaules of "List" type variable from one module to another module in HCL Terraform. When we write code in terraform we need to ensure it is reusable. Passing the values of variables dynamically in the runtime enables us to create resources with dependecies of multiple modules.
In this video we have written a sample code which creates the IPAM resource first and the IPAM module passes the values of IPAM Pool ID, and the IPAM CIDRs to the VPC module by using "Output" variables in the "ipam.tf". In the "main.tf" file we are referring to the output variables within the "VPC" module block to pass the vaules to the "vpc.tf" (VPC module) to create the VPC based on the values passed from the root module.
When we write this type of code it surely it makes the code more complex. However, it eases the resuability of the code, and reduces the repeatative and manual entries of variable files in multiple modules.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: