nerdexam
HashiCorp

TA-002-P · Question #171

You have created an AWS EC2 instance of type t2.micro through your terraform configuration file ec2.tf . Now you want to change the instance type from t2.micro to t2.medium. Accordingly you have chang

Sign in or unlock TA-002-P to reveal the answer and full explanation for question #171. The question stem and answer options stay visible for context.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

You have created an AWS EC2 instance of type t2.micro through your terraform configuration file ec2.tf . Now you want to change the instance type from t2.micro to t2.medium. Accordingly you have changed your configuration file and and ran terraform plan. After running terraform plan you check the output and saw one instance will be updated from t2.micro --> t2.medium. After this you went to grab a coffee without running terraform apply and meanwhile a member of your team changed the instance type of that EC2 instance to t2.medium from aws console. After coming to your desk you run terraform apply. What will happen?

Options

  • ANo resource will be updated and you will see the message : Apply Complete !
  • BThe instance type will be changed to t2.micro and again will be changed to t2.medium
  • Cterraform apply will through an error.
  • D1 resource will be updated and you will see the message : Apply Complete ! Resources :

Unlock TA-002-P to see the answer

You've previewed enough free TA-002-P questions. Unlock TA-002-P for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Terraform CLI#terraform apply#State management#Drift detection
Full TA-002-P Practice