I'm using ArgoCD
and one of the config params for RBAC
accepts a CSV block i.e
policy.csv: |
p, role:org-admin, applications, *, */*, allow
p, role:org-admin, clusters, get, *, allow
I'd like to provide a .tfvars
file with a list of strings i.e
["p, role:org-admin, applications, *, */*, allow","p, role:org-admin, clusters, get, *, allow"]
And have it convert the list into a multiline CSV output like above, any suggestions?
Use the simple
join
functionCode to use in terraform file (.tf)
If you want to add few spaces at the start use below.