sapher/terraform-provider-apollostudio

Error creating graph using apollostudio_graph

Closed this issue · 5 comments

For the following resource:

resource "apollostudio_graph" "test" {
  id          = "testing123"
  name        = "testing123"
  description = "testing123 backend GraphQL API"
}

I am getting

╷
│ Error: Failed to create graph
│ 
│   with apollostudio_graph.test,
│   on apollo.tf line 1, in resource "apollostudio_graph" "test":
│    1: resource "apollostudio_graph" "test" {
│ 
│ Failed to create graph: Message: Exception while fetching data (/newService) : Service already exists, Locations: [{Line:1 Column:66}],
│ Extensions: map[classification:DataFetchingException]

I have tried creating a new account but still getting this error. Any ideas?

Around two weeks ago it worked on version 1.2.0, I tried now and it fails both on 1.2.0 and on 1.3.0

@uristernik let me check on my side. I was able to recreate your issue. I'll try to fix.

It seems like graph id are global, meaning two graphs cannot have the same ID even if they are from different accounts. Also graphs are soft deleted, meaning if you delete one, you will need to wait a bit before recreating it. We don't have the API to hard delete a graph, it would be internal to apollo team.

Thanks for following up @sapher. Works when I use unique name.