Describe the bug
Eventhough the vault value exists in vault it throws error that value doesnt exist
To Reproduce
Steps to reproduce the behavior:
Create vault.json with vault details.
{
"VAULT_ADDR": "http://172.18.0.2:31030",
"AUTH_TYPE": "approle",
"TYPE": "vault",
"ROLE_ID": "ee948507-e4b5-1982-5186-d1de6db3e946",
"SECRET_ID": "fdde601e-fdb8-0ddb-050a-34ef1657a447"
}
Create secret.yaml with place holders i.e with angular brackets <>
kind: Secret
apiVersion: v1
metadata:
name: example-secret
annotations:
avp_path: "secret/data/mysql/webapp/"
type: Opaque
data:
**
password: ""
**
Run the below command:
argocd-vault-plugin generate secret.yaml -c vault.json
Error: Replace: could not replace all placeholders in SecretTemplate data: [replaceString: missing Vault value for placeholder passcode in string password: ]
Usage:
argocd-vault generate [flags]
Flags:
-c, --config-path string path to a file containing Vault configuration (YAML, JSON, envfile) to use
-h, --help help for generate
-s, --secret-name string name of a Kubernetes Secret containing Vault configuration data in the argocd namespace of your ArgoCD host (Only available when used in ArgoCD)
Replace: could not replace all placeholders in SecretTemplate data: [replaceString: missing Vault value for placeholder passcode in string password: ]
Login to vault and read the key
$ vault kv get secret/mysql/webapp
====== Metadata ======
Key Value
created_time 2021-01-30T08:00:26.757330401Z
deletion_time n/a
destroyed false
version 1
====== Data ======
Key Value
passcode my-long-passcode