ripe-russia-4239
06/27/2020, 9:35 PMlocation
property of the created resource has the value I require, as I’ve set it in my Pulumi.yaml
file and not in the new azure.core.ResourceGroup()
call, as described in the docs. There are two things I can’t work out:
• Is Pulumi.yaml
an accepted place to store config common to all stacks in a project? A closer reading of the docs suggest Pulumi.<stack name>.yaml
only 🤔
• At what point are the config values used in creating the resource group? I’ve tried modifying my newResource
fake as below, but the location
property stubbornly remains undefined
.
newResource: (type, name, inputs) => {
return {
id: `${inputs.name}_id`,
state: {
...inputs,
name: inputs.name || name,
location: inputs.location || config.get("azure:location"),
},
};
}
// ...
const config = new pulumi.Config();
Is the config, as loaded by Pulumi in the app, available in the test context, or these mock functions? Trying to use an exported config instance leaves me with leaked promises 😞IsÂI've answered this question for myself, and confirmed that only an accepted place to store config common to all stacks in a project? A closer reading of the docs suggestÂPulumi.yaml
 only 🤔Pulumi.<stack name>.yaml
Pulumi.<stack name>.yaml
files are acceptable locations for configuration values.