If you notice that my previous exercise the ec2 doesn't have a name.so you can add tags to the aws instance using below syntax
tags {
Name = "Terraform-example-1"
}
I updated above syntax to my previous exercise. Let see ..
Run the plan command again
> terraform plan
aws_instance.First: Refreshing state... (ID: i-0701ccfb5da90)
Note: Terraform keep track of all resources it already created for this set of configuration file.Notice terraform says "Refreshing state" which means It going to append the changes to instance.
please refresh you ec2 console. you will see something similar to below image.
tags {
Name = "Terraform-example-1"
}
I updated above syntax to my previous exercise. Let see ..
Run the plan command again
> terraform plan
aws_instance.First: Refreshing state... (ID: i-0701ccfb5da90)
Note: Terraform keep track of all resources it already created for this set of configuration file.Notice terraform says "Refreshing state" which means It going to append the changes to instance.
please refresh you ec2 console. you will see something similar to below image.
No comments:
Post a Comment