Hello friends! Trying to import another project's ...
# typescript
t
Hello friends! Trying to import another project's config, but I'm a little stuck. What exactly is the
name
in the
pulumi.Config()
constructor? Documentation says:
name is the configuration bag's logical name and uniquely identifies it. The default is the name of the current project.
Is it simply the other project's name? To which of the .yaml files in the other project's directory would it refer then? Is it possibly to specify the stack? Thanks in advance! 🙏
e
Config is currently only managed per-project, you can't use it to read another projects configuration at the moment. The namespace is so that we can tell the difference between like "aws:region" and "my-project:region". "region" alone means "my-project:region". If you want to read another stacks config the currently suggested way to do this is to make the other stack export the config parts you care about as stack outputs and then use a stack reference in the new program to read them.
1
t
Ah, checks out! Thanks for the detailed response 🙌