I think pulumi_vault might be badly broken. I don'...
# python
c
I think pulumi_vault might be badly broken. I don't seem to be able to import
Token
, from this file: https://github.com/pulumi/pulumi-vault/blob/master/sdk/python/pulumi_vault/token.py
There's a package also called
token
in the same directory as the file
token.py
, and I think that's shadowing the import.
When I try
my_token = pulumi_vault.Token(...)
, I get:
Copy code
AttributeError: module 'pulumi_vault' has no attribute 'Token'
Copy code
In [1]: import pulumi_vault                                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                                                         
In [2]: dir(pulumi_vault)                                                                                                                                                                                                                                                                                                
Out[2]:                                                                                                                                                                                                                                                                                                                  
['Audit',                                                                                                                                                                                                                                                                                                                
 'AuthBackend',                                                                                                                                                                                                                                                                                                          
 'AuthBackendRole',                                                                                                                                                                                                                                                                                                      
 'AwaitableGetPolicyDocumentResult',                                                                                                                                                                                                                                                                                     
 'CertAuthBackendRole',                                                                                                                                                                                                                                                                                                  
 'EgpPolicy',                                                                                                                                                                                                                                                                                                            
 'GetPolicyDocumentResult',                                                                                                                                                                                                                                                                                              
 'MfaDuo',                                                                                                                                                                                                                                                                                                               
 'Mount',                                                                                                                                                                                                                                                                                                                
 'Namespace',                                                                                                                                                                                                                                                                                                            
 'Policy',                                                                                                                                                                                                                                                                                                               
 'Provider',                                                                                                                                                                                                                                                                                                             
 'RgpPolicy',                                                                                                                                                                                                                                                                                                            
 'Union',                                                                                                                                                                                                                                                                                                                
 '__all__',                                                                                                                                                                                                                                                                                                              
 '__builtins__',                                                                                                                                                                                                                                                                                                         
 '__cached__',                                                                                                                                                                                                                                                                                                           
 '__doc__',                                                                                                                                                                                                                                                                                                              
 '__file__',                                                                                                                                                                                                                                                                                                             
 '__loader__',                                                                                                                                                                                                                                                                                                           
 '__name__',                                                                                                                                                                                                                                                                                                             
 '__package__',                                                                                                                                                                                                                                                                                                          
 '__path__',                                                                                                                                                                                                                                                                                                             
 '__spec__',                                                                                                                                                                                                                                                                                                             
 'app_role',                                                                                                                                                                                                                                                                                                             
 'audit',                                                                                                                                                                                                                                                                                                                
 'auth_backend',                                                                                                                                                                                                                                                                                                         
 'auth_backend_role',                                                                                                                                                                                                                                                                                                    
 'aws',                                                                                                                                                                                                                                                                                                                  
 'azure',                                                                                                                                                                                                                                                                                                                
 'cert_auth_backend_role',                                                                                                                                                                                                                                                                                               
 'consul',
 'database',
 'egp_policy',
 'gcp',
 'generic',
 'get_policy_document',
 'github',
 'identity',
 'importlib',
 'json',
 'jwt',
 'kubernetes',
 'l_dap',
 'mfa_duo',
 'mount',
 'namespace',
 'okta',
 'pkg',
 'pki_secret',
 'policy',
 'provider',
 'pulumi',
 'rabbit_mq',
 'rgp_policy',
 'ssh',
 'tables',
 'token',
 'transit',
 'utilities',
 'warnings']
Other resources defined in the base package (e.g. Namespace) are importable correctly.
w
Thanks for opening the issue. I believe @broad-dog-22463 was working on this earlier this week.