What is Terraform null_resource and how to use it? - Part-21

preview_player
Показать описание

To use the null_resource in Terraform, you first need to declare the resource block and specify a unique name for it. Within the resource block, you can specify a provisioner block

Here's an example of how you can use the null_resource in Terraform:

resource "null_resource" "example" {
provisioner "local-exec" {
command = "echo Hello world"
}
}
The null_resource can be used to perform actions that don't create any infrastructure resources, such as running a local script or making an API call. In the provisioner block, you can specify the desired configuration options for the null_resource, such as the script that should be run or the API endpoint that should be called.

▬▬▬▬▬▬ ⭐️ Time Stamps ⭐️ ▬▬▬▬▬▬
0:00 - Introduction
02:34 - What is null_resource?
03:36 - What are use cases of null_resource?
06:55 - What is trigger in null_resource?
08:40 - Demo of null_resource with trigger

▬▬▬▬▬▬ ⭐️ Follow me ⭐️ ▬▬▬▬▬▬

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.
Рекомендации по теме
Комментарии
Автор

Thanks for explaining null resource concept very clearly with the use case. Its very simple and clear

hemanthyoga
Автор

Thankyou so much!!Now have much better clarity on why we need null resource.

njxkyph
Автор

Nice. I have been trying to understand "null_resource", since its a name of conflict, why a null and be a resource, but your video cleared all our questions. thanks, its really a wonderful video and the concept

amaravathiyagati
Автор

Very good explanation. I also appreciate the chapters allowing to skip around.

cruepprich
Автор

Thanks for every session. i learned a lot from your sessions and you explained every topic in a very simple way I just loved these explanations.

swatikatyal
Автор

better and unique way of explaining things.. Thanks

The_Personal_Picks_SnM
Автор

You deserve more subscribers. Your way of teaching is very nice

priyankapani
Автор

Just to make a correction: in the null resource, it prints the ID of the null resource not of EC2 instance.

Rest is good. Thanks

danishnoman
Автор

awesome! you have very good way to explain concepts, keep going further!

matheusmaais
Автор

You Simply cleared one of the complex topic, thank you Sir!

guptajiikaladka
Автор

Thanks for your videos. Very helpful.

BTW, Can you do some advanced topics on infrastructure provisioning with terraform using modules? Say using one module for VPC creation, another for EC2 instance provisioning, and a third that provisions application LB. Simple requirement would be to setup VPC, and in it, provision the internet facing ALB in the public subnet that loadbalances over 3 EC2 instances in private subnets spread over 3 AZs. Is that something you can showcase? Would be much appreciated.

lnkrishnan
Автор

do you have any online training classes or in udemy

shashicenturylink
Автор

Do you have a video on null provider also ? 😃

amaravathiyagati
Автор

Hi Rahul are u providing any training for terraform please let me know.

kishorek
Автор

Hi Nice explanation... I have the below code, can you explain to me what it will do
data "null_data_source" "tags_ec2" {
count =

inputs = {
Key = element(keys(local.tags_ec2_raw), count.index)
Value = element(values(local.tags_ec2_raw), count.index)
}
}

nagamohan