To enable team-based cost tracking, which approach for a billing_dept tag is appropriate?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

To enable team-based cost tracking, which approach for a billing_dept tag is appropriate?

Explanation:
Using a billing_dept variable and referencing it in resource tags lets you drive the cost-attribution tag from a single, central source. This means all resources can share the same tag value, and you can change or override it easily without editing every resource block. It also fits well with modules and automation, so different teams or environments can apply the appropriate department value during plan or apply without duplicating effort. Hardcoding the tag in every resource leads to drift and becomes a maintenance headache as the directory grows. A local value with a fixed tag lacks flexibility—it's tied to a specific module or context and isn’t easy to reuse across environments or teams. A provider default tag applies broadly and can conflict with more granular per-resource tagging, making it harder to allocate costs accurately for different teams.

Using a billing_dept variable and referencing it in resource tags lets you drive the cost-attribution tag from a single, central source. This means all resources can share the same tag value, and you can change or override it easily without editing every resource block. It also fits well with modules and automation, so different teams or environments can apply the appropriate department value during plan or apply without duplicating effort.

Hardcoding the tag in every resource leads to drift and becomes a maintenance headache as the directory grows. A local value with a fixed tag lacks flexibility—it's tied to a specific module or context and isn’t easy to reuse across environments or teams. A provider default tag applies broadly and can conflict with more granular per-resource tagging, making it harder to allocate costs accurately for different teams.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy