consul validate command works fine for consul configuration.
But it throws error if i try to validate service-intentions, service defaults configuration entry kind.
service-intentions.hcl
Kind = "service-intentions"
Name = "*"
Sources = [
{
Name = "*"
Action = "deny"
}
]
consul validate service-intentions.hcl
Config validation failed: failed to parse service-intentions.hcl: 3 errors occurred:
* invalid config key Name
* invalid config key Sources
* invalid config key Kind
Is there anything missing.
Also is there any other way to validate service-intentions format.
This command cannot operate on partial configuration fragments since those won’t pass the full agent validation.
But at the same time, this is the very same error I get when create the intentions config file in my consul’s data dir. So the question still remains, what is the correct way to do this via configuration?