fix templated policy cli output (#18821)

This commit is contained in:
Ronald 2023-09-15 10:20:44 -04:00 committed by GitHub
parent 9c1a1ffcde
commit e24b3d9b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 10 deletions

View File

@ -64,7 +64,7 @@ type prettyFormatter struct {
func (f *prettyFormatter) FormatTemplatedPolicy(templatedPolicy api.ACLTemplatedPolicyResponse) (string, error) {
var buffer bytes.Buffer
buffer.WriteString(fmt.Sprintf("Name: %s\n", templatedPolicy.TemplateName))
buffer.WriteString(fmt.Sprintf("Name: %s\n", templatedPolicy.TemplateName))
buffer.WriteString("Input variables:")
switch templatedPolicy.TemplateName {
@ -77,7 +77,7 @@ func (f *prettyFormatter) FormatTemplatedPolicy(templatedPolicy api.ACLTemplated
buffer.WriteString("Example usage:\n")
buffer.WriteString(fmt.Sprintf("%sconsul acl token create -templated-policy builtin/node -var name:node-1\n", WhitespaceIndent))
case api.ACLTemplatedPolicyDNSName:
buffer.WriteString(" None\n")
buffer.WriteString(" None\n")
buffer.WriteString("Example usage:\n")
buffer.WriteString(fmt.Sprintf("%sconsul acl token create -templated-policy builtin/dns\n", WhitespaceIndent))
default:

View File

@ -1,5 +1,5 @@
Name: builtin/dns
Input variables: None
Name: builtin/dns
Input variables: None
Example usage:
consul acl token create -templated-policy builtin/dns
Raw Template:

View File

@ -1,4 +1,4 @@
Name: builtin/dns
Input variables: None
Name: builtin/dns
Input variables: None
Example usage:
consul acl token create -templated-policy builtin/dns

View File

@ -1,4 +1,4 @@
Name: builtin/node
Name: builtin/node
Input variables:
Name: String - Required - The node name.
Example usage:

View File

@ -1,4 +1,4 @@
Name: builtin/node
Name: builtin/node
Input variables:
Name: String - Required - The node name.
Example usage:

View File

@ -1,4 +1,4 @@
Name: builtin/service
Name: builtin/service
Input variables:
Name: String - Required - The name of the service.
Example usage:

View File

@ -1,4 +1,4 @@
Name: builtin/service
Name: builtin/service
Input variables:
Name: String - Required - The name of the service.
Example usage: