TERRAFORM-ASSOCIATE-004 Exam Questions
262 real TERRAFORM-ASSOCIATE-004 exam questions with expert-verified answers and explanations. Page 3 of 6.
- Question #104Work with Terraform Modules
Module version is required to reference a module on the Terraform Module Registry.
Terraform Module RegistryModule SourceModule VersioningModule Usage - Question #106Use Terraform CLI
terraform validate confirms that your infrastructure matches the Terraform state file.
terraform validateCLI commandsconfiguration validationstate file interaction - Question #107Use Terraform CLI
Which command must you first run before performing further Terraform operations in a working directory?
terraform initinitializationterraform workflowCLI commands - Question #108Manage Terraform State
A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don't know which VM Terraform mana...
Terraform stateCLI commandsResource identificationState inspection - Question #109Understand Terraform Cloud and Enterprise Capabilities
When does Sentinel enforce policy logic during a Terraform Cloud run?
SentinelTerraform CloudPolicy as CodeRun Workflow - Question #110Manage Terraform State
You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage...
terraform importmanaging existing resourcesTerraform configurationTerraform state - Question #111Use Terraform CLI
A terraform apply can not _________ infrastructure.
terraform applyterraform importCLI commandsinfrastructure lifecycle - Question #112Use Terraform CLI
How is terraform import run?
terraform importCLI commandsState management - Question #113Understand Terraform Providers
A provider configuration block is required in every Terraform configuration. Example:
providersprovider configurationrequired providersdefault configuration - Question #114Use Terraform CLI
You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability. How can you format Terraform H...
terraform fmtHCL formattingCode standardsTerraform CLI - Question #115Understand Terraform Cloud and Enterprise Capabilities
One remote backend configuration always maps to a single remote workspace.
Remote BackendTerraform CloudWorkspacesState Management - Question #116Use Terraform CLI
Which of the following does terraform apply change after you approve the execution plan? (Choose two.)
terraform applystate filecloud infrastructure - Question #117Manage Terraform State
You are working on some new application features and you want to spin up a copy of your production deployment to perform some quick tests. In order to avoid having to configure a n...
Terraform WorkspacesState ManagementEnvironments - Question #118Manage Terraform State
Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?
terraform state showTerraform CLIState managementResource inspection - Question #119Manage Terraform State
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
Terraform StateManual Changesterraform refreshTerraform Lifecycle - Question #120Work with Terraform Configurations
Which option cannot be used to keep secrets out of Terraform configuration files?
Secrets managementInput variablesSecurity best practicesProviders - Question #121Understand Infrastructure as Code (IaC) Concepts
Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.
Infrastructure as CodeIaC AdvantagesAutomationConsistency - Question #122Understand Terraform Providers
Outside of the required_providers block, Terraform configurations always refer to providers by their local names.
ProvidersProvider ConfigurationProvider AliasesNaming Conventions - Question #123Understand Terraform Providers
Terraform providers are always installed from the Internet.
Provider installationProvider sourcesTerraform Registry - Question #124Manage Terraform State
What feature stops multiple users from operating on the Terraform state at the same time?
State lockingTerraform stateConcurrencyCollaboration - Question #125Work with Terraform Configurations
Which of the following is not a valid siring function in Terraform?
Terraform functionsString functionsHCL expressions - Question #126Manage Terraform State
What does the default "local" Terraform backend store?
Terraform backendLocal backendState fileTerraform state - Question #127Understand Terraform Cloud and Enterprise Capabilities
How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?
Terraform CloudVCS IntegrationWorkspace RunsAutomated Workflows - Question #128Use Terraform CLI
You're building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?
sensitive variablesCI/CDTerraform CLIsecurity best practices - Question #129Work with Terraform Modules
If a module declares a variable with a default, that variable must also be defined within the module.
Terraform variablesModule inputsVariable defaultsModule structure - Question #130Manage Terraform State
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)
Terraform StateState DriftManual Changes - Question #131Understand Terraform Providers
Which of the following should you put into the required_providers block?
provider configurationversion constraintsrequired_providerssyntax - Question #132Understand Infrastructure as Code (IaC) Concepts
Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?
Infrastructure as CodeIaC principlesResource provisioningAutomation - Question #133Manage Terraform State
Which are forbidden actions when the terraform state file is locked? Choose three correct answers.
Terraform StateState LockingTerraform CLIConcurrency Control - Question #134Work with Terraform Configurations
Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.
Secrets ManagementRemote BackendSecurity Best PracticesEnvironment Variables - Question #135Understand Terraform Cloud and Enterprise Capabilities
Which of these statements about Terraform Cloud workspaces is false?
Terraform CloudWorkspacesVCS IntegrationSecret Management - Question #136Manage Terraform State
When should you use the force-unlock command?
terraform force-unlockstate lockingtroubleshootingTerraform CLI - Question #137Use Terraform CLI
When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?
terraform importexisting infrastructureconfiguration filesresource block - Question #138Work with Terraform Modules
Variables declared within a module are accessible outside of the module.
Module variablesVariable scopeModule encapsulation - Question #139Manage Terraform State
Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?
Terraform StateSecrets ManagementState Backend EncryptionData Protection - Question #140Use Terraform CLI
If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.
terraform initversion constraintsdependency lock fileprovider versions - Question #141Manage Terraform State
Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?
Terraform BackendState ManagementTerraform CLI CommandsInfrastructure Lifecycle - Question #142Understand Terraform Providers
What does Terraform use the .terraform.lock.hc1 file for?
Provider DependenciesVersion Lockingterraform init - Question #143Manage Terraform State
Why does this backend configuration not follow best practices?
Security Best PracticesBackend ConfigurationCredential ManagementState Management - Question #144Work with Terraform Modules
Module variable assignments are inherited from the parent module and you do not need to explicitly set them.
modulesmodule variablesvariable assignmentinput variables - Question #145Understand Terraform Cloud and Enterprise Capabilities
What are some benefits of using Sentinel with Terraform Cloud/Terra form Cloud? Choose three correct answers.
SentinelPolicy as CodeTerraform CloudSecurity Enforcement - Question #146Understand Terraform Providers
Which of these is true about Terraform's plugin-based architecture?
Terraform architectureProvidersPlugin systemCustom providers - Question #147Understand Terraform Basics
The Terraform binary version and provider versions must match each other in a single configuration.
Terraform versionsProvider versionsVersioning compatibilityCore vs Providers - Question #148Understand Terraform Providers
Which of the following is not true of Terraform providers?
Terraform ProvidersProvider EcosystemProvider MaintenanceProvider Development - Question #149Understand Infrastructure as Code (IaC) Concepts
Which of the following are advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.
Infrastructure as CodeIaC benefitsAutomationVersion Control - Question #150Understand Terraform Cloud and Enterprise Capabilities
What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.
SentinelPolicy as CodeTerraform CloudPolicy Enforcement - Question #151Work with Terraform Modules
Which of the following is not a valid source path for specifying a module?
Module source pathsLocal modulesTerraform Registry modulesGit modules - Question #152Manage Terraform State
Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:
Terraform backendState managementBackend migrationBest practices - Question #153Work with Terraform Configurations
Which type of block fetches or computes information for use elsewhere in a Terraform configuration?
data blocksTerraform configurationinformation retrieval - Question #154Manage Terraform State
Which of these actions will prevent two Terraform runs from changing the same state file at the same time?
Terraform StateState ManagementConcurrencyState File