# Multi-Repo and Referencing Table names and other resources

**URL:** <https://discourse.sst.dev/t/multi-repo-and-referencing-table-names-and-other-resources/543>\
**Category:** Chapter Comments\
**Created:** [October 16, 2018, 12:27pm UTC](https://discourse.sst.dev/t/multi-repo-and-referencing-table-names-and-other-resources/543 "2018-10-16T12:27:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bush](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/bush/32/289_2.png) [@bush](https://discourse.sst.dev/u/bush)\
**Post date:** [October 16, 2018, 12:27pm UTC](https://discourse.sst.dev/t/multi-repo-and-referencing-table-names-and-other-resources/543/1 "2018-10-16T12:27:21Z")

</div>

In the [API Gateway Domains](https://serverless-stack.com/chapters/api-gateway-domains-across-services.html) chapter the guides talks about referencing table names from a different serverless.yml file but if the database service is in a different repo we can’t do this:

```auto
provider:
  name: aws
  runtime: nodejs8.10
  stage: dev
  region: us-east-1

  # These environment variables are made available to our functions
  # under process.env.
  environment:
    tableName:
      ${file(../database/serverless.yml):custom.tableName} <-- serverless.yml won't be available
...

```

How would we reference the dynamo table name if we split out the database into a different repo?

---

<div class="post-metadata">

**Author:** ![bush](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/bush/32/289_2.png) [@bush](https://discourse.sst.dev/u/bush)\
**Post date:** [October 17, 2018, 2:10pm UTC](https://discourse.sst.dev/t/multi-repo-and-referencing-table-names-and-other-resources/543/2 "2018-10-17T14:10:09Z")

</div>

Ok I think I answered my own question … in the previous chapter the tablename is exported like this:

```auto
Outputs:
    Value:
      Ref: NotesTable
    Export:
      Name: NotesTableName

```

So it should be trivial to add do this:

```auto
provider:
  name: aws
  runtime: nodejs8.10
  stage: dev
  region: us-east-1

  # These environment variables are made available to our functions
  # under process.env.
  environment:
    tableName:
      'Fn::ImportValue': NotesTableName
...

```

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [October 18, 2018, 7:39pm UTC](https://discourse.sst.dev/t/multi-repo-and-referencing-table-names-and-other-resources/543/3 "2018-10-18T19:39:24Z")

</div>

Yup that is one way. You can also directly refer to the table through the file.

> <https://github.com/AnomalyInnovations/serverless-stack-demo-mono-api/blob/master/services/users/serverless.yml#L24>

---

<div class="post-metadata">

**Author:** ![bush](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/bush/32/289_2.png) [@bush](https://discourse.sst.dev/u/bush)\
**Post date:** [October 19, 2018, 7:16pm UTC](https://discourse.sst.dev/t/multi-repo-and-referencing-table-names-and-other-resources/543/4 "2018-10-19T19:16:36Z")

</div>

Right but how would you access …/database/serverless.yml if its in a different repo?

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [October 28, 2018, 1:51am UTC](https://discourse.sst.dev/t/multi-repo-and-referencing-table-names-and-other-resources/543/5 "2018-10-28T01:51:46Z")

</div>

Yeah this one is only applicable to the mono-repo case.
