Skip to content

[cloud-azure] Allow multiple repositories with different settings #12759

Closed
@dadoonet

Description

@dadoonet

As for now, azure cloud plugin only supports one single Azure configuration (account and key) as those settings are provided in elasticsearch.yml:

cloud:
    azure:
        storage:
            account: your_azure_storage_account
            key: your_azure_storage_key

In some cases, there is a need to have multiple azure connections, as explained for example at elastic/elasticsearch-cloud-azure#93

For this, we need to support providing settings when the repository is created:

PUT _snapshot/my_azure_repository1
{
    "type": "azure",
    "settings": {
        "account": "AZURE_ACCOUNT1",
        "key": "AZURE_KEY1"
    }
}

PUT _snapshot/my_azure_repository2
{
    "type": "azure",
    "settings": {
        "account": "AZURE_ACCOUNT2",
        "key": "AZURE_KEY2"
    }
}

If 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.
Same for key parameter.

This will also fix #12446.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions