Skip to content

Commit

Permalink
provider: add validation on the api key id
Browse files Browse the repository at this point in the history
  • Loading branch information
hod-alpert committed Aug 3, 2022
1 parent 46986c2 commit 019e8f2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ func New(version string) func() *schema.Provider {
p := &schema.Provider{
Schema: map[string]*schema.Schema{
"api_key": {
Description: "Alternatively, use the `PFPTMETA_API_KEY` env variable",
Type: schema.TypeString,
DefaultFunc: schema.EnvDefaultFunc("PFPTMETA_API_KEY", nil),
Optional: true,
Description: "Alternatively, use the `PFPTMETA_API_KEY` env variable",
Type: schema.TypeString,
DefaultFunc: schema.EnvDefaultFunc("PFPTMETA_API_KEY", nil),
Optional: true,
ValidateDiagFunc: common.ValidateID(false, "key"),
},
"api_secret": {
Description: "Alternatively, use the `PFPTMETA_API_SECRET` env variable",
Expand Down

0 comments on commit 019e8f2

Please sign in to comment.