damp-lock-9822
02/07/2023, 5:52 PMmelodic-tomato-39005
02/07/2023, 6:50 PMdamp-lock-9822
02/07/2023, 8:53 PMFile "/home/sarah/.local/lib/python3.10/site-packages/pulumi/runtime/invoke.py", line 103, in do_invoke
return monitor.Invoke(req), None
AttributeError: 'NoneType' object has no attribute 'Invoke'
melodic-tomato-39005
02/07/2023, 8:59 PMpulumi about
?damp-lock-9822
02/07/2023, 9:25 PMCLI
Version 3.54.0
Go Version go1.20
Go Compiler gc
Plugins
NAME VERSION
azure 5.32.0
azure-native 1.93.0
python unknown
Host
OS ubuntu
Version 22.04
Arch x86_64
This project is written in python: executable='/usr/bin/python3' version='3.10.6
'
Current Stack: sarah.wheeler/inline_key_project/dev2
TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev2::inline_key_project::pulumi:pulumi:Stack::inline_key_project-dev2
pulumi:providers:azure-native urn:pulumi:dev2::inline_key_project::pulumi:providers:azure-native::default_1_93_0
azure-native:containerregistry:Token urn:pulumi:dev2::inline_key_project::azure-native:containerregistry:Token::rock1
azure-native:containerregistry:Token urn:pulumi:dev2::inline_key_project::azure-native:containerregistry:Token::rock2
azure-native:containerregistry:Registry urn:pulumi:dev2::inline_key_project::azure-native:containerregistry:Registry::statelesstestregistry
Found no pending operations associated with sarah.wheeler/inline_key_project/dev2
Backend
Name <http://pulumi.com|pulumi.com>
URL <https://app.pulumi.com/sarah.wheeler>
User sarah.wheeler
Organizations sarah.wheeler
Dependencies:
NAME VERSION
pip 23.0.0
pulumi-azure 5.32.0
pulumi-azure-native 1.93.0
setuptools 67.1.0
wheel 0.38.4
Pulumi locates its logs in /tmp by default
melodic-tomato-39005
02/08/2023, 5:48 PMOptional
. That might be a bug.damp-lock-9822
02/08/2023, 6:23 PMmelodic-tomato-39005
02/08/2023, 7:52 PMNew passwords can be added only through ‘generateCredentials’Maybe a separate issue. I do not get the
NoneType
error you got, though.
"""An Azure RM Python Pulumi program"""
import pulumi
from pulumi_azure_native import resources
from pulumi_azure_native import containerregistry
resource_group = resources.ResourceGroup('resource_group')
registry = containerregistry.Registry("registry",
admin_user_enabled=True,
location="westus",
resource_group_name=resource_group.name,
sku=containerregistry.SkuArgs(
name="Standard",
))
token = containerregistry.Token("token",
credentials=containerregistry.TokenCredentialsPropertiesArgs(
#passwords=[containerregistry.TokenPasswordArgs(name="password1")]
),
registry_name=registry.name,
resource_group_name=resource_group.name,
)
retrieved_token = containerregistry.get_token_output(
resource_group_name=resource_group.name,
registry_name=registry.name,
token_name=token.name)
pulumi.export("token", retrieved_token)
damp-lock-9822
02/08/2023, 8:13 PMmelodic-tomato-39005
02/08/2023, 9:02 PMget_token_output
is required due to the way Pulumi tracks dependencies (see here).damp-lock-9822
02/08/2023, 9:06 PMmelodic-tomato-39005
02/08/2023, 9:12 PMAttributeError: 'NoneType'
error. Is there more to the stack trace?damp-lock-9822
02/08/2023, 9:37 PMmelodic-tomato-39005
02/08/2023, 9:43 PMtoken: {
creation_date : "2023-02-08T19:51:37.6106474+00:00"
credentials : {
passwords: []
}
...
The password should be in this passwords
list. I don’t know why it’s None.damp-lock-9822
02/08/2023, 9:47 PM{
"creation_date": "2023-02-01T21:57:55.2833905+00:00",
"credentials": {
"passwords": [
{
"creation_time": "2023-02-01T21:58:16.506488+00:00",
"expiry": "2024-02-01T21:58:08.164+00:00",
"name": "password1",
"value": null
}
]
},
Strange, this is the output I'm getting for a token (with a password already set). But this doesn't seem correct (unless it is by design to hide the password value?)melodic-tomato-39005
02/08/2023, 10:18 PMtoken = containerregistry.v20221201.Token("token"…
, containerregistry.v20221201.get_token
.damp-lock-9822
02/08/2023, 10:20 PMmelodic-tomato-39005
02/09/2023, 4:57 PM