Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 252 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 252
Topic #: 1
[All Terraform Associate Questions]

What does Terraform not reference when running a terraform apply -refresh-only?

  • A. Credentials
  • B. State file
  • C. Terraform resource definitions in configuration files
  • D. Cloud provider
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
kiran15789
Highly Voted 1 year, 6 months ago
Selected Answer: C
The -refresh-only flag tells Terraform to skip the resource creation and update steps and only update the state file with the current state of resources in the cloud provider. This means that Terraform will not reference the resource definitions in the configuration files, since it is not applying any changes to the cloud provider based on those definitions.
upvoted 11 times
...
Alandt
Most Recent 10 months ago
Selected Answer: C
I'll go with C
upvoted 1 times
...
alen995454
10 months, 1 week ago
this command is depreciated seemingly because of credentials. Kinda indicates that it touches the credentials doesn't it.... I'm going with C Warning: This command is deprecated, because its default behavior is unsafe if you have misconfigured credentials for any of your providers. See below for more information and recommended alternatives. https://developer.hashicorp.com/terraform/cli/commands/refresh
upvoted 1 times
...
Balki
11 months ago
Selected Answer: A
Basic english. Credentials is not related to this feature as it is required for every options in terraform. For this option, all the other three are referred internally
upvoted 2 times
...
Albion
11 months, 2 weeks ago
Selected Answer: B
The -refresh-only flag ensures that Terraform only performs a refresh of the state without making changes to the infrastructure. During the refresh, Terraform compares the current state of the infrastructure with the resource definitions in the configuration files to identify any differences.
upvoted 1 times
...
Tronko86
1 year ago
Selected Answer: A
The -refresh-only flag is used to refresh the state of resources without making any changes. It ensures that Terraform has the latest information about the existing resources in the cloud, but it doesn't involve credentials or make any modifications to the resources. Credentials are typically required during resource provisioning or modifications, not during a refresh operation.
upvoted 1 times
...
Paul_white
1 year, 3 months ago
A. Credentials When running terraform apply -refresh-only, Terraform does not reference credentials. The -refresh-only flag is used to perform a refresh of the state without making any changes to the actual resources in the cloud provider. During this operation, Terraform retrieves the current state of the resources from the cloud provider, updates the state file with the latest information, but it does not perform any actions that require credentials (e.g., creating, modifying, or deleting resources). The -refresh-only flag is useful when you want to synchronize Terraform's understanding of the resources with the real state in the cloud provider without performing any destructive actions. It allows you to update the state file with the latest resource information without making any changes to the infrastructure.
upvoted 2 times
...
Oleg_gol
1 year, 6 months ago
Selected Answer: D
https://developer.hashicorp.com/terraform/tutorials/state/refresh
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...