helm: allow to configure statement policy effect (#17700)

Signed-off-by: Mathieu Parent <mathieu.parent@insee.fr>
This commit is contained in:
Mathieu Parent 2023-08-19 16:39:11 +02:00 committed by GitHub
parent 8f8f8854f0
commit 7219ae530e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@
"Statement": [ "Statement": [
{{- range $i, $statement := .statements }} {{- range $i, $statement := .statements }}
{ {
"Effect": "Allow", "Effect": "{{ $statement.effect | default "Allow" }}",
"Action": [ "Action": [
"{{ $statement.actions | join "\",\n\"" }}" "{{ $statement.actions | join "\",\n\"" }}"
]{{ if $statement.resources }}, ]{{ if $statement.resources }},
@ -21,7 +21,7 @@
{{- range $operator,$object := $v }} {{- range $operator,$object := $v }}
"{{ $operator }}": { {{ $object }} }{{- if lt $k $condition_len }},{{- end }} "{{ $operator }}": { {{ $object }} }{{- if lt $k $condition_len }},{{- end }}
{{- end }}{{- end }} {{- end }}{{- end }}
}{{- end }} }{{- end }}
}{{ if lt $i $statements_length }},{{end }} }{{ if lt $i $statements_length }},{{end }}
{{- end }} {{- end }}
] ]

View File

@ -273,7 +273,8 @@ policies: []
## example. ## example.
# - name: writeexamplepolicy # - name: writeexamplepolicy
# statements: # statements:
# - resources: # - effect: Allow # this is the default
# resources:
# - 'arn:aws:s3:::example*/*' # - 'arn:aws:s3:::example*/*'
# actions: # actions:
# - "s3:AbortMultipartUpload" # - "s3:AbortMultipartUpload"