Where can Terraform not load a provider from?
Correct Answer:
D
This is where Terraform cannot load a provider from, as it requires a compiled binary file that implements the provider protocol. You can load a provider from a plugins directory, a provider plugin cache, or the official HashiCorp distribution on releases.hashicorp.com.
If a module declares a variable with a default, that variable must also be defined within the module.
Correct Answer:
B
A module can declare a variable with a default value without requiring the caller to define it. This allows the module to provide a sensible default behavior that can be customized by the caller if needed. References = [Module Variables]
Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?
Correct Answer:
A
This command will initialize the new backend and prompt you to migrate the existing state file to the new location4. The other commands are not relevant for this task.
Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?
Correct Answer:
A
This is the command that you would use to access all of the attributes and details of a resource managed by Terraform, by providing the resource address as an argument. For example, terraform state show 'aws_instance.example' will show you all the information about the AWS instance named example.
You cannot install third party plugins using terraform init.
Correct Answer:
B
You can install third party plugins using terraform init, as long as you specify the plugin directory in your configuration or as a command-line argument. You can also use the terraform providers mirror command to create a local mirror of providers from any source.