code: def get_module_defined_tf_var(terraform_version_opts, env_name):
      
      if isinstance(terraform_version_opts, six.string_types):
          return terraform_version_opts
      if terraform_version_opts.get(env_name):
          return terraform_version_opts.get(env_name)
      if terraform_version_opts.get('*'):
          return terraform_version_opts.get('*')
      return None
docs: Return version of Terraform requested in module options.