Deck 1: HashiCorp Certified: Terraform Associate
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/33
العب
ملء الشاشة (f)
Deck 1: HashiCorp Certified: Terraform Associate
1
Which of the following is the correct way to pass the value in the variable num_servers into a module with the input servers?
A) servers = num_servers
B) servers = variable.num_servers
C) servers = var(num_servers)
D) servers = var.num_servers
A) servers = num_servers
B) servers = variable.num_servers
C) servers = var(num_servers)
D) servers = var.num_servers
A
2
If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?
A) Run terraform refresh
B) It will happen automatically
C) Manually update the state fire
D) Run terraform import
A) Run terraform refresh
B) It will happen automatically
C) Manually update the state fire
D) Run terraform import
B
3
Terraform requires the Go runtime as a prerequisite for installation.
False
4
You run a local-exec provisioner in a null resource called null_resource.run_script and realize that you need to rerun the script. Which of the following commands would you use first?
A) terraform taint null_resource.run_script
B) terraform apply -target=null_resource.run_script
C) terraform validate null_resource.run_script
D) terraform plan -target=null_resource.run_script
A) terraform taint null_resource.run_script
B) terraform apply -target=null_resource.run_script
C) terraform validate null_resource.run_script
D) terraform plan -target=null_resource.run_script
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
5
Terraform can import modules from a number of sources - which of the following is not a valid source?
A) FTP server
B) GitHub repository
C) Local path
D) Terraform Module Registry
A) FTP server
B) GitHub repository
C) Local path
D) Terraform Module Registry
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
6
Why would you use the terraform taint command?
A) When you want to force Terraform to destroy a resource on the next apply
B) When you want to force Terraform to destroy and recreate a resource on the next apply
C) When you want Terraform to ignore a resource on the next apply
D) When you want Terraform to destroy all the infrastructure in your workspace
A) When you want to force Terraform to destroy a resource on the next apply
B) When you want to force Terraform to destroy and recreate a resource on the next apply
C) When you want Terraform to ignore a resource on the next apply
D) When you want Terraform to destroy all the infrastructure in your workspace
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
7
Which of the following is available only in Terraform Enterprise or Cloud workspaces and not in Terraform CLI?
A) Secure variable storage
B) Support for multiple cloud providers
C) Dry runs with terraform plan
D) Using the workspace as a data source
A) Secure variable storage
B) Support for multiple cloud providers
C) Dry runs with terraform plan
D) Using the workspace as a data source
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
8
Which of the following is not a valid string function in Terraform?
A) split
B) join
C) slice
D) chomp
A) split
B) join
C) slice
D) chomp
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
9
Terraform variables and outputs that set the "description" argument will store that description in the state file.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
10
When should you use the force-unlock command?
A) You see a status message that you cannot acquire the lock
B) You have a high priority change
C) Automatic unlocking failed
D) Your apply failed due to a state lock
A) You see a status message that you cannot acquire the lock
B) You have a high priority change
C) Automatic unlocking failed
D) Your apply failed due to a state lock
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
11
What information does the public Terraform Module Registry automatically expose about published modules?
A) Required input variables
B) Optional inputs variables and default values
C) Outputs
D) All of the above
E) None of the above
A) Required input variables
B) Optional inputs variables and default values
C) Outputs
D) All of the above
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
12
If a module uses a local variable, you can expose that value with a terraform output.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
13
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 HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?
A) Run the terraform fmt command during the code linting phase of your CI/CD process
B) Designate one person in each team to review and format everyone's code
C) Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)
D) Write a shell script to transform Terraform files using tools such as AWK, Python, and sed Write a shell script to transform Terraform files using tools such as AWK, Python, and sed
A) Run the terraform fmt command during the code linting phase of your CI/CD process
B) Designate one person in each team to review and format everyone's code
C) Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)
D) Write a shell script to transform Terraform files using tools such as AWK, Python, and sed Write a shell script to transform Terraform files using tools such as AWK, Python, and sed
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
14
What command does Terraform require the first time you run it within a configuration directory?
A) terraform import
B) terraform init
C) terraform plan
D) terraform workspace
A) terraform import
B) terraform init
C) terraform plan
D) terraform workspace
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
15
One remote backend configuration always maps to a single remote workspace.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
16
You have recently started a new job at a retailer as an engineer. As part of this new role, you have been tasked with evaluating multiple outages that occurred during peak shopping time during the holiday season. Your investigation found that the team is manually deploying new compute instances and configuring each compute instance manually. This has led to inconsistent configuration between each compute instance. How would you solve this using infrastructure as code?
A) Implement a ticketing workflow that makes engineers submit a ticket before manually provisioning and configuring a resource
B) Implement a checklist that engineers can follow when configuring compute instances
C) Replace the compute instance type with a larger version to reduce the number of required deployments
D) Implement a provisioning pipeline that deploys infrastructure configurations committed to your version control system following code reviews
A) Implement a ticketing workflow that makes engineers submit a ticket before manually provisioning and configuring a resource
B) Implement a checklist that engineers can follow when configuring compute instances
C) Replace the compute instance type with a larger version to reduce the number of required deployments
D) Implement a provisioning pipeline that deploys infrastructure configurations committed to your version control system following code reviews
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
17
What does the default "local" Terraform backend store?
A) tfplan files
B) Terraform binary
C) Provider plugins
D) State file
A) tfplan files
B) Terraform binary
C) Provider plugins
D) State file
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
18
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 these VMs using Terraform instead. What are the two things you must do to achieve this? (Choose two.)
A) Provision new VMs using Terraform with the same VM names
B) Use the terraform import command for the existing VMs
C) Write Terraform configuration for the existing VMs
D) Run the terraform import-gcp command
A) Provision new VMs using Terraform with the same VM names
B) Use the terraform import command for the existing VMs
C) Write Terraform configuration for the existing VMs
D) Run the terraform import-gcp command
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
19
You have 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 safe, you would like to first see all the infrastructure that will be deleted by Terraform. Which command should you use to show all of the resources that will be deleted? (Choose two.)
A) Run terraform plan -destroy.
B) This is not possible. You can only show resources that will be created.
C) Run terraform state rm *.
D) Run terraform destroy and it will first output all the resources that will be deleted before prompting for approval.
A) Run terraform plan -destroy.
B) This is not possible. You can only show resources that will be created.
C) Run terraform state rm *.
D) Run terraform destroy and it will first output all the resources that will be deleted before prompting for approval.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
20
How is the Terraform remote backend different than other state backends such as S3, Consul, etc.?
A) It can execute Terraform runs on dedicated infrastructure on premises or in Terraform Cloud
B) It doesn't show the output of a terraform apply locally
C) It is only available to paying customers
D) All of the above
A) It can execute Terraform runs on dedicated infrastructure on premises or in Terraform Cloud
B) It doesn't show the output of a terraform apply locally
C) It is only available to paying customers
D) All of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
21
Only the user that generated a plan may apply it.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
22
What command should you run to display all workspaces for the current configuration?
A) terraform workspace
B) terraform workspace show
C) terraform workspace list
D) terraform show workspace
A) terraform workspace
B) terraform workspace show
C) terraform workspace list
D) terraform show workspace
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
23
Examine the following Terraform configuration, which uses the data source for an AWS AMI. What value should you enter for the ami argument in the AWS instance resource? 
A) aws_ami.ubuntu
B) data.aws_ami.ubuntu
C) data.aws_ami.ubuntu.id
D) aws_ami.ubuntu.id

A) aws_ami.ubuntu
B) data.aws_ami.ubuntu
C) data.aws_ami.ubuntu.id
D) aws_ami.ubuntu.id
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
24
When does terraform apply reflect changes in the cloud environment?
A) Immediately
B) However long it takes the resource provider to fulfill the request
C) After updating the state file
D) Based on the value provided to the -refresh command line argument
E) None of the above
A) Immediately
B) However long it takes the resource provider to fulfill the request
C) After updating the state file
D) Based on the value provided to the -refresh command line argument
E) None of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
25
What value does the Terraform Cloud/Terraform Enterprise private module registry provide over the public Terraform Module Registry?
A) The ability to share modules with public Terraform users and members of Terraform Enterprise Organizations
B) The ability to tag modules by version or release
C) The ability to restrict modules to members of Terraform Cloud or Enterprise organizations
D) The ability to share modules publicly with any user of Terraform
A) The ability to share modules with public Terraform users and members of Terraform Enterprise Organizations
B) The ability to tag modules by version or release
C) The ability to restrict modules to members of Terraform Cloud or Enterprise organizations
D) The ability to share modules publicly with any user of Terraform
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
26
Where does the Terraform local backend store its state?
A) In the /tmp directory
B) In the terraform.tfvars file
C) In the terraform.tfstate file
D) In the user's .terraformrc file
A) In the /tmp directory
B) In the terraform.tfvars file
C) In the terraform.tfstate file
D) In the user's .terraformrc file
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
27
What features does the hosted service Terraform Cloud provide? (Choose two.)
A) Automated infrastructure deployment visualization
B) Automatic backups
C) Remote state storage
D) A web-based user interface (UI)
A) Automated infrastructure deployment visualization
B) Automatic backups
C) Remote state storage
D) A web-based user interface (UI)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
28
Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into syslog.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
29
What is the name assigned by Terraform to reference this resource? 
A) dev
B) azurerm_resource_group
C) azurerm
D) test

A) dev
B) azurerm_resource_group
C) azurerm
D) test
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
30
When using a module block to reference a module stored on the public Terraform Module Registry such as:
How do you specify version 1.0.0?
A) Modules stored on the public Terraform Module Registry do not support versioning
B) Append ?ref=v1.0.0 argument to the source path
C) Add version = "1.0.0" attribute to module block
D) Nothing - modules stored on the public Terraform Module Registry always default to version 1.0.0

A) Modules stored on the public Terraform Module Registry do not support versioning
B) Append ?ref=v1.0.0 argument to the source path
C) Add version = "1.0.0" attribute to module block
D) Nothing - modules stored on the public Terraform Module Registry always default to version 1.0.0
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
31
How would you reference the "name" value of the second instance of this fictitious resource? ![<strong>How would you reference the name value of the second instance of this fictitious resource? </strong> A) element(aws_instance.web, 2) B) aws_instance.web[1].name C) aws_instance.web[1] D) aws_instance.web[2].name E) aws_instance.web.*.name](https://d2lvgg3v3hfg70.cloudfront.net/C1451/11ec4b74_ea4c_217a_8bdc_3f1e1f6b9b3b_C1451_00.jpg)
A) element(aws_instance.web, 2)
B) aws_instance.web[1].name
C) aws_instance.web[1]
D) aws_instance.web[2].name
E) aws_instance.web.*.name
![<strong>How would you reference the name value of the second instance of this fictitious resource? </strong> A) element(aws_instance.web, 2) B) aws_instance.web[1].name C) aws_instance.web[1] D) aws_instance.web[2].name E) aws_instance.web.*.name](https://d2lvgg3v3hfg70.cloudfront.net/C1451/11ec4b74_ea4c_217a_8bdc_3f1e1f6b9b3b_C1451_00.jpg)
A) element(aws_instance.web, 2)
B) aws_instance.web[1].name
C) aws_instance.web[1]
D) aws_instance.web[2].name
E) aws_instance.web.*.name
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
32
What is one disadvantage of using dynamic blocks in Terraform?
A) They cannot be used to loop through a list of values
B) Dynamic blocks can construct repeatable nested blocks
C) They make configuration harder to read and understand
D) Terraform will run more slowly
A) They cannot be used to loop through a list of values
B) Dynamic blocks can construct repeatable nested blocks
C) They make configuration harder to read and understand
D) Terraform will run more slowly
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck
33
Which option can not be used to keep secrets out of Terraform configuration files?
A) A Terraform provider
B) Environment variables
C) A -var flag
D) secure string
A) A Terraform provider
B) Environment variables
C) A -var flag
D) secure string
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 33 في هذه المجموعة.
فتح الحزمة
k this deck