Skip to content

Commit

Permalink
Rename static_account to name
Browse files Browse the repository at this point in the history
  • Loading branch information
lawliet89 committed Jun 28, 2021
1 parent d8a8d86 commit 2f0f539
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugin/path_static_account_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ func pathStaticAccountSecretServiceAccountKey(b *backend) *framework.Path {
return &framework.Path{
Pattern: fmt.Sprintf("%s/%s/key", staticAccountPathPrefix, framework.GenericNameRegex("static_account")),
Fields: map[string]*framework.FieldSchema{
"static_account": {
"name": {
Type: framework.TypeString,
Description: "Required. Name of the static_account.",
Description: "Required. Name of the static account.",
},
"key_algorithm": {
Type: framework.TypeString,
Expand Down Expand Up @@ -45,9 +45,9 @@ func pathStaticAccountSecretAccessToken(b *backend) *framework.Path {
return &framework.Path{
Pattern: fmt.Sprintf("%s/%s/token", staticAccountPathPrefix, framework.GenericNameRegex("static_account")),
Fields: map[string]*framework.FieldSchema{
"static_account": {
"name": {
Type: framework.TypeString,
Description: "Required. Name of the static_account.",
Description: "Required. Name of the static account.",
},
},
ExistenceCheck: b.pathStaticAccountExistenceCheck,
Expand All @@ -61,7 +61,7 @@ func pathStaticAccountSecretAccessToken(b *backend) *framework.Path {
}

func (b *backend) pathStaticAccountSecretKey(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
acctName := d.Get("static_account").(string)
acctName := d.Get("name").(string)
keyType := d.Get("key_type").(string)
keyAlg := d.Get("key_algorithm").(string)
ttl := d.Get("ttl").(int)
Expand Down Expand Up @@ -91,7 +91,7 @@ func (b *backend) pathStaticAccountSecretKey(ctx context.Context, req *logical.R
}

func (b *backend) pathStaticAccountAccessToken(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
acctName := d.Get("static_account").(string)
acctName := d.Get("name").(string)

acct, err := b.getStaticAccount(acctName, ctx, req.Storage)
if err != nil {
Expand Down

0 comments on commit 2f0f539

Please sign in to comment.