creamy-monkey-35142
03/08/2024, 3:07 AMpulumi_config = pulumi.Config()
Config = pulumi_config.get_object("Internal")
it return values as json as epxected
but if use
Config = pulumi_config.require_object("Internal")
it return
error: Exception calling application: Missing required configuration variable 'project:Internal'
please set a value using the command `pulumi config set project:Internal <value>`
it’s not my expectation. do you guys have any ideas to fix it?
Here is the content of file Pulumi.Internal.yaml
encryptionsalt: v1:7mw2Wakj9JI=:v1:<xxxxxxxxx>
config:
pulum:Internal:
url: <https://example.com>
creamy-monkey-35142
03/08/2024, 3:15 AM:param str name: The configuration bag’s logical name that uniquely identifies it. If not provided, the name
of the current project is used.because of I’m using dynamic provider, so `project`in error above is the name of Dynamic provider that I’m working on
cuddly-computer-18851
03/08/2024, 6:25 AMproject
should be whatever name you have set in your Pulumi.yaml filecreamy-monkey-35142
03/08/2024, 6:47 AMclass ProjectProvider(ResourceProvider)
, it’ll get value from project:Internal
.
I also tried to add pulumi.Config(name=‘pulum’) but not work
class Project(Resource)
def __init__(self, name: str, args: ProjectInputs, opts: Optional[ResourceOptions] = None):
super().__init__(ProjectProvider(), name, {**vars(args)}, opts)
creamy-monkey-35142
03/08/2024, 6:51 AMcreamy-monkey-35142
03/08/2024, 6:59 AMcreamy-monkey-35142
03/08/2024, 7:00 AM