glamorous-waitress-51149
07/07/2022, 11:55 AMvar registry = Output.Tuple<string, string>("/subscriptions/MY_OTHER_SUB_ID/resourceGroups/container-apps-production", registryName)
.Apply(
items =>
Pulumi.AzureNative.ContainerRegistry.GetRegistry.InvokeAsync(
new() {
ResourceGroupName = items.Item1,
RegistryName = items.Item2
}
)
);
Duplicate resource URN 'urn:pulumi:staging::jctest::pulumi:providers:azure-native::production'; try giving it a unique name
var registry = Output.Tuple<string, string>("container-apps-production", registryName)
.Apply(
items =>
Pulumi.AzureNative.ContainerRegistry.GetRegistry.InvokeAsync(
new()
{
ResourceGroupName = items.Item1,
RegistryName = items.Item2
},
new InvokeOptions()
{
Provider = new Provider("production",
new ProviderArgs() { SubscriptionId = "MY_OTHER_SUB" })
}
)
);
pulumi:providers:azure-native
resourcesvar registry = Output.Tuple<string, string>("container-apps-production", registryName)
.Apply(
items =>
Pulumi.AzureNative.ContainerRegistry.GetRegistry.InvokeAsync(
new()
{
ResourceGroupName = items.Item1,
RegistryName = items.Item2
},
new InvokeOptions()
{
Provider = new Provider("production-container-registry",
new ProviderArgs() { SubscriptionId = "my_other_sub" })
}
)
);
var credentials = Output
.Tuple<string, string>(
"container-apps-production",
registryName)
.Apply(
items =>
ListRegistryCredentials.InvokeAsync(
new()
{
ResourceGroupName = items.Item1,
RegistryName = items.Item2,
},
new InvokeOptions()
{
Provider = new Provider("production-registry-credentials",
new ProviderArgs() { SubscriptionId = "my_other_sub" })
}
)
);
tall-librarian-49374
07/07/2022, 1:33 PMvar myProvider = new Provider("production",
new ProviderArgs() { SubscriptionId = "MY_OTHER_SUB" });
...
new InvokeOptions() { Provider = myProvider }
glamorous-waitress-51149
07/07/2022, 1:34 PMtall-librarian-49374
07/07/2022, 1:34 PMGetRegistry.Invoke
instead of GetRegistry.InvokeAsync
. You won’t need an Apply then.glamorous-waitress-51149
07/07/2022, 1:38 PMOutput.Tuple
as the values passed in are normal stringstall-librarian-49374
07/07/2022, 1:39 PMglamorous-waitress-51149
07/07/2022, 1:39 PMvar registry2 =
Pulumi.AzureNative.ContainerRegistry.GetRegistry.Invoke(
new()
{
ResourceGroupName = "container-apps-production",
RegistryName = registryName
},
new InvokeOptions
{
Provider = provider
}
);
var loginServer2 = registry2.Apply(x => x.LoginServer);
tall-librarian-49374
07/07/2022, 1:49 PMglamorous-waitress-51149
07/07/2022, 1:49 PM