Comments (3)
@kertzi Thank you for sharing your use-case!
I think it's better to add a new attribute in a migration file rather than tfmigrate's configuration file because a var file is typically related to its workspace.
For a workaround, you can pass any CLI flags to the terraform command via environment variables named TF_CLI_ARGS_<name>
. For example TF_CLI_ARGS_plan="-var-file=somevars.tfvars"
https://www.terraform.io/docs/cli/config/environment-variables.html#tf_cli_args-and-tf_cli_args_name
You can also change environment variables per directory with direnv. For how to integrate them with tfmigrate, see my comment here: #3 (comment)
from tfmigrate.
@kertzi Thank you for sharing your use-case!
I think it's better to add a new attribute in a migration file rather than tfmigrate's configuration file because a var file is typically related to its workspace.
For a workaround, you can pass any CLI flags to the terraform command via environment variables named
TF_CLI_ARGS_<name>
. For exampleTF_CLI_ARGS_plan="-var-file=somevars.tfvars"
https://www.terraform.io/docs/cli/config/environment-variables.html#tf_cli_args-and-tf_cli_args_nameYou can also change environment variables per directory with direnv. For how to integrate them with tfmigrate, see my comment here: #3 (comment)
Thanks for reply, I will check that!
from tfmigrate.
I'm going to close this because there has been no activity on this recently. Please feel free to reopen this if you have any questions or suggestions. Thanks!
from tfmigrate.
Related Issues (20)
- Migrating states from codebases with different terraform version HOT 3
- tfmigrate reports success despite backend not properly configured HOT 1
- Cannot use `*` with tfmigrate actions HOT 4
- Feature request: Display of state plan for to_dir in multi-state HOT 3
- tfmigrate reports migration plan success when Terraform plan command returns an error HOT 2
- Feature request: add an option to skip `terraform plan`-ing HOT 4
- Feature request: support replace-provider HOT 5
- Change tfmigrate-storage license from MPL2 to MIT HOT 3
- Feature request: support skip_plan in state migration HOT 2
- Feature request: support actions spanning multiple HCL files targeting the same projects HOT 4
- multi_state xmv attempts to migrate data sources? HOT 4
- Possible to optimise multi_state_mv execution time?
- Possible to optimise multi_state_mv execution time? HOT 1
- OpenTofu support HOT 3
- Add terraform >=1.1 moved resource documentation? HOT 1
- [bug] Does not work when working with terragrunt & dynamic backend config
- Error executing ftmigrate on MacOS 14.0 (ARM) HOT 1
- split resources with dependencies. HOT 1
- Bug when you have module that have the same resource names
- High vulnerability in golang library HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tfmigrate.