-
Notifications
You must be signed in to change notification settings - Fork 60
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
[Feature Request] Like other tools, attempt to locate a .tfmigrate.hcl
in parent directories
#199
Comments
I'm open to adding a new environment variable for the tfmigrate's configuration file path, but hesitant about implicitly exploring the parent directory. Reading above the current directory adds a lot of complexity, so just because other tools are doing it is not a good enough reason. Is your specific use case related to #200? |
An environment variable is better than nothing as long as it supports relative pathing in some manner.
That isn't the exact use case though they can go hand in hand. It's worth considering why other tooling in the space does so. With something like tfmigrate (or a linter, or other tooling), you want everyone who uses the tool to leverage the same configuration. That's typically performed by checking for config files in a number of locations given some order of precedence (Typically env var or CLI, current dir, parent dir, then home dir). With this sort of setup it's possible to check configuration directly into the repository so all other tooling/people using tfmigrate utilize the correct configuration. With this method it is also possible, if desired, to override the configuration as needed. For
|
Each tool has its own context. It seems to me that it is simply a matter of running the tfmigrate command in the parent directory where the configuration file is located, not in the children's directory. You don't need to go to the children's directory. Because the state block in the migration file has a dir attribute that specifies the working directory, and the multi_state block also has from_dir and to_dir attributes. Am I missing something? |
Currently leveraging the config file requires passing in the config option everytime the command is used.
It would be useful if
tfmigrate
attempted to locate the configuration in parent directories when the config option is not passed in.The text was updated successfully, but these errors were encountered: