Skip to content

cloud service query-endpoint create should be additive #122

@sdairs

Description

@sdairs

Problem

The instance_query_endpoint_upsert API endpoint is an upsert — calling cloud service query-endpoint create --open-api-key K2 on a service that already has K1 authorized replaces the config, so K1 loses access.

Discovered while working on #115 (the new cloud service query command). A user adding a second key expects to keep the first.

Proposed behaviour

cloud service query-endpoint create should:

  1. First fetch the existing endpoint (if any).
  2. Union the provided --open-api-key, --role and --allowed-origins values with what's already there.
  3. Upsert the merged config.

Add a --replace flag for the current clobber behaviour. Alternatively rename `create` to `upsert` or add a sibling `update` that is explicitly additive.

Related

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