magnificent-motherboard-76110
05/12/2021, 10:29 PMPulumi.env.yaml
I have declared:
config:
tools:data:
vpn:
vm:
name: servername
size: Standard_D4s_v2
registry:
config:
name: registryname
then from my ___main___.py
cfg = pulumi.Config().require_object('data')
vm = cfg.get('vpn').get('vm')
registry = cfg.get('registry').get('config')
later on when I use such var
vm = azure_native.compute.VirtualMachine(
"vpn-VirtualMachine",
hardware_profile=azure_native.compute.HardwareProfileArgs(
vm_size=config.vm.get('size'),
),
# ...
everything works, but when I use
registry = azure_native.containerregistry.Registry(
"container-Registry",
admin_user_enabled=True,
location=config.region,
registry_name=config.registry.get('name'),
even if it sees to be the same logic, I'm getting this error:
File "/<MY_PATH>/venv/lib/python3.8/site-packages/pulumi/runtime/stack.py", line 181, in massage
if not key.startswith("_"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
error: an unhandled error occurred: Program exited with non-zero exit code: 1
any idea of what I'm doing wrong?No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by