200-301 exam dumps

200-301 practice question 498 of 506

Cisco Certified Network Associate. Free level, Cisco. Free question with the correct answer and a full explanation.

200-301 Question 498

Single answer

A network engineer is tasked with automating the deployment of virtual network infrastructure in a cloud environment using Terraform. During the initial configuration, they need to define a resource block for creating a virtual network. Which key attribute is required in the Terraform resource block to ensure the resource is uniquely identified within the configuration?

  1. A

    resource type

  2. B

    provider configuration

  3. C

    resource name

  4. D

    Terraform state file

Show answer and explanation

Correct answer: C

Explanation

In Terraform, every resource block must have a unique resource name within the configuration to identify and manage the specific resource. This name, combined with the resource type, forms the unique identifier in the state file. Without a unique name, Terraform cannot distinguish between resources of the same type within the configuration.

  • A. Incorrect.

    The resource type defines the kind of resource (e.g., 'aws_instance' or 'azurerm_virtual_network') but does not uniquely identify the resource within the configuration.

  • B. Incorrect.

    The provider configuration specifies which cloud provider (e.g., AWS, Azure, GCP) to use but does not uniquely identify the resource.

  • C. Correct.

    The resource name is required to uniquely identify a specific resource within the configuration. Each resource block must have a unique name to avoid conflicts.

  • D. Incorrect.

    The Terraform state file is used to track the state of resources managed by Terraform but is not an attribute defined in the resource block.

Timed practice exam

Take a 200-301 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam