Deck-1 Flashcards
What are the features exclusive to Terraform Enterprise? Choose 2 correct answeres.
SAML SSO
Auto Logging
When writing Terraform code, HashiCorp recommends that you use how many spaces between each nesting level?
2 spaces
Default workspace cannot be deleted?
True
Why should you constrain the acceptable provider versions in Terraform configuration for production use?
Provide version constraints make sure only matching versions are cached under the plugin directory and remove other versions to optimized disk space usage.
Providers are plugins released on a separate rhythm from Terraform, so providers have their own version numbers, and version constraint ensures that new versions with breaking changes will not be automatically installed by terraform init in the future.
Medium Corp is making use of an open-source version of Terraform. You have created a number of reusable modules for various components that you want to share with your team.
What is the right approach to do that?
Terraform modules cannot be shared in the OSS version. Each developer needs to maintain its own modules and leverage them in the main tf file.
Upload your modules with proper versioning in the terraform module registry. Terraform OSS is directly integrated with the public module registry and can reference the modules from the code in the main tf file.
The terraform refresh command is used to reconcile the state Terraform knows via its _______
with the real-world infrastructure.
state file
Where does terraform store the data associated with the current state of your infrastructure when terraform plan is run?
state file
Which of the following will allow Matthew to stream the output of terraform plan that is running in Terraform Cloud locally?
Remote Backends
Which Terraform files should be ignored by Git when committing code to a repository? (Choose Three)
Files named exactly terraform.tfvars or terraform.tfvars.json
terraform.tfstate
Any files with names ending in .auto.tfvars or .auto.tfvars.json
Before a new provider can be used, it must be ______ and _______.
declared in the configuration.
initialized
The following snippet is from the Terraform 0.11 version. Which of the below is the equivalent 0.12 version code?
${var.instance_types}”
var.instance_types
When terraform refresh command is run, what are the operations that happen?
terraform refresh syncs the state file with the real world infrastructure.
What tasks are achieved while running a terrafom plan?
Create an execution plan by evaluatating the difference between the configuration file and state file.
Which of the following commands will implicitly not run terraform refresh?
terraform init
Which of the following variable declarations is going to result in an error?
Lists are defined with [ ] and maps are defined with { }.