I am using a vault server with consul as a storage backend and trying to fetch a password value using vault provider in terraform. But it doesn't fetch its value. I stored my secrets at location secret/instances
main.tf
provider "vault" {
address = "https://<IP_ADDRESS>:<PORT_NUMBER>"
token = "118bb796-d715-8ce4-b987-7f354ff3f5a7"
}
data "vault_generic_secret" "mypass"{
path = "secret/instances/password"
}
output "mypassword" {
value = "${data.vault_generic_secret.mypass.data["value"]}"
}
When i run terraform apply it shows:
data.vault_generic_secret.mypass: Refreshing state...
data.vault_generic_secret.mypass: Refreshing state...
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Please suggest me something what i have done wrong over here as it does not fetch value of password from vault.

${data.vault_generic_secret.mypass.data}? Check first if you can get the data. - BMW