Add terraform_init_upgrade
When working on different branches, terraform provider versions may differ. Often you forget to run terraform init -upgrade before your regular terraform commands. This rule lets you fix that.
This commit is contained in:
parent
ceeaeab94b
commit
60c21dc5a1
|
|
@ -0,0 +1,10 @@
|
|||
from thefuck.shells import shell
|
||||
from thefuck.utils import for_app
|
||||
|
||||
|
||||
@for_app('terraform')
|
||||
def match(command):
|
||||
return 'Inconsistent dependency lock file' in command.output
|
||||
|
||||
def get_new_command(command):
|
||||
return shell.and_('terraform init -upgrade', command.script)
|
||||
Loading…
Reference in New Issue