{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/12759","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12759/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12759/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12759/events","html_url":"https://github.com/elastic/elasticsearch/issues/12759","id":99998483,"number":12759,"title":"[cloud-azure] Allow multiple repositories with different settings","user":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Plugin%20Cloud%20Azure","name":":Plugin Cloud Azure","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Snapshot/Restore","name":":Snapshot/Restore","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-10T07:51:47Z","updated_at":"2015-08-31T19:57:44Z","closed_at":null,"body":"As for now, azure cloud plugin only supports one single Azure configuration (`account` and `key`) as those settings are provided in `elasticsearch.yml`:\r\n\r\n```yml\r\ncloud:\r\n    azure:\r\n        storage:\r\n            account: your_azure_storage_account\r\n            key: your_azure_storage_key\r\n```\r\n\r\nIn some cases, there is a need to have multiple azure connections, as explained for example at https://github.com/elastic/elasticsearch-cloud-azure/pull/93\r\n\r\nFor this, we need to support providing settings when the repository is created:\r\n\r\n```json\r\nPUT _snapshot/my_azure_repository1\r\n{\r\n    \"type\": \"azure\",\r\n    \"settings\": {\r\n        \"account\": \"AZURE_ACCOUNT1\",\r\n        \"key\": \"AZURE_KEY1\"\r\n    }\r\n}\r\n\r\nPUT _snapshot/my_azure_repository2\r\n{\r\n    \"type\": \"azure\",\r\n    \"settings\": {\r\n        \"account\": \"AZURE_ACCOUNT2\",\r\n        \"key\": \"AZURE_KEY2\"\r\n    }\r\n}\r\n```\r\n\r\nIf no `account` is defined in the repository creation call, then we fallback to the one in `elasticsearch.yml` and if no `account` is available, then we fail the creation.\r\nSame for `key` parameter.\r\n\r\nThis will also fix #12446."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/136483083","html_url":"https://github.com/elastic/elasticsearch/issues/12759#issuecomment-136483083","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/12759","id":136483083,"user":{"login":"craigwi","id":6687101,"avatar_url":"https://avatars.githubusercontent.com/u/6687101?v=3","gravatar_id":"","url":"https://api.github.com/users/craigwi","html_url":"https://github.com/craigwi","followers_url":"https://api.github.com/users/craigwi/followers","following_url":"https://api.github.com/users/craigwi/following{/other_user}","gists_url":"https://api.github.com/users/craigwi/gists{/gist_id}","starred_url":"https://api.github.com/users/craigwi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigwi/subscriptions","organizations_url":"https://api.github.com/users/craigwi/orgs","repos_url":"https://api.github.com/users/craigwi/repos","events_url":"https://api.github.com/users/craigwi/events{/privacy}","received_events_url":"https://api.github.com/users/craigwi/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T19:57:44Z","updated_at":"2015-08-31T19:57:44Z","body":"I created a pull request https://github.com/elastic/elasticsearch/pull/13228 containing the changes I had made to the elasticsearch-cloud-azure plugin.\r\n\r\nCraig."}}