Skip to main content
Latest Documentation
This is the latest documentation for the Cloud Posse Reference Architecture. To determine which version you're currently using, please see Version Identification.

Proposed: Use Global Filename Convention

Date: 29 Apr 2022

Needs Update!

The content in this ADR may be out-of-date and needing an update. For questions, please reach out to Cloud Posse

  • The proposal has already been adopted, and this ADR needs to be updated to reflect the final decision. We decided on changing the convention to _defaults.

Status​

DRAFT

Problem​

  • There are a lot of globals files scattered across many folders and subfolders. The meaning of the globals file is the same everywhere, but the context in which it is used is by convention based on it’s location in the filesystem.

  • For some people, working in an IDE (e.g. JetBrains, VSCode), it’s easy to get confused on which globals file is being edited.

  • For some people, working on the command line, if the prompt doesn’t show the full hierarchy, knowing which globals file is being edited is also not clear. Including the full path in the prompt, could get too long.

Context​

Considered Options​

Option 1: globals.yaml (what we have today)​

➖ easily confused with stacks; globals are intended to only be imported

Option 2: _globals.yaml​

➕ disambiguate easily between globals (or imports) from stacks using a _ prefix convention

➖ doesn’t solve the filename disambiguation

Option 3: $subpath1-$subpath2-globals.yaml (e.g. eg-prod-globals.yaml) - or something like it​

➖ adds to the naming convention overhead. Moving files around requires renaming files.

Option 4: Find alternatives for IDE​

➕ Enable sorting files first over folders, and using _globals will place them at the top

➕ Enable the path depth

➕ Rainbow plugin

➕ Ship a .vimrc, .VSCcode, .emacs, etc file as a baseline

Decision​

DECIDED:

Consequences​

References​

  • JetBrains has a setting to order