terraform-maven
terraform-maven copied to clipboard
tf:clean jumps up two levels of parent directory, eventually errors with Nullpointer for 'src/main/<custom_root_dir>'
When tf:clean goal is invoked with tfRootDir=src/main/<custom_root_dir>, the TerraformClean jumps up two levels of parent directory and eventually error as Path("") is evaluated at some point.
Steps to reproduce the behavior:
- Create a terraform configuration like below /src/main/tf_root_dir
- Run tf:clean -DtfRootDir=tf_root_dir
- (side effect) The above command also cleans up other modules under "src"
Expected behavior tf:clean cleans up .terraform and .tfstate files only in the given Root Directory, not in other directories.