Added rules to run terraform init before terraform plan or apply (#924)
* Run terraform init to initialize terraform modules * Fix indent * Add unit tests for terraform_init.py
This commit is contained in:
committed by
Vladimir Iakovlev
parent
e047c1eb40
commit
4c3a559124
@@ -0,0 +1,13 @@
|
||||
from thefuck.shells import shell
|
||||
from thefuck.utils import for_app
|
||||
|
||||
|
||||
@for_app('terraform')
|
||||
def match(command):
|
||||
return ('this module is not yet installed' in command.output.lower() or
|
||||
'initialization required' in command.output.lower()
|
||||
)
|
||||
|
||||
|
||||
def get_new_command(command):
|
||||
return shell.and_('terraform init', command.script)
|
||||
Reference in New Issue
Block a user