def build_v07_spec(config_spec, project, email, zone, setup_project):
  """Create a v0.7 or later KFDef spec."""
  gcp_plugin = None
  for p in config_spec["spec"]["plugins"]:
    if p["kind"] != "KfGcpPlugin":
      continue
    gcp_plugin = p

  if not gcp_plugin:
    raise ValueError("No gcpplugin found in spec")
  gcp_plugin["spec"]["project"] = project
  gcp_plugin["spec"]["email"] = email
  gcp_plugin["spec"]["zone"] = zone
  gcp_plugin["spec"]["skipInitProject"] = not setup_project

  return config_spec