This might be a noob question -> How do you get...
# azure
m
This might be a noob question -> How do you get the subscription id set directly to azure-native provider in the config from the code for ex I have a config like below
Copy code
config:
  azure-native:location: EastUS
  azure-native:subscriptionId: 4f85f91d-f079-4a1e-bed7-8af80f509048
  azure-native:tenantId: c74dda19-ecf9-4f61-8586-2bddb1f14324
i need to read the location, subscriptionId, tenantId from the go code. How do I do that?
m
Personally I don't put them in my configuration but I can get the current subscription id used with the following code:
Copy code
const azureConfig = pulumi.output(authorization.getClientConfig());
const subscriptionId = azureConfig.subscriptionId;
for the configuration set in the yaml file, according to the documentation you could do something like that:
Copy code
let awsConfig = new pulumi.Config("azure-native");
let subscriptionId = awsConfig.require("subscriptionId");
m
Ok thanks
m
Yes it does.
m
Yep I changed also converted the demo into a template you can check it out here -> https://github.com/rprakashg-redhat/pulumi-aro