capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
79 stars 19 forks source link

`capact ti edit` doesn't work with dynamic TypeInstances #689

Closed mszostok closed 2 years ago

mszostok commented 2 years ago

Description

Both the capact ti edit and capact ti get --export don't work with the dynamic TypeInstances. The reason is that we allow only an update of the value property. First, we should allow also an update for backend.context. Additionally, we should also check whether a given backend accepts the value property. If not, we should comment out the returned response.

Expected behavior

The capact ti edit and capact ti get --export commands work with the TypeInstances stored in external backends.

id: 7cbe29dc-f579-422d-813e-f9c2d998c591
typeInstance:
  attributes: []
 # backend.context should be added if applicable
  value: # value should be commented out if backed doesn't accept value
    defaultDBName: db-via-set
    host: my-psql-release-postgresql
    port: "5432"
    superuser:
      password: xl6rIxIxGm
      username: postgres

Actual behavior

Through CLI we are not able to update the TypeInstance backend.context. Additionally, the value is present when it shouldn't (backend only produce value but doesn't accept it on create/update)