From 1ec836f6fef3b263c5208718986e5f9c66d1793f Mon Sep 17 00:00:00 2001 From: Blake Covarrubias Date: Sun, 8 May 2022 13:44:50 -0700 Subject: [PATCH 1/5] docs: Fix JSON formatted example ACL policies Commit 9333fad added JSON formatted examples for all ACL polices. Most of these these examples are not valid JSON, and thus an error is raised when attempting to create the example policies/rules in Consul. This commit fixes the example JSON formatted ACL rules so that they are valid JSON. This enables readers to use the policies as-is from the documentation to successfully create policies in Consul. It also removes unnecessary arrays from the example policies so that the policies are easier for practitioners to read and write. --- .../docs/security/acl/acl-policies.mdx | 114 +++-- .../content/docs/security/acl/acl-rules.mdx | 465 ++++++++---------- 2 files changed, 272 insertions(+), 307 deletions(-) diff --git a/website/content/docs/security/acl/acl-policies.mdx b/website/content/docs/security/acl/acl-policies.mdx index bafa404d42..f97d8dcc17 100644 --- a/website/content/docs/security/acl/acl-policies.mdx +++ b/website/content/docs/security/acl/acl-policies.mdx @@ -32,13 +32,15 @@ A rule is composed of a resource declaration and an access level defined with th ```hcl { policy = "" - } +} ``` ```json -"": [{ - "policy": "" - }] +{ + "": { + "policy": "" + } +} ``` @@ -60,11 +62,13 @@ The following syntax describes how to include a resource label in the rule: ``` ```json -"": [{ - "