Secret weapon how to promote your YouTube channel
Get Free YouTube Subscribers, Views and Likes

How to use Terraform import? - Part 22

Follow
Rahul Wagh

To learn more on Teraform import resource visit https://jhooq.com/terraformimportre...
Github https://github.com/rahulwagh/Terrafor...

In Terraform, you need to import an existing resource into your Terraform configuration so that you can manage it with Terraform. This is useful when you have an existing resource that you did not create with Terraform, but you want to manage its lifecycle with Terraform.

To import a resource, you use the terraform import command and specify the resource type, the name of the resource, and the ID of the resource. For example, if you wanted to import an Amazon S3 bucket into your Terraform configuration, you would use a command like this:

terraform import aws_s3_bucket.my_bucket mybucketname

This would import the S3 bucket with the name mybucketname into your Terraform configuration and create an aws_s3_bucket resource with the name my_bucket. You can then manage the bucket with Terraform, including modifying its properties and destroying it when it is no longer needed.

Importing resources can be useful when you want to start using Terraform to manage existing infrastructure that was not created with Terraform, or when you have taken over management of an infrastructure that was previously managed by someone else


▬▬▬▬▬▬ ⭐ Time Stamps ⭐ ▬▬▬▬▬▬
0:00 Introduction
01:16 Import AWS EC2 instnace
09:15 Import AWS S3 bucket

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

Linkedin   / rahulwagh  
Twitter   / wagh_rahul  

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

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

Video is copyrighted and can not be redistributed on any platform.

posted by Lymnimpenno