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: extract data sources to its own dedicated file #1021

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

lmilbaum
Copy link
Contributor

@lmilbaum lmilbaum commented Oct 27, 2023

Description

Reducing main.tf file size will improve its readability. The data sources are moved to a separate file.

Migrations required

Nn

Verification

No verification done. Just moving the data sources.

@github-actions
Copy link
Contributor

Hey @lmilbaum! 👋

Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process.

Make sure that this PR clearly explains:

  • the problem being solved
  • the best way a reviewer and you can test your changes

With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE.

The following ChatOps commands are supported:

  • /help: notifies a maintainer to help you out

Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command.

This message was generated automatically. You are welcome to improve it.

@lmilbaum lmilbaum changed the title Extract data sources to its own dedicated file Refactor: Extract data sources to its own dedicated file Oct 27, 2023
@lmilbaum lmilbaum changed the title Refactor: Extract data sources to its own dedicated file refactor: Extract data sources to its own dedicated file Oct 27, 2023
@lmilbaum lmilbaum force-pushed the refactoring branch 2 times, most recently from 14ed08f to 1f33698 Compare October 27, 2023 09:21
@lmilbaum lmilbaum changed the title refactor: Extract data sources to its own dedicated file refactor: extract data sources to its own dedicated file Oct 27, 2023
@lmilbaum lmilbaum marked this pull request as ready for review October 27, 2023 09:39
@kayman-mk
Copy link
Collaborator

kayman-mk commented Oct 27, 2023

Refactoring the main.tf is a good idea. I usually prefer to have files grouped by functionality. So I think it would be a good idea to split it into a

  • runner.tf
  • runner-worker.tf
  • ...

and put the data statements into the respective files. I guess some of them are so general that they will end up in a non specific data.tf

What do you think?

@lmilbaum
Copy link
Contributor Author

Refactoring the main.tf is a good idea. I usually prefer to have files grouped by functionality. So I think it would be a good idea to split it into a

  • runner.tf
  • runner-worker.tf
  • ...

and put the data statements into the respective files. I guess some of them are so general that they will end up in a non specific data.tf

What do you think?

I like the suggested approach. Will push a change soon.

@kayman-mk
Copy link
Collaborator

Sorry, wasn't aware that there are only some data sources. Thought we have many more. So I combined everything into one file again. One file per data source is too much overhead.

@kayman-mk
Copy link
Collaborator

Thanks for investing your time to improve the module, @lmilbaum.

@kayman-mk kayman-mk merged commit 8b76c0f into cattle-ops:main Nov 9, 2023
17 checks passed
@lmilbaum lmilbaum deleted the refactoring branch November 11, 2023 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants