Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-19907

Secret macro value overwritten on import when value is absent

    XMLWordPrintable

Details

    • Problem report
    • Status: Open
    • Trivial
    • Resolution: Unresolved
    • 5.4.4
    • None
    • Frontend (F), Templates (T)
    • None

    Description

      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?

      Attachments

        Activity

          People

            agavrilovs Aleksandrs Petrovs-Gavrilovs
            kdaudt Kevin Daudt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: