Code Monkey home page Code Monkey logo

Comments (1)

umutkacar avatar umutkacar commented on September 3, 2024

In my case, with medusa v0.6.0, I don't even see the empty keys on the export. Here is the source structure that I'm trying to migrate to a new Vault, for example:

.
└── secrets/data_science/
    ├── data_engineering/
    │   ├── debezium-backend/
    │   │   ├── global
    │   │   ├── production/
    │   │   │   └── global
    │   │   │       ├── :JDBC_LOG_DWH_DEBEZIUM_PASSWORD
    │   │   │       └── :JDBC_LOG_DWH_READONLY_PASSWORD
    │   │   └── staging/
    │   │       └── global
    │   │           ├── :JDBC_LOG_DWH_DEBEZIUM_PASSWORD
    │   │           └── :JDBC_LOG_DWH_READONLY_PASSWORD
    │   └── global
    └── global

Here is also a paths output for a better understanding, maybe:

secrets/data_science/data_engineering/debezium-backend/global
secrets/data_science/data_engineering/debezium-backend/production/global:JDBC_LOG_DWH_DEBEZIUM_PASSWORD
secrets/data_science/data_engineering/debezium-backend/production/global:JDBC_LOG_DWH_READONLY_PASSWORD
secrets/data_science/data_engineering/debezium-backend/staging/global:JDBC_LOG_DWH_DEBEZIUM_PASSWORD
secrets/data_science/data_engineering/debezium-backend/staging/global:JDBC_LOG_DWH_READONLY_PASSWORD
secrets/data_science/data_engineering/global
secrets/data_science/global

But the export file only has:

data_engineering:
  debezium-backend:
    production:
      global:
        JDBC_LOG_DWH_DEBEZIUM_PASSWORD: omitted-s3cr3₺
        JDBC_LOG_DWH_READONLY_PASSWORD: omitted-s3cr3₺
    staging:
      global:
        JDBC_LOG_DWH_DEBEZIUM_PASSWORD: omitted-s3cr3₺
        JDBC_LOG_DWH_READONLY_PASSWORD: omitted-s3cr3₺

It's also the same with the json export:

{
  "data_engineering": {
    "debezium-backend": {
      "production": {
        "global": {
          "JDBC_LOG_DWH_DEBEZIUM_PASSWORD": "omitted-s3cr3₺",
          "JDBC_LOG_DWH_READONLY_PASSWORD": "omitted-s3cr3₺"
        }
      },
      "staging": {
        "global": {
          "JDBC_LOG_DWH_DEBEZIUM_PASSWORD": "omitted-s3cr3₺",
          "JDBC_LOG_DWH_READONLY_PASSWORD": "omitted-s3cr3₺"
        }
      }
    }
  }
}

There is another tool called safe which exports these empty keys indeed, by fails to import them.

Even if I get the intact json export from safe and try to import it with medusa, it does not create these empty keys. (I know the path structure of these two exports are different.)

{
  "secrets/data_science/data_engineering/debezium-backend/global": {},
  "secrets/data_science/data_engineering/debezium-backend/production/global": {
    "JDBC_LOG_DWH_DEBEZIUM_PASSWORD": "omitted-s3cr3₺",
    "JDBC_LOG_DWH_READONLY_PASSWORD": "omitted-s3cr3₺"
  },
  "secrets/data_science/data_engineering/debezium-backend/staging/global": {
    "JDBC_LOG_DWH_DEBEZIUM_PASSWORD": "omitted-s3cr3₺",
    "JDBC_LOG_DWH_READONLY_PASSWORD": "omitted-s3cr3₺"
  },
  "secrets/data_science/data_engineering/global": {},
  "secrets/data_science/global": {}
}

So the final result at the destination Vault, does not resemble the data structure of the source:

.
└── secrets/data_science/
    └── data_engineering/
        └── debezium-backend/
            ├── production/
            │   └── global
            │       ├── :JDBC_LOG_DWH_DEBEZIUM_PASSWORD
            │       └── :JDBC_LOG_DWH_READONLY_PASSWORD
            └── staging/
                └── global
                    ├── :JDBC_LOG_DWH_DEBEZIUM_PASSWORD
                    └── :JDBC_LOG_DWH_READONLY_PASSWORD

I'd really like to have the option to include empty keys on with import function.

from medusa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.