Free TAO-Pro sample questions
Here are free TAO-Pro sample questions with answers and explanations. They cover HCL functions, module refactoring and provider configuration. The real exam includes hands-on labs, so also try each task in your own Terraform setup.
Try them in the simulator Same questions, with study, timed and flashcard modes.
Showing 8 of 17 free sample questions.
You are refactoring a Terraform configuration that manages an AWS VPC. You want to extract the security group rules into a separate module. However, the security groups themselves must remain in the root module. You need to pass the security group ID from the root module to the new child module. Which Terraform concept facilitates this data flow?
A developer has defined a resource `aws_s3_bucket.data` with `count = 3`. They now realize that managing these buckets by numerical index is brittle, as removing the first bucket causes the remaining two to be renamed and recreated. They decide to switch to `for_each` using a map of bucket names. What is the critical step they must take to ensure the existing buckets are mapped to the new string-based keys without deletion?
You are designing a Terraform workflow for a regulated industry. You need to enforce a policy that checks if an S3 bucket is public *before* the infrastructure is provisioned. If the plan indicates the bucket will be public, the run should fail immediately. Which feature allows you to define this assertion directly within the HCL configuration to run during the planning phase?
You are working on a Terraform configuration that provisions a multi-region application. You have a root module that instantiates a child module named `network`. The root module has two provider configurations for AWS: the default one (us-east-1) and an aliased one (us-west-2). You need to pass the aliased provider to the `network` module so it creates resources in us-west-2. Which syntax correctly achieves this?
You need to select ALL correct statements regarding the `terraform plan -refresh-only` command. (Select TWO)
Which Terraform function would you use to read the contents of a file from the local filesystem and return it as a string, while ensuring that the file contents are treated as UTF-8 encoded text?
You are designing a module that accepts a variable `instance_count`. You want to use this variable to create multiple EC2 instances, but only if the variable `enable_instances` is set to `true`. If `enable_instances` is false, no instances should be created. Which meta-argument combination is best suited for this conditional creation logic?
9 more free samples are waiting
Create a free account to unlock the whole TAO-Pro sample bank, or get full access to all 216 practice questions in the simulator.