TERRAFORM-ASSOCIATE-004 Exam Questions
262 real TERRAFORM-ASSOCIATE-004 exam questions with expert-verified answers and explanations. Page 5 of 6.
- Question #206Understand Terraform Basics
You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully. What will happen if y...
Terraform apply workflowIdempotencyTerraform stateDesired state - Question #207Understand Infrastructure as Code (IaC) Concepts
Which statement describes a goal of Infrastructure as Code (IaC)?
Infrastructure as CodeIaC goalsProgrammatic configurationResource management - Question #208Use Terraform CLI
terraform init creates an example main.tf file in the current directory.
terraform initCLI commandsinitializationconfiguration files - Question #209Manage Terraform State
You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?
terraform importmanaging existing infrastructureterraform stateCLI commands - Question #210Use Terraform CLI
terraform destroy is the only way to remove infrastructure.
terraform destroyterraform applyresource lifecycleinfrastructure removal - Question #211Use Terraform CLI
Terraform installs its providers during which phase?
terraform initprovidersprovider installationTerraform workflow - Question #212Manage Terraform State
A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?
terraform applystate driftresource reconciliationinfrastructure management - Question #213Use Terraform CLI
terraform apply is failing with the following error. What next step should you take to determine the root cause of the problem? Error: yaml CopyEdit Error loading state: AccessDeni...
Terraform CLI debuggingError troubleshootingTF_LOGState backend access - Question #214Work with Terraform Configurations
A resource block is shown in the Exhibit section of this page. How would you reference the attribute name of this resource in HCL?
HCLResource ReferencingAttributesSyntax - Question #215Work with Terraform Modules
A child module can always access variables declared in its parent module.
Module VariablesModule InputsModule EncapsulationData Flow Between Modules - Question #216Use Terraform CLI
You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?
Terraform CLIProvider managementterraform initProvider versions - Question #217Use Terraform CLI
terraform init retrieves and caches the configuration for all remote modules.
terraform initmodulesmodule installationcaching - Question #218Manage Terraform State
Which command does not cause Terraform to refresh its state?
Terraform CLITerraform stateState refreshterraform state list - Question #219Understand Terraform Providers
What functionality do providers offer in Terraform? (Pick 3 correct responses)
Terraform providersProvider functionalityResource provisioningAPI interaction - Question #220Use Terraform CLI
You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time. Which Terrafor...
Terraform workflowterraform initInitializationCLI commands - Question #221Use Terraform CLI
Which of the following is true about terraform apply? (Pick 2 correct responses)
terraform applyTerraform CLIresource lifecycleconfiguration scope - Question #222Use Terraform CLI
When you initialize Terraform, where does it cache modules from the public Terraform Registry?
terraform initmodule caching.terraform directorypublic registry - Question #223Use Terraform CLI
terraform apply will fail if you have not run terraform plan first to update the plan output.
terraform applyterraform planCLI workflow - Question #224Manage Terraform State
A Terraform backend determines how Terraform loads state and stores updates when you execute which command?
Terraform backendState managementterraform applyterraform destroy - Question #225Use Terraform CLI
What command can you run to generate DOT (Graphviz) formatted data to visualize Terraform dependencies?
terraform graphCLI commandsdependency visualizationGraphviz DOT - Question #226Understand Terraform Cloud and Enterprise Capabilities
Which of the following is available only in HCP Terraform workspaces and not in Terraform CLI?
HCP TerraformWorkspacesRemote StateState Sharing - Question #227Work with Terraform Modules
Which argument can you use to prevent unexpected updates to a module's configuration when calling Terraform Registry modules?
Terraform ModulesModule VersioningTerraform Registry - Question #228Use Terraform CLI
terraform validate confirms the syntax of Terraform files.
terraform validateCLI commandssyntax validationconfiguration validation - Question #229Understand Infrastructure as Code (IaC) Concepts
Which of the following is not an advantage of using Infrastructure as Code (IaC) operations?
Infrastructure as Code (IaC)IaC benefitsAutomation - Question #230Understand Terraform Basics
Terraform requires the Go runtime as a prerequisite for installation.
Terraform installationPrerequisitesGo runtimeBinary distribution - Question #231Manage Terraform State
What is modified when executing Terraform in refresh-only mode?
Terraform CLIState managementRefresh-only mode - Question #232Work with Terraform Modules
Which of the following locations can Terraform use as a private source for modules? (Pick 2 correct responses)
Terraform ModulesPrivate Module SourcesVCS Integration - Question #233Manage Terraform State
By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?
Terraform stateLocal stateState fileDefault behavior - Question #234Understand Terraform Providers
You have developed a new cloud-based service that uses proprietary APIs and want to use Terraform to create, manage, and delete users from the service. How can Terraform interact w...
Custom providersProvider developmentAPI integrationTerraform extensibility - Question #235Understand Terraform Providers
What is a Terraform provider not responsible for?
Terraform ProvidersProvider responsibilitiesTerraform coreMulti-cloud provisioning - Question #236Understand Terraform Providers
What is the purpose of the terraform.lock.hcl file in Terraform?
terraform.lock.hclprovider dependenciesdependency lockingterraform init - Question #237Manage Terraform State
What task does the terraform import command perform?
terraform importstate managementCLI commandsexisting resources - Question #238Use Terraform CLI
Which of the following can you do with terraform plan? (Pick 2 correct responses)
terraform planCLI commandsexecution planpreview changes - Question #239Work with Terraform Modules
What type of information can be found on the Terraform Registry when using published modules?
Terraform RegistryModulesModule documentationVariables and Outputs - Question #240Use Terraform CLI
When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.
terraform applyoutput valuesmodulesCLI behavior - Question #241Manage Terraform State
When you use a backend that requires authentication, it is best practice to:
AuthenticationBackend configurationSecurity best practicesEnvironment variables - Question #242Manage Terraform State
You modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state...
moved blockresource renamingstate managementrefactoring - Question #243Understand Terraform Providers
Which of the following should you add in the required_providers block to define a provider version constraint?
provider version constraintrequired_providers blockHCL syntaxprovider configuration - Question #244Understand Terraform Cloud and Enterprise Capabilities
One cloud block always maps to a single HCP Terraform/Terraform Cloud workspace.
cloud blockTerraform CloudHCP Terraformworkspaces - Question #245Work with Terraform Modules
If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.
Terraform modulesModule variablesRequired variablesModule inputs - Question #246Work with Terraform Modules
If one of your modules uses a local value, you can expose that value to callers of the module by defining a Terraform output in the module's configuration.
Terraform modulesOutputsLocal valuesModule composition - Question #247Manage Terraform State
A developer launched a VM outside of the Terraform workflow and ended up with two servers with the same name. They are unsure which VM is managed with Terraform, but they do have a...
Terraform stateState inspectionTerraform CLIResource identification - Question #248Use Terraform CLI
Only the user that generated a terraform plan may apply it.
terraform planterraform applyworkflowCLI execution - Question #249Work 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 a...
Terraform functionsFile system operationsConfiguration syntaxBuilt-in functions - Question #250Understand Terraform Cloud and Enterprise Capabilities
You are tasked with making a change to an infrastructure stack running in a public cloud using HCP Terraform/Terraform Cloud. Which pattern follows IaC best practices?
IaC Best PracticesTerraform Cloud WorkflowVersion ControlGitOps - Question #252Understand Terraform Providers
Which of the following should you add in the required_providers block to define a provider version constraint?
Provider version constraintsrequired_providers blockTerraform configuration syntax - Question #253Manage Terraform State
When you use a backend that requires authentication, it is best practice to:
AuthenticationBackend ConfigurationSecurity Best PracticesEnvironment Variables - Question #254Understand Terraform Providers
You need to deploy resources into two different regions in the same Terraform configuration. To do this, you declare multiple provider configurations as shown in the Exhibit space...
Provider ConfigurationProvider AliasesResource Meta-Arguments - Question #255Work with Terraform Configurations
A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of that resource block?
resource blockresource nameHCL syntax - Question #256Use Terraform CLI
What does terraform destroy do?
terraform destroyTerraform CLIinfrastructure deletionTerraform state