-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type object 'InvokeOptions' has no attribute 'merge' ERROR #3269
Comments
Hi @Nidhal-Hajjej, I'm not sure yet what the problem is here. However, I think your code can be simplified, and maybe this could even fix this issue if it's related to Pulumi's Output handling. Instead of calling pulumi.Output.all([resource_group.name](http://resource_group.name/), [storage_account.name](http://storage_account.name/)).apply(
lambda args: pulumi.Output.secret(storage.list_storage_account_keys(args[0], args[1]) you can use its output form: storage.list_storage_account_keys_output(storage_account.name, resource_group.name) You might also have switched the resource group and account name arguments, based on our API docs. Could you try if that helps at all? |
Hi sir,
I am working on a fastapi project. My task was to create an azure storage
account and storage container to serve as a bucket. So i want to get access
key of that storage account so i can connect with minio.
list_storage_account_key function is returning that error.
I want to notice that i am using python version=3.9, pulumi=3.115 and
pulumi_azure_native=2.40
Thanks in advance
Le ven. 10 mai 2024 à 14:38, Thomas Kappler ***@***.***> a
écrit :
… Hi @Nidhal-Hajjej <https://github.com/Nidhal-Hajjej>, I'm not sure yet
what the problem is here. However, I think your code can be simplified, and
maybe this could even fix this issue if it's related to Pulumi's Output
handling.
Instead of calling storage.list_storage_account_keys inside an apply
pulumi.Output.all([resource_group.name](http://resource_group.name/), [storage_account.name](http://storage_account.name/)).apply(lambda args: pulumi.Output.secret(storage.list_storage_account_keys(args[0], args[1])
you use its output form:
storage.list_storage_account_keys(storage_account.name, resource_group.name)
You might also have switched the resource group and account name
arguments, based on our API docs
<https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/liststorageaccountkeys/>
.
Could you try if that helps at all?
—
Reply to this email directly, view it on GitHub
<#3269 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3P4DQJIPEBEDKFB2SQL6STZBTEVHAVCNFSM6AAAAABHNZDAXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBUGYZDONZSHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @Nidhal-Hajjej, unfortunately I don't know FastAPI. But wherever you write the Pulumi code, could you try my suggestions to use |
Hi @thomas11, i checked the solution you provided and i checked the right order of arguments but unfortunately i got the same error: Host This project is written in python: executable='/usr/local/bin/python3' version='3.9.16' |
Hi @Nidhal-Hajjej, can you determine the version of the Can you also share your latest program, after your changes? |
Thank you @Nidhal-Hajjej ! That could be the issue. |
@Nidhal-Hajjej Are you able to upgrade your |
Dear @thomas11, |
What happened?
i am using pulumi for a fastapi project ComworkCloud in which i want to create_bucket for azure Driver. My function is to create an azure storage account and storage container and export the endpoint for the container and the access key. I used azure-native.storage.listStorageAccountKeys to get that access key but unfortunately i got this error:
File "/usr/local/lib/python3.9/site-packages/pulumi_azure_native/storage/list_storage_account_keys.py", line 67, in list_storage_account_keys
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
AttributeError: type object 'InvokeOptions' has no attribute 'merge'
Example
here is my function:
Output of
pulumi about
I am not creating a pulumi project.
This a fastapi project with python version = 3.9.16 and pulumi_azure_native == 2.30.0
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: