Skip to content

ensure flag doesn't work with consumer credentials #145

@eamonnmcevoy

Description

@eamonnmcevoy

In my kongifg file I have a test consumer with basic auth credentials, when I run kongfig (after the initial run) I get an error:

409 Conflict { username: 'already exists with value \'myuser\'' }

Error: Conflict
{"username":"already exists with value 'myuser'"}

 Error: Conflict
{"username":"already exists with value 'myuser'"}

    at /usr/local/lib/node_modules/kongfig/lib/core.js:346:45
    at run (/usr/local/lib/node_modules/kongfig/node_modules/core-js/modules/es6.promise.js:75:22)
    at /usr/local/lib/node_modules/kongfig/node_modules/core-js/modules/es6.promise.js:92:30
    at flush (/usr/local/lib/node_modules/kongfig/node_modules/core-js/modules/_microtask.js:18:9)
    at process._tickCallback (internal/process/next_tick.js:61:11)

I tried using the ensure flag for this but it didn't help

   consumers: 
      - username: my-user
        ensure: "present"
        credentials:
          - name: basic-auth
            ensure: "present"
            attributes:
              username: my-username
              password: password

Is there a way to ensure this consumer will be present in kong

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions