Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 327

You have been working in a Cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that is listening on port 80. After some application changes, you updated the Terraform code to change the port to 443.

You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended, and step away to grab some coffee.

In the meantime, another team member manually changes the load balancer port to 443 through the Cloud provider console before you get back to your desk.

What will happen when you terraform apply upon returning to your desk?

    Correct Answer: C

    When you run terraform apply, Terraform will detect that the load balancer's port is already set to 443 as per the desired state defined in your updated configuration. Since the actual state matches the desired state, Terraform will not make any changes to the load balancer itself. Instead, it will simply update the state file to reflect the accurate representation of the current infrastructure state.

Discussion
irusharulzOption: C

C is the correct answer

artyartycmsOption: C

C is correct

Edward2021Option: C

C is the correct answer

TheShantymanOption: C

C is the correct answer. Terraform will see that no changes need to be made as the load balancer now matches the local configuration. It will then update the state files to reflect the new remote configuration.

irusharulzOption: C

It's not making any changes load balancer. Since the load balancer now listening in port 443. No need to update the load balancer. but State file will be modified according to that