True or false: Infrastructure as code prohibits all changes to network infrastructure made through consoles or other tools.
6 Infrastructure as Code for Networks Online Quiz Questions
Use this free practice quiz with 20 questions to review 6 Infrastructure as Code for Networks, test your knowledge, and prepare for your next test or exam.
True or false: If a network configuration is syntactically valid, it is necessarily safe to apply.
- A
True
- B
False
What term describes a difference between declared network configuration and the infrastructure actually in place?
In an infrastructure-as-code workflow, what is the role of a provider?
- A
It stores a record linking each configuration address to a remote object identity.
- B
It translates configuration into API operations.
- C
It guarantees that every proposed network change is harmless.
- D
It replaces the need to review changes in version control.
In Terraform, the record that links configuration addresses to remote object identities is called .
A team has generated a Terraform plan for a network change. What does the plan do by default?
- A
It applies proposed changes and updates state immediately.
- B
It previews proposed actions without itself making those changes.
- C
It guarantees that every proposed action will preserve connectivity.
- D
It removes the need to compare configuration with recorded state.
A reusable network module groups related resources behind .
In the example Terraform configuration, what is the address of the VPC resource?
A team must migrate workloads from an old subnet to a new one. Describe a safe sequence for the migration and explain why the old subnet should not be retired first.
True or false: Using a lifecycle control to create a replacement before destroying an old network resource eliminates the need to review the plan or plan a migration.
- A
True
- B
False
A virtual network was created outside Terraform, and the team now wants Terraform to manage it. Which approach aligns with the recommended state practices?
- A
Delete the existing object and create a replacement through configuration.
- B
Edit the state file directly to add the object.
- C
Import the existing object carefully and maintain the expected one-to-one mapping.
- D
Remove the configuration and rely on the provider to discover the object automatically.
A team wants repeatable network deployments and reviewable changes. Which approach best follows infrastructure-as-code practice?
- A
Describe the desired network in configuration and let the tool determine the needed operations.
- B
Make each network change manually in a console, then record it in notes.
- C
Write a script that always recreates every network resource from scratch.
- D
Use configuration only to document the network after it has been created.
What control should a team use with a shared backend to help prevent conflicting operations on Terraform state?
A team needs a shared way to manage Terraform state while reducing conflicting operations and protecting sensitive values. Which practice is most appropriate?
- A
Store the state file in the shared source-code repository so everyone can edit it.
- B
Give every team member a separate local state file and merge them after deployments.
- C
Use a suitable shared backend with access controls and locking, and keep state files out of version control.
- D
Edit the state file directly whenever a remote resource changes.
A team wants to package a standard virtual network and its subnets so other teams can reuse the pattern by providing inputs and receiving outputs. What should it create?
- A
A report that records every API call made during a deployment.
- B
A reusable group of related resources exposed through inputs and outputs.
- C
A state file that maps resource addresses to remote identities.
- D
A plan that previews proposed resource changes.
In a subnet resource, vpc_id = aws_vpc.core.id refers to the VPC's identifier. What concise term describes the relationship this reference establishes between the resources?
A provider indicates that a network resource's changed attribute cannot be updated in place. What may the plan propose?
- A
The plan may propose destroying and recreating the resource.
- B
The tool must always change the attribute in place.
- C
The tool will automatically remove the resource from state and leave it unmanaged.
- D
The configuration becomes invalid because managed resources cannot be replaced.
An existing network object should remain in place, but the team no longer wants Terraform to manage it. Which approach best matches that intention?
- A
Delete the remote object manually and leave its configuration unchanged.
- B
Remove its state entry by directly editing the state file.
- C
Use the documented state-removal or resource-migration process to stop managing the object without deleting it.
- D
Keep applying the configuration until the resource is recreated.
A virtual network uses the address range 10.20.0.0/16. Which subnet ranges are entirely contained within it? Select all that apply.
- A
10.20.1.0/24
- B
10.20.255.0/24
- C
10.21.0.0/24
- D
10.19.8.0/24
A team wants to reproduce the same network setup in two lab environments and trace which configuration change led to a difference. Which practices directly support these goals? Select all that apply.
- A
Keep configuration in version control so changes can be reviewed and traced.
- B
Reuse the same reviewed configuration to help produce consistent environments.
- C
Rely on each operator to remember and re-enter the configuration.
- D
Make configuration changes without recording them, since the provider tracks every decision.