Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toTOML incorrectly renders nested tables. #1849

Open
elnoxgdl opened this issue Nov 27, 2023 · 0 comments
Open

toTOML incorrectly renders nested tables. #1849

elnoxgdl opened this issue Nov 27, 2023 · 0 comments

Comments

@elnoxgdl
Copy link

When using toTOML function when rendering secrets that were stored in vault when transforming the map to TOML it incorrectly renders the nested tables.

Take this as example.

The original data stored in vault:

{
  "metrics": {
    "prometheus": {
      "enabled": true
    }
  }
}

Using this template:

{{ with secret "secrets/staging/service.toml" -}}
{{ .Data.data | toTOML }}
{{- end }}

Renders:

[metrics]
  [metrics.prometheus]
    enabled = true

The spec for TOML states that nested tables should be [x.y] I don't understand what's the problem.

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

No branches or pull requests

1 participant