# Accessing postgres created with \`convox resources create ...\` through CLI

**URL:** <https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76>\
**Category:** Configuration\
**Created:** [February 11, 2019, 7:12pm UTC](https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76 "2019-02-11T19:12:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandontruong](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/brandontruong/32/45_2.png) [@brandontruong](https://community.convox.com/u/brandontruong)\
**Post date:** [February 11, 2019, 7:12pm UTC](https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76/1 "2019-02-11T19:12:22Z")

</div>

I created a couple postgres instances in the past with `convox resources create postgres` (not in my convox.yml) in the past, which are not accessible through `convox resources info/proxy ...` anymore (getting 400s).

Is there a way to re-link an existing created postgres to a service in the CLI – both of which are already deployed? If I add a postgres resource to the convox.yml to deploy, it’ll create a new one which I don’t want. I tried `convox rack resources link postgres-XXXX` but that gave me a `ERROR: resource type postgres does not have a link strategy`

Tangentially, how would I deploy service-independent resources like a postgres instance that I want to connect to via multiple services (also, would that even be good practice vs. tying it to a service)?

---

<div class="post-metadata">

**Author:** ![joe](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@joe](https://community.convox.com/u/joe)\
**Post date:** [March 1, 2019, 6:44pm UTC](https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76/2 "2019-03-01T18:44:10Z")

</div>

We were totally blindsided with this change as well. The docs are super vague on how any of this works. On top of that, I’m a bit worried that this post has been up for almost 3 weeks with no response.

---

<div class="post-metadata">

**Author:** ![ddollar](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/ddollar/32/3_2.png) [@ddollar](https://community.convox.com/u/ddollar)\
**Post date:** [March 2, 2019, 12:08am UTC](https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76/3 "2019-03-02T00:08:57Z")

</div>

To work with rack level resource you now use the `convox rack resources ...` CLI namespace.

See these for more details:

> [@\[20190115161630\] Rack Resources Namespace](https://community.convox.com/t/20190115161630-rack-resources-namespace/87):
>
> This release moves existing convox resources cli commands to the convox rack resources namespace and adds new convox resources for app-level resources: convox resources -a \<app\> convox resources info \<resource\> -a \<app\> convox resources proxy \<resource\> -a \<app\> convox resources url \<resource\> -a \<app\> [#3068](https://github.com/convox/rack/pull/3068) separate rack and app level resources [[@ddollar](https://github.com/ddollar)] [#3071](https://github.com/convox/rack/pull/3071) add encrypted option to app-level databases [[@ddollar](https://github.com/ddollar)] [#3072](https://github.com/convox/rack/pull/3072) expose internal router host if set [[@ddollar](https://github.com/ddollar)]

[https://docs.convox.com/gen1/resources](https://docs.convox.com/gen1/resources)

---

<div class="post-metadata">

**Author:** ![joe](https://avatars.discourse-cdn.com/v4/letter/j/b9e5f3/32.png) [@joe](https://community.convox.com/u/joe)\
**Post date:** [March 4, 2019, 2:51pm UTC](https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76/4 "2019-03-04T14:51:44Z")

</div>

It seems like this is sort of blurring the lines between what is “Gen 1” and what is “Gen 2”. We moved to “Gen 2” quite some time ago - or so we thought. I didn’t even consider that we were still using “Gen 1 resources” - in my mind we had moved past Gen 1 entirely at this point, but it seems like things are still being thrown back into the “Gen 1” bucket. It’s extremely difficult to stay on top of what is changing, and what is being deprecated as a “Gen 1” feature.

Plus we’re actually losing functionality. As far as I can tell there is no way to create cross-service resources now? It’s also not clear when resources are created and destroyed. For example, if an RDS instance is removed from the YAML, does that cause it to be destroyed entirely?

I like that I can now subscribe to the “releases” forum - that should help significantly. But there are still a lot of unknowns. We’re using this stuff in production, and it’s becoming increasingly scary for us. So far nothing has broken, but these changes feel very random to us and it doesn’t inspire confidence. Is there a roadmap I should be paying attention to or some other information source around what we can expect to change moving forward?

---

<div class="post-metadata">

**Author:** ![ddollar](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/ddollar/32/3_2.png) [@ddollar](https://community.convox.com/u/ddollar)\
**Post date:** [March 5, 2019, 8:13pm UTC](https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76/5 "2019-03-05T20:13:56Z")

</div>

> [@joe](#):
>
> As far as I can tell there is no way to create cross-service resources now?

If you really want to use a resource across multiple apps, you can create an “application” that contains only the shared resource(s). You can then copy the connection information from `convox resources` into environment variables of other applications.

That being said, I generally advise against sharing resources across applications. Coordinating schema changes between codebases can be quite tricky.

> [@joe](#):
>
> It’s also not clear when resources are created and destroyed. For example, if an RDS instance is removed from the YAML, does that cause it to be destroyed entirely?

Yes, just like any other item you add/remove from the `convox.yml` it will be created or destroyed when it is added/removed.

All databases are snapshotted before they are deleted.

---

<div class="post-metadata">

**Author:** ![nathan.f77](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/nathan.f77/32/256_2.png) [@nathan.f77](https://community.convox.com/u/nathan.f77)\
**Post date:** [April 27, 2019, 6:31pm UTC](https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76/6 "2019-04-27T18:31:37Z")

</div>

@ddollar Thanks for the clarification!

I’m also a bit worried that my Gen 1 resources (RDS and ElastiCache) might have problems in the future, because I haven’t added any resources to my `convox.yml`. (And I just found out about this change.) I’ve turned on termination protection for everything important, and my app connects to them via the configuration in an ENV variable, so it seems like it should be fairly stable.

Is there a migration path where I can move my earlier resources into the `convox.yml`, so that I can stay on top of the latest changes? E.g. Can I convert a rack resource to an app resource, and then move it into my `convox.yml`?

I’ve also noticed that `convox help` is missing any details about the `convox rack resources` commands. I guess this is because they are deprecated?

---

<div class="post-metadata">

**Author:** ![nathan.f77](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.convox.com/nathan.f77/32/256_2.png) [@nathan.f77](https://community.convox.com/u/nathan.f77)\
**Post date:** [April 27, 2019, 6:50pm UTC](https://community.convox.com/t/accessing-postgres-created-with-convox-resources-create-through-cli/76/7 "2019-04-27T18:50:27Z")

</div>

I also just saw that S3 is no longer mentioned in the documentation. Is it still possible to create an S3 bucket through Convox (either the CLI, or `convox.yml`?)

EDIT: I figured out that the command still works if I create a rack resource:

```auto
convox rack resources create s3 --name "my-bucket" --wait

```

It would be really helpful to add this to the documentation and the `convox help` output.
