https://pulumi.com logo
#python
Title
# python
f

fast-arm-63150

01/20/2022, 7:20 AM
Would anyone know why this simple command for the python automation api fails?
Traceback (most recent call last):
File "main.py", line 115, in <module>
pulumi.automation.create_stack('test-x')
File "/home/user/x-ops/pulumi/.venv/lib/python3.8/site-packages/pulumi/automation/_local_workspace.py", line 366, in create_stack
raise ValueError(f"unexpected args: {' '.join(args)}")
ValueError: unexpected args: stack_name project_name program work_dir opts
m

millions-furniture-75402

01/20/2022, 3:02 PM
this simple command
1
f

fast-arm-63150

01/20/2022, 4:50 PM
@millions-furniture-75402 my bad, using the pulumi python automation API
pulumi.automation.create_stack('test-x')
^ this fails with that error
m

millions-furniture-75402

01/20/2022, 5:42 PM
What version of Pulumi and Python?
f

fast-arm-63150

01/20/2022, 7:00 PM
@millions-furniture-75402 Python 3.8, Pulumi 3.22
m

millions-furniture-75402

01/20/2022, 9:02 PM
Looks like you might be missing a required parameter for your use case: https://github.com/pulumi/pulumi/blob/master/sdk/python/lib/pulumi/automation/_local_workspace.py#L330-L359
4 Views