Sample questions
HashiCorp Certified: Terraform Authoring and Operations Professional (AWS provider) (AWS provider) practice questions
You need to share a module across your entire organization. Which registry type should you use?
You want to pass a complex object type to a module, but you need to ensure specific attributes are present. How do you define this in the variable block?
Your organization uses HCP Terraform with projects to group workspaces by business unit. A compliance rule states that any workspace in the 'finance' project must have a cost estim…
Which command helps verify if the providers are properly initialized?
Which TWO of the following are valid uses of the 'for' expression?
When a resource is marked as 'tainted', what is the expected outcome of the next 'terraform apply'?
When migrating from local state to HCP Terraform, which command is used to initialize the migration?
Which TWO of the following are standard stages of an HCP Terraform run pipeline?
If a user wants to ensure that a resource's lifecycle is managed by Terraform but wants to bypass the 'prevent_destroy' protection, what is the best approach?
Which of the following is a primary benefit of using a Private Module Registry?
You manage an Amazon RDS instance with Terraform. During an unrelated deployment, a junior engineer runs `terraform apply` and the instance is unexpectedly destroyed and recreated,…
A team wants to pass a variable "allowed_ports" to a module and guarantee at apply time that every value is an integer between 1024 and 65535, rejecting invalid plans with a clear…
Your team maintains a shared Terraform configuration in a GitHub repository. A developer opens a pull request that changes the instance type of a production EC2 instance. You want…
Which of the following is an advantage of using HCP Terraform over local state for team collaboration?
A provider binary is not found in the local Terraform registry cache. What command should you run to force Terraform to download the provider again?
You are building a module that needs to be consumed by multiple teams. How should you structure your module to ensure that the root module can provide values for variable definitio…
Your team is using HCP Terraform. You need to isolate development, staging, and production environments using the same set of configuration files. Which feature should you implemen…
Which of the following is an advantage of using Variable Sets?
If a developer wants to use a provider that is not in the public registry, can they still use it?
You have defined a resource and set 'prevent_destroy = true'. If you perform a 'terraform destroy', what will happen?
Which TWO of the following are limitations of 'ignore_changes'?
A platform team maintains a shared Terraform child module that contains only a single `aws_s3_bucket` resource and no `provider` block. The module's `versions.tf` declares `require…
During a refactor, an engineer renames the Terraform address of an aws_s3_bucket from aws_s3_bucket.logs to aws_s3_bucket.audit_logs in the configuration, keeping every argument id…
A configuration defines a dynamic block that generates ingress rules for an aws_security_group from a list of objects. Each object has a from_port, to_port, and protocol attribute,…