code: def find_min_required(path):
      
      found_min_required = ''
      for filename in glob.glob(os.path.join(path, '*.tf')):
          with open(filename, 'r') as stream:
              tf_config = hcl.load(stream)
              if tf_config.get('terraform', {}).get('required_version'):
                  found_min_required = tf_config.get('terraform',
                                                     {}).get('required_version')
                  break
  
      if found_min_required:
          if re.match(r'^!=.+', found_min_required):
              LOGGER.error('Min required Terraform version is a negation (%s) '
                           '- unable to determine required version',
                           found_min_required)
              sys.exit(1)
          else:
              found_min_required = re.search(r'[0-9]*\.[0-9]*(?:\.[0-9]*)?',
                                             found_min_required).group(0)
              LOGGER.debug("Detected minimum terraform version is %s",
                           found_min_required)
              return found_min_required
      LOGGER.error('Terraform version specified as min-required, but unable to '
                   'find a specified version requirement in this module\'s tf '
                   'files')
      sys.exit(1)
docs: Inspect terraform files and find minimum version.