Skip to content

Conversation

@gigerdo
Copy link
Member

@gigerdo gigerdo commented Sep 18, 2025

This change implements support for lists of secret values in fleet integration policies. There are two ways a secret value can be defined:

  • Just a simple string
    • "password": "secret" <-> "password": {"id": "Zgr3ZJgBz9OcmZgWR1vo", "isSecretRef": true}
  • A list of strings
    • "hosts" : ["root:test@tcp(127.0.0.1:3306)/"] <-> "hosts": {"ids": ["Zgr3ZJgBz9OcmZgWR1vo], "isSecretRef": true}

The code now correctly maps between both cases. (It used to only handle the simple string)

The bug report actually contains a second bug that shows when using vars_json = "{}",. Since the API always responds with a nil value, it generates a diff between the config and the actual state. The solution here is to map nil to "{}" if the local config contains "{}".

@gigerdo gigerdo closed this Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant