TERRAFORM-ASSOCIATE-004 Exam Questions
262 real TERRAFORM-ASSOCIATE-004 exam questions with expert-verified answers and explanations. Page 4 of 6.
- Question #155Manage Terraform State
Define the purpose of state in Terraform.
Terraform StateResource MappingState FileMetadata Management - Question #156Manage Terraform State
terraform plan updates your state file.
terraform planstate fileCLI commandsTerraform workflow - Question #157Use Terraform CLI
Why would you use the -replace flag for terraform apply?
Terraform CLIterraform applyResource Lifecycle-replace flag - Question #158Use Terraform CLI
Before you can use a remote backend, you must first execute terra-form init.
terraform initremote backendbackend configurationinitialization - Question #159Use Terraform CLI
While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience slow responses. In order to troubleshoot you decide...
Terraform CLIDebuggingLoggingEnvironment Variables - Question #160Work with Terraform Configurations
You're writing a Terraform configuration that needs to read input from a local file called id_rsa.pub . Which built-in Terraform function can you use to import the file's contents...
Terraform FunctionsFile System InteractionConfiguration Language - Question #161Understand Terraform Basics
Which of the following arguments are required when declaring a Terraform output?
Terraform OutputsHCLConfiguration SyntaxRequired Arguments - Question #163Manage Terraform State
Where in your Terraform configuration do you specify a state backend?
Terraform configurationState backendterraform blockRemote state - Question #164Understand Infrastructure as Code (IaC) Concepts
Infrastructure as Code (laC) can be stored in a version control system along with application code.
Infrastructure as CodeIaC principlesVersion Control - Question #165Use Terraform CLI
terraform validate reports syntax check errors for which of the following?
terraform validateCLI commandssyntax checkingconfiguration validation - Question #166Use Terraform CLI
Which Terraform command checks that your configuration syntax is correct?
Terraform CLIConfiguration ValidationSyntax Checkterraform validate - Question #167Manage Terraform State
What does terraform import do?
terraform importTerraform stateexisting resourcesCLI commands - Question #168Understand Terraform Cloud and Enterprise Capabilities
Which of these are features of Terraform Cloud? Choose two correct answers.
Terraform CloudRemote StateWeb InterfaceCollaboration - Question #169Manage Terraform State
What is terraform refresh-only intended to detect?
terraform refresh-onlystate file driftstate managementTerraform CLI - Question #170Use Terraform CLI
When does Terraform create the .terraform.lock.hc1 file?
terraform initprovider lockingdependency lock fileTerraform CLI - Question #171Work with Terraform Configurations
You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in...
Dynamic BlocksNested BlocksResource ConfigurationVariables - Question #172Manage Terraform State
A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.
sensitive outputsTerraform statestate file securityoutput values - Question #173Manage Terraform State
All standard backend types support state locking, and remote operations like plan, apply, and destroy.
Terraform BackendsState LockingRemote StateRemote Operations - Question #174Manage Terraform State
You can access state stored with the local backend by using terraform_remote_state data source.
Terraform StateLocal BackendRemote State Data SourceState Access - Question #175Use Terraform CLI
How can terraform plan aid in the development process?
terraform planexecution planTerraform CLIstate management - Question #176Use Terraform CLI
Multiple team members are collaborating on infrastructure using Terraform and want to format the* Terraform code following standard Terraform-style convention. How should they ensu...
Terraform CLICode Formattingterraform fmtCoding Conventions - Question #177Work with Terraform Configurations
A resource block is shown in the Exhibit space of this page. How would you reference the "name'' value of the second instance of this resource?
Resource ReferencingResource InstancesHCL AttributesTerraform Expressions - Question #178Work with Terraform Configurations
You have a list of numbers that represents the number of free CPU cores on each virtual cluster: What Terraform function could you use to select the largest number from the list?
Terraform functionsmax functionnumeric functionslist manipulation - Question #179Work with Terraform Modules
All modules published on the official Terraform Module Registry have been verified by HasihCorp.
Terraform Module RegistryModule verificationCommunity modules - Question #180Understand Terraform Providers
What is the provider for this resource?
Terraform ProviderResource BlockSyntaxAWS Provider - Question #181Manage Terraform State
Terraform encrypts sensitive values stored in your state file.
Terraform stateState file securitySensitive dataEncryption - Question #182Understand Terraform Cloud and Enterprise Capabilities
Which of these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)
Terraform Cloud featuresHCP TerraformRemote state managementWeb UI - Question #183Manage Terraform State
Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)
Terraform StateState LockingTerraform CLI Commands - Question #184Understand Terraform Cloud and Enterprise Capabilities
Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?
HCP TerraformTerraform CloudWorkspacesWorkflows - Question #185Understand Terraform Cloud and Enterprise Capabilities
Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)
SentinelPolicy as CodeTerraform CloudPolicy Enforcement - Question #186Use Terraform CLI
You used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be...
Terraform CLIInfrastructure DestructionPlan PreviewDry Run - Question #187Work with Terraform Modules
Terraform configuration can only call modules from the public registry.
Terraform ModulesModule SourcesPublic RegistryPrivate Modules - Question #188Work with Terraform Configurations
You want to use API tokens and other secrets within your team's Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick the 3 correct responses...
Secrets ManagementSensitive VariablesTerraform CloudHashiCorp Vault - Question #189Work with Terraform Modules
When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.
Terraform ModulesModule BlockModule VersioningTerraform Registry - Question #190Work with Terraform Modules
Your root module contains a variable named num_servers. Which is the correct way to pass its value to a child module with an input named servers?
Terraform variablesModule inputsHCL syntaxVariable referencing - Question #191Understand Terraform Providers
What is the provider for the resource shown in the Exhibit? resource "aws_vpc" "main" { name = "test" }
Terraform resource syntaxProvidersResource block structure - Question #192Understand Terraform Cloud and Enterprise Capabilities
Which method for sharing Terraform modules fulfills the following criteria: - Keeps the module configurations confidential within your organization. - Supports Terraform's semantic...
Terraform ModulesPrivate RegistryTerraform CloudModule Sharing - Question #193Use Terraform CLI
When do you need to explicitly execute Terraform in refresh-only mode?
terraform refresh-onlyterraform importterraform clistate management - Question #194Work with Terraform Modules
A module block is shown in the Exhibit space of this page. When you use a module block to reference a module from the Terraform Registry such as the one in the example, how do you...
Terraform ModulesModule VersioningTerraform RegistryModule Block Syntax - Question #195Understand Terraform Basics
What is the Terraform style convention for indenting a nesting level compared to the one above it?
Terraform Style GuideHCL IndentationCode Formattingterraform fmt - Question #196Understand Terraform Cloud and Enterprise Capabilities
In a HCP Terraform/Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.
Terraform CloudHCP TerraformVCS IntegrationSpeculative Plans - Question #197Manage Terraform State
Which command(s) adds existing resources in a public cloud into Terraform state?
terraform importstate managementexisting resourcesCLI commands - Question #198Understand Terraform Cloud and Enterprise Capabilities
Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.
Terraform CloudHCP TerraformRemote StateDeployment Visualization - Question #199Use Terraform CLI
Which of the following is not a way to trigger terraform destroy?
Terraform CLIterraform destroyterraform planResource lifecycle - Question #200Manage Terraform State
Using the terraform state rm command against a resource will destroy it.
terraform state rmTerraform stateResource lifecycleCLI operations - Question #201Manage Terraform State
Before you can use a new backend or HCP Terraform/Terraform Cloud integration, you must first execute terraform init.
terraform initbackendsstate managementHCP Terraform - Question #202Use Terraform CLI
terraform validate uses provider APIs to verify your infrastructure settings.
terraform validateTerraform CLIconfiguration validationprovider interaction - Question #203Manage Terraform State
Terraform variables and outputs that set the description argument will store that description in the state file.
Terraform state fileInput variablesOutput valuesConfiguration vs. State - Question #204Manage Terraform State
You use a cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that listens on port 80. After application changes,...
Terraform StateDrift DetectionTerraform CLIState Management - Question #205Work with Terraform Configurations
A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?
Terraform syntaxResource blocksResource namingHCL