GraphQL API access to image used by current release of an app

Hi, I’m trying to deploy to fly as a part of a larger terraform deployment. I’m using sullivtr’s GraphQL Terraform Provider (graphql_mutation · Graphql Terraform Provider) and trying to write all the proper queries to treat fly apps like terraform modules.

I think I have almost all the bits I need to make this work, but I can’t find a field anywhere that corresponds to the image used by the current release.

The config returned by app(...) { config } seems to have image stripped from it.

The app(...) { image { ... } } field seems promising, but it has a required ref argument and I can’t find anywhere to pull that from.

I couldn’t see anything relevant in app(...) { currentRelease } either.

Am I missing something? If it’s really not there at all, how hard would it be to add this to the GraphQL API?

Terraform + GraphQL is pretty cool.

It should be quick for us to expose the image URL on a type. We’ll have a look.

It was simple! There’s a new imageRef on the release object. This returns an absolute image reference. When you deploy, we resolve the tag into something like:<app>@sha:ca...fe8:

    release {
1 Like