import re


def parse_data_refs(tf_content):
  """
  Look for references to other remote states. These references look like this:
  gcp_org_id = "${data.terraform_remote_state.foundation.org_id}"
  """
  result = []
  p = re.compile(r'data\.terraform_remote_state\.([_a-z][_\-0-9a-z]*)\.')
  result = p.findall(tf_content)
  # remove duplicates
  if len(result) > 1:
    res_set = set(result)
    result = list(res_set)
  
  return result