Terraform Associate Flashcards
Select the available arguments that are available for the lifecycle meta-argument
- create_before_destroy
- prevent_destroy
- ignore_change
- ignore_changes
- destroy_after_create
- create_before_destroy
- prevent_destroy
- ignore_changes
terraform import command updates the configuration files as well as the state file, with the details of the infrastructure being imported.
- True
- False
- False
Can we use dynamic blocks to generate meta-argument blocks such as lifecycle and provisioner blocks?
- True
- False
- False
A dynamic block can only generate arguments that belong to the resource type, data source, provider, or provisioner being configured. It is not possible to generate meta-argument blocks such as lifecycle and provisioner blocks, since Terraform must process these before it is safe to evaluate expressions.
Which of the following is not the valid sub-command of terraform state command?
- state list
- state replace
- state pull
- state rm
- state show
- state mv
- state replace
Select the optional arguments that are available for the output block.
- description
- depends_on
- sensitive
4 . All of the above
- All of the above
The for_each meta-argument accepts:
- set of strings
- map
- list of strings
- Only alphanumeric strings
- set of strings
- map
You were working with different terraform scripts which are provisioning various sets of resources , you need to look up for some additional details related to one specific resource from the state file. Which terraform command will help you achieve this?
- terraform state list ADDRESS
- terraform show ADDRESS
- terraform get ADDRESS
- terraform state show ADDRESS
- terraform state show ADDRESS
What are the options that best correspond to the definition of local-only data sources:
- Local-only data sources behave similarly to local values declared using locals block
- Local-only data sources are exactly the same as normal data sources
- It is the same as all other data sources, but their result data exists only temporarily during a Terraform operation
- It is re-calculated each time a new plan is created
- It is the same as all other data sources, but their result data exists only temporarily during a Terraform operation
- It is re-calculated each time a new plan is created
Is it possible for a Terraform configuration to have no modules and still works?
- Terraform configuration needs at least one child module along wit the root module
- Terraform configuration needs at least one one module, i.e. Root module
- None of the options are correct
- It will work with no errors
- Terraform configuration needs at least one one module, i.e. Root module
Which of the following function is no longer available in terraform:
- zipmap()
- map()
- tomap()
- None of the above
- map()
Which option best describes the meaning of interpolation syntax?
- None of the above
- A way to declare values to variables
- A way to provide runtime options with terraform operations
- A way to reference variables, attributes or resources, and call functions
- A way to reference variables, attributes or resources, and call functions
Select the reasons why we may need to specify the provider’s argument?
- No specific reason
- To change the default provider configurations
- To use multiple provider plugins in the same configuration
- It’s just a practice we need to blindly follow
- To use multiple configurations of the same provider
- To change the default provider configurations
- To use multiple configurations of the same provider
Which argument of the lifecycle meta-argument supports a list as a value ?
- prevent_destroy
- All the options
- create_before_destroy
- ignore_changes
- ignore_changes
ignore_changes (list of attribute names) - By default, Terraform detects any difference in the current settings of a real infrastructure object and plans to update the remote object to match configuration.
Logging can not be enabled separately for the provider plugins using the TF_LOG_PROVIDER environment variable.
- True
- False
- False
Logging can be enabled separately for terraform itself and the provider plugins using the TF_LOG_CORE or TF_LOG_PROVIDER environment variables. These take the same level arguments as TF_LOG, but only activate a subset of the logs.
What will happen if Terraform isn’t able to obtain acceptable versions of external dependencies, or if it doesn’t have an acceptable version of itself?
- It won’t proceed with any plans, applies, or state manipulation actions
- None of the options
- It will attempt to download the newest version that meets the application constraints
- It will ignore such errors and proceed without warning
- It won’t proceed with any plans, applies, or state manipulation actions
Both the root module and any child module can constrain the acceptable versions of Terraform and any providers they use. Terraform considers these constraints equal, and will only proceed if all of them can be met.
Terraform assumes an empty default configuration for any provider that is not explicitly configured.
- True
- False
- True
Unlike many other objects in the Terraform language, a provider block may be omitted if its contents would otherwise be empty. Terraform assumes an empty default configuration for any provider that is not explicitly configured.