Skip to content

Manage common Terraform variable definitions centrally #3935

@samsimpson1

Description

@samsimpson1

User Need

As a Terraform user
I want common Terraform variables (govuk_environment, cluster_name, etc) to be defined centrally
so that I can benefit from consistent variable types, validation and descriptions.


Context

(Add any extra context, links, diagrams, stakeholder interviews, etc.)

We have a set of common variables which are used by a lot of different TF roots, but they don't have consistent variable definitions. This means variable type, descriptions and validation is inconsistent across roots. Also, not all roots define all common variables, leading to warnings in the Terraform Cloud console.

GOV.UK Forms uses a common inputs.tf file, which is symlinked into each Terraform root. We could copy this approach.


What’s Needed

List anything the solution must do or be (behaviour, performance, security, UX, etc.).

  • Create a standard variables file, which contains definitions for all common variables
  • Replace existing variable definitions in roots that use common variables with the new standard ones
  • Include validation on variables where appropriate

Acceptance Criteria

Clear, measurable conditions to verify the story is complete and valuable.

  • Each common variable has a standard definition, with accurate description and type
  • Each TF root that uses common variables is using the standard definitions

Metadata

Metadata

Assignees

Labels

RefinedA ticket that's been parsed by the forum of people in backlog refinement

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions