Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit 60431b4

Browse files
committed
At some point I will handle these orgs correctly...
1 parent 0eba671 commit 60431b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/provider/app_resource.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ func (r flyAppResource) Create(ctx context.Context, req tfsdk.CreateResourceRequ
8181
resp.Diagnostics.AddError("Could not detect default organization", err.Error())
8282
return
8383
}
84-
data.Org.Value = defaultOrg.Id
84+
data.OrgId.Value = defaultOrg.Id
85+
data.Org.Value = defaultOrg.Name
8586
} else {
8687
org, err := graphql.Organization(context.Background(), *r.provider.client, data.Org.Value)
8788
if err != nil {
@@ -90,8 +91,7 @@ func (r flyAppResource) Create(ctx context.Context, req tfsdk.CreateResourceRequ
9091
}
9192
data.OrgId.Value = org.Organization.Id
9293
}
93-
94-
mresp, err := graphql.CreateAppMutation(context.Background(), *r.provider.client, data.Name.Value, data.Org.Value)
94+
mresp, err := graphql.CreateAppMutation(context.Background(), *r.provider.client, data.Name.Value, data.OrgId.Value)
9595
if err != nil {
9696
resp.Diagnostics.AddError("Create app failed", err.Error())
9797
return

0 commit comments

Comments
 (0)