Skip to content

request: option to skip duplicates when importing apikeys #3748

@Inveracity

Description

@Inveracity

It would be neat if I could import apikeys without being concerned that a key might already exist. That way using configuration management tools to deploy stackstorm idempotently would be less of a bother.

current result:

$ st2 apikey load apikeys.yaml
ERROR: 409 Client Error: Conflict
MESSAGE: Tried to save duplicate unique keys (E11000 duplicate key error collection: st2.api_key_d_b index: key_hash_1 dup key: { : "<snipped>" }) for url: http://127.0.0.1:9101/v1/apikeys

suggestion:

$ st2 apikey load apikeys.yaml --skip-duplicates
key 'xyz' already exists - skipped!

thanks for your consideration

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions