Is it possible to run get_* and specify a subscrip...
# azure
v
Is it possible to run get_* and specify a subscription id instead of using what is defined for the stack?
Copy code
Exception: invoke of azure-native:network:getSubnet failed: invocation of azure-native:network:getSubnet returned an error: request failed /subscriptions
b
Get* methods can take their own provider with InvokeOptions so you should be able to call a Get* method with a specific subscription.
v
When I run this
Copy code
env_provider = azure.Provider(
        "alt_subscription_provider",
        subscription_id=env_subscription_id
    )

    sql = get_server(
        resource_group_name=sql_role_config['sql_rsg'],
        server_name=sql_role_config['sql_name'],
        opts=InvokeOptions(provider=env_provider)
    )
I get this error
Copy code
Exception: invoke of azure-native:sql:getServer failed: invocation of azure-native:sql:getServer returned an error: unrecognized data function (Invoke): azure-native:sql:getServer
Ignore, I was not creating the provider with azure_native and get_server was from azure_native.