Skip to content

Commit

Permalink
api key name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenHamers committed Dec 20, 2021
1 parent 1d5a1c4 commit 6eae004
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description: |-

### Required

- **api_key** (String)
- **personal_apikey** (String)

### Optional

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/apikey.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ description: |-

### Read-Only

- **token** (String, Sensitive)
- **graph_apikey** (String, Sensitive)
- **id** (String) The ID of this resource.


4 changes: 2 additions & 2 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func AppolloStudioProvider() *schema.Provider {
return &schema.Provider{
Schema: map[string]*schema.Schema{
"api_key": &schema.Schema{
"personal_apikey": &schema.Schema{
Type: schema.TypeString,
Required: true,
},
Expand All @@ -43,7 +43,7 @@ func ProviderConfigure(ctx context.Context, d *schema.ResourceData) (interface{}
var diags diag.Diagnostics

Appollo := &client.Client{
ApiKey: d.Get("api_key").(string),
ApiKey: d.Get("personal_apikey").(string),
EnterPriseEnabled: d.Get("enterprise_enabled").(bool),
}

Expand Down
4 changes: 2 additions & 2 deletions internal/services/apikey/resource_apikey.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func Resource() *schema.Resource {
Required: true,
ForceNew: true,
},
"token": &schema.Schema{
"graph_apikey": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Sensitive: true,
Expand Down Expand Up @@ -82,7 +82,7 @@ func resourceCreate(ctx context.Context, data *schema.ResourceData, meta interfa
}

data.SetId(result.Service.NewKey.Id)
data.Set("token", result.Service.NewKey.Token)
data.Set("graph_apikey", result.Service.NewKey.Token)

return diags
}
Expand Down

0 comments on commit 6eae004

Please # to comment.