vscode-azurestorage icon indicating copy to clipboard operation
vscode-azurestorage copied to clipboard

Provide a way to attach other service accounts

Open Clockwork-Muse opened this issue 7 months ago • 3 comments

I'm using devcontainers and docker-compose to set up a dev environment that is entirely offline; as part of this, I'm using Azurite in a sidecar container for storage scenarios.

The problem is, although I can manually attach to my azurite container via the UI in the normal way, I haven't yet found a way to "save" the attachment/connection to azurite so that it's always there if I clone the repository on a new machine, or if I share it with another programmer. The primary use-case here is so that I don't have to make it an instruction in a README or something.

I don't care if this ends up being a specific environment variable (Copilot is insisting I can use AZURE_STORAGE_CONNECTION_STRING_*, but that doesn't work) that I can add to my containerEnv, or if it's a new setting I can add to the customization section.

Clockwork-Muse avatar May 24 '25 01:05 Clockwork-Muse

So just to confirm, would you just want a setting that would preserve your storage connection on any machine that clones your project?

I think that our primary concern with that approach is that we didn't want to save connection strings to a user's workspace since that code would be checked in and pretty easy to compromise.

nturinski avatar May 27 '25 16:05 nturinski

No, in this case the normal usecase is for (potentially multiple) connections that are brand new. It may still be a workspace setting, though.

When I did things like mock the Azure IoT hub with a Mosquitto instance, I included an MQTT client extension with preconfigured connections in my devcontainer.json:

{
    "customizations": {
        "vscode": {
            "settings": {
                "vsmqtt.brokerProfiles": [
                    {
                        "name": "client with tls",
                        "host": "broker.emqx.io",
                        "port": 8883,
                        "protocol": "mqtts",
                        "ca": "/path_to_crt"
                    }
                ],
            },
            "extensions": [
                "rpdswtk.vsmqtt",
            ]
        }
    }
}

.... this then meant that once the brand-new devcontainer came up, the connections were already present for developers to use, without any additional configuration on their part

Clockwork-Muse avatar May 27 '25 17:05 Clockwork-Muse

This feature request is now a candidate for our backlog. The community has 240 days to upvote the issue. If it receives 5 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!