Issue while running the vault server

Hi All,
I’m trying to run the vault server with consul as storage backend, to run the vault server, in
$ sudo vi /etc/vault.d/vault.hcl , changes made are:

#storage “file” {

path = “/opt/vault/data”

#}

storage “consul” {
address = “127.0.0.1:8500”
path = “vault”
}

HTTP listener

#listener “tcp” {

address = “127.0.0.1:8200”

tls_disable = 1

#}

HTTPS listener

listener “tcp” {
address = “10.168.2.71:8200”
tls_cert_file = “/opt/vault/tls/tls.crt”
tls_key_file = “/opt/vault/tls/tls.key”
}

Then, if I run the server using command,
sudo vault server –config=/etc/vault.d/vault.hcl
I am getting,
Must specify at least one config path using -config

If I run the vault server using command,
sudo vault server -dev –config=/etc/vault.d/vault.hcl
I could able to run the server but,
In storage, I am getting Storage: inmem (refer to image below)
Uploading: Screenshot from 2021-08-18 11-33-46.png…

I should be getting Storage: consul as I am using vault’s storage backend as consul.
Please do give me idea on how to resolve this and proceed.
Thank you in advance.

Share results of (please format properly):

ls -la /etc/vault.d/
cat /etc/vault.d/vault.hcl
sudo vault server -config=/etc/vault.d/vault.hcl

Why are you running vault as sudo? This is not recommended.