Terraform and Terraform providers must use the same major version number in a single configuration.
A. True
B. False
How can terraform plan aid in the development process?
A. Validates your expectations against the execution plan without permanently modifying state
B. Initializes your working directory containing your Terraform configuration files
C. Formats your Terraform configuration files
D. Reconciles Terraform's state against deployed resources and permanently modifies state using the current status of deployed resources
What is the provider for this fictitious resource?
A. vpc
B. main
C. aws
D. test
Which option can not be used to keep secrets out of Terraform configuration files?
A. A Terraform provider
B. Environment variables
C. A-var flag
D. secure string
Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?
A. servers = num_servers
B. servers = variable.num_servers
C. servers = var(num_servers)
D. servers = var.num_servers
You want to use terraform import to start managing infrastructure that was not originally provisioned through infrastructure as code. Before you can import the resource's current state, what must you do in order to prepare to manage these resources using Terraform?
A. Run terraform refresh to ensure that the state file has the latest information for existing resources.
B. Update the configuration file to include the new resources.
C. Shut down or stop using the resources being imported so no changes are inadvertently missed.
D. Modify the Terraform state file to add the new resources.
The current implementation of Terraform import can only import resources into the state. It does not generate configuration.
A. False
B. True
Which of the following variable definition files will terraform load automatically?
A. terraform.tfvar
B. Any files with names ending in .auto.tfvars.json
C. terraform.tfvars
D. terraform.tfvars.json
Which of the following is not a benefit of adopting infrastructure as code?
A. Automation
B. Versioning
C. Reusability of code
D. Interpolation
Which of the following is not a way to trigger terraform destroy ?
A. Passing---destroy at the end of apian request
B. Running terraform destroy from the correct directory and then typing "yes" when prompted in the CLI
C. Using the destroy command with auto approve
D. Delete the state file and run terraform apply
A user has created a module called "my_test_module" and committed it to GitHub. Over time, several commits have been made with updates to the module, each tagged in GitHub with an incremental version number. Which of the following lines would be required in a module configuration block in terraform to select tagged version v1.0.4?
A. source = "git::https://example.com/my_test_module.git@tag=v1.0.4"
B. source = "git::https://example.com/my_test_module.gitandref=v1.0.4"
C. source = "git::https://example.com/my_test_module.git#tag=v1.0.4"
D. source = "git::https://example.com/my_test_module.git?ref=v1.0.4"
Terraform Enterprise (also referred to as pTFE) requires what type of backend database for a clustered deployment?
A. PostgreSQL
B. Cassandra
C. MySQL
D. MSSQL
What does terraform import allow you to do?
A. Import a new Terraform module
B. Use a state file to import infrastructure to the cloud
C. Import provisioned infrastructure to your state file
D. Import an existing state file to a new Terraform workspace
When configuring a remote backend in Terraform, it might be a good idea to purposely omit some of the required arguments to ensure secrets and other important data aren't inadvertently shared with others. What are the ways the remaining configuration can be added to Terraform so it can initialize and communicate with the backend? (select three)
A. directly querying HashiCorp Vault for the secrets
B. command-line key/value pairs
C. use the-backend-config=PATH to specify a separate config file
D. interactively on the command line
Which of the following is an invalid variable name?
A. count
B. web
C. var1
D. instance_name