Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ALL variables - FEEDBACK / HELP #3411

Closed
npalm opened this issue Aug 5, 2023 · 2 comments
Closed

Refactor ALL variables - FEEDBACK / HELP #3411

npalm opened this issue Aug 5, 2023 · 2 comments
Labels
abandoned enhancement New feature or request help wanted Extra attention is needed Stale

Comments

@npalm
Copy link
Member

npalm commented Aug 5, 2023

Problem

The runner module is configurable via many variables. From day one the intention was to keep the module simple to use, and ensure it work out of the box with minimal configuration. To allow the user to adjust the module to their needs a lot of variables are offered over time. Althowu we tried to keep certain naming convention; this is not properly applied anymore. Also, when we made the first version of the module optional were not supported by Terraform.

We think it is time to rethink the variables and make a major refactoring. We not planning to drop support for variable but just among better naming, and when possible, add validation.

Any support from the community would be welcome of course.

Approach - prefix style

In this approach we prefix each variable with a predefined set of prefixes. An example could be:

  • network_vpc_id, network_subnet_id
  • runner_ec2_userdata_enable, runner_ec2_userdata_template

Disadvantage

  • No option to validate variables that are correlated, for example en userdata is not enabled, it does not make sense to proivde a template.
  • Keeps a lot of duplication by copying varaibles to submodules

Advantages

  • Logical grouping via normal sorting

Approach - object style

In this approach we define object for variables that logically group togehter. The object names are like the prefixes of the other option.

Disadvantage

  • Description needs to describe multiple attributes

Advantage

  • Option validate correlation variables
  • Less copying when passing values to submodules, just pass the object

Migration

These changes will be breaking and requiring migration. The intention is to move all not supported variables to the variable deprecated file, and throw an error when used, with a hint for migration.

@npalm npalm changed the title Refactor ALL variables Refactor ALL variables - FEEDBACK / HELP Aug 5, 2023
@npalm npalm pinned this issue Aug 5, 2023
@npalm npalm added enhancement New feature or request help wanted Extra attention is needed labels Aug 5, 2023
@npalm
Copy link
Member Author

npalm commented Aug 5, 2023

cc: @koendelaat @GuptaNavdeep1983

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Sep 5, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned enhancement New feature or request help wanted Extra attention is needed Stale
Projects
None yet
Development

No branches or pull requests

1 participant