Resource Exports & Dependencies | Terraform Tutorial | #5

preview_player
Показать описание
Each resource in Terraform exports data and information about the resource. This data can then be used as input into other resources. When data from one resource is used for another then it becomes a dependency. Thankfully Terraform automatically figures out any dependencies allowing users not to have to worry about it much.

In this video we'll create a few resources using the values of one resource as the input into other resources. Below are a few things that we'll cover.

- Create an AWS VPC, Subnet and Instance
- Use the exported attributes from one resource into another creating a dependency

Code Examples:

AWS VPC:

AWS Subnet:

AWS Instance:
Рекомендации по теме
Комментарии
Автор

I have been wondering how I would eventually learn Terraform, but I am finally at ease after I found you. I love you so much, the way you show how to read the documentation is legendary, your simplicity is profound.

isaacambi
Автор

Will, thanks man! I appreciate the support in passing attributes that were already created. Nice work!

zvirtual
Автор

I was really struggling to learn Terraform and your tutorials made it look simple. I wish to mention that your tutorials are awesome and I am deeply grateful for your videos.

ExarchiasGhost
Автор

A big thank you for this, I had problems in order to obtain info from other resources, like a vpc or a subnet. With this video all my confusion is gone :)

christianibiri
Автор

Thank you for this!!! We all appreciate it!

felipeozoski
Автор

2:58 running `terraform fmt` in your console should format that for you

great playlist so far!

PublicVoidFoo
Автор

Thanks for the video Will. I have a Question, if Terraform is enough smart and knows the order like u said first VPC, then why max. people and programmers use "Depends on" argument....e.g here in above example for subnet we must need VPC first....please explain....

MuhammadWaqas-grgg
Автор

What is the extension you use for vs code? I have the HashiCorp Terraform version v2.5.0 installed and the auto complete does not work.

mauriciomejia
Автор

So I should name my subnet "web"? JK Thank you for making this!

Gravity
Автор

what? really it does not explain much like why we only use exported attribute - id and not other attributes like arn or any other.

jainamshah