Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 15


What is not processed when running a terraform refresh?

Show Answer
Correct Answer: B,C,D

When running a terraform refresh, the configuration file is not processed because its purpose is only for planning and applying changes, not updating the state with real-world data. Credentials are also not processed in the sense that they are not directly manipulated or updated during the refresh; they are required for authentication, but the refresh operation itself does not deal with modifying credentials.

Discussion

17 comments
Sign in to comment
wangchungOption: B
May 23, 2022

A. State file - its updated during the refresh B. Configuration file - C. Credentials - required to get onto the cloud D. Cloud provider - required to carry out the refresh of whats in the cloud vs whats in state.

cloudcuckoolandOption: B
May 21, 2022

the answer has to be B, as per docs, it's checking remote objects and update the state file, it needs to process the creds to connect, the cloud provider to check objects and the state to update. "The terraform refresh command reads the current settings from all managed remote objects and updates the Terraform state to match."

SilentMilliOption: B
Mar 11, 2023

he configuration file is not processed during terraform refresh. The configuration file is only used during the terraform apply or terraform plan commands to determine the desired state of the infrastructure. terraform refresh does not make any changes to the infrastructure, it only updates the state file to reflect the current state of the resources in the cloud provider.

Ibrahim2023Option: C
Jul 8, 2023

The answer is C. Credentials. When you run terraform refresh, Terraform will read the state file and the configuration file, but it will not read the credentials. This is because the credentials are used to connect to the cloud provider, and Terraform does not need to connect to the cloud provider to refresh the state file.

HMthyl
Jul 12, 2023

Refresh is about ensuring the state file reflects real world objects: it's not bringing the state file in line with your configuration, it's bringing it into line with the real thing

Pinky0289Option: B
Sep 16, 2022

There is no change/impact on the configuration file during the refresh, therefore the answer is B. Configuration file.

connecttozeeOption: B
Apr 3, 2023

Agree with B. Only confiugration file not processed for provisioning infra. Provider & credential need login to infra & state file will overwrite new config current infra

Jayanth
Jul 28, 2023

B. Configuration file

yogishrb2020Options: BD
Oct 11, 2022

State file and if credentials stored in the state file gets updated. I chose B and D

Fatoch
Oct 28, 2022

there is should be two answers, then B and another one?

InformationOverloadOption: B
Dec 30, 2022

The terraform refresh command does not create new resources or modify existing resources. It only updates the state to reflect the current configuration. If you want to create new resources or modify existing resources, you need to use the terraform apply command.

Mal_8Option: B
Feb 18, 2023

The answer is B.

cdecheryOption: B
Jul 16, 2023

Of course it is B. Credentials are used during refresh.

Busi57Option: B
Jul 23, 2023

I choose B

Busi57Option: B
Jul 23, 2023

i choose B

ravk2321
Mar 8, 2024

The question is outdated as this command is deprecated by Terraform, and they also recommend against using it because it provides no opportunity to review the effects of the operation before updating the state.

Molly1994Options: BC
Jun 1, 2024

Refresh command will update the remote state file to match the current configuration. So configuration file won’t change anything. State file and credentials and cloud providers will associate with the refresh action

shubhamlonkarOption: B
Jul 3, 2024

Refresh command updates the state file but not the terraform configuration file