Secret macro value overwritten on import when value is absent

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 5.4.4
    • Component/s: Frontend (F), Templates (T)
    • None

      When importing a template like this:

      zabbix_export:
        version: '5.4'
        date: '2021-09-02T06:34:30Z'
        groups:
          -
            uuid: 9becbe655a1448489e2539ed9f60686e
            name: Templates
        templates:
          -
            uuid: 0990793d930d46aa905fbba7ce3d0be7
            template: 'TemplateWithSecretMacro'
            name: 'TemplateWithSecretMacro'
            groups:
              -
                name: Templates
            macros:
              -
                macro: '{$SECRET}'
                type: SECRET_TEXT
      

      The {$SECRET} macro is overwritten (made blank), even though no value is provided (the key is absent). This makes it more difficult to manage templates as code, as we need to make sure the secret is provided in template when exporting it, while making sure the secret does not end up in the repository.

      Would it be possible to note overwrite the macro value when the 'value' key is absent in the macro?

            Assignee:
            Zabbix Development Team
            Reporter:
            Kevin Daudt
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: