Search code examples
cloud-foundryspring-cloud-config

PCF with git and vault: Vault port must be defined in 'vault.port', not using : syntax


in my cloud config PCF Service. Git part is fine, Vault is causing issue:- { "composite": [{"git": { "password": "****", "label": "develop", "uri": "https://*****/config-server-files", "username": "*****" }, "vault":{ "port":"8200", "scheme": "https", "host": ":*****" }}] }


Solution

  • I found the solution: The correct config for using multiple backends(Git + Vault) on config server is ** **

    {
        "count": 1,
        "composite": [
            {
                "vault": {
                    "host": "***",
                    "port": 8200,
                    "scheme": "https",
                    "backend": "cf/***/secret",
                    "defaultKey": "****",
                    "profileSeparator": ",",
                    "skipSslValidation": true
                }
            },
            {
                "git": {
                    "password": "****",
                    "uri": "****/config-server-files",
                    "username": "****",
                    "basedir": "/home/vcap/app/config-repo/composite-1-default",
                    "ignoreLocalSshSettings": true,
                    "label": "develop"
                }
            }
        ]
    }
    

    ** **