https://pulumi.com logo
Title
f

full-soccer-76495

02/14/2023, 6:01 PM
Hi all, I am trying to troubleshoot an issue with AWS SSO Identity Store. I think I am close to solving the error and any help would be really appreciated 🙂
Here is my code:
aws.identitystore.User(
    "daniel",
    display_name = "daniel_display",
    identity_store_id = "d-9067xxxxx",
    user_name = "daniel_user"
)
it returns the following error:
Type                       Name         Plan     Info
     pulumi:pulumi:Stack        aws-sso-dev           
     └─ aws:identitystore:User  daniel                1 error


Diagnostics:
  aws:identitystore:User (daniel):
    error: aws:identitystore/user:User resource 'daniel' has a problem: Attribute must be a list. Examine values at 'User.Name'.
** I can convert the code to make the first value a list, but then lol it tells me I need a string:
aws.identitystore.User(
    ["daniel"],
    display_name = "daniel_display",
    identity_store_id = "d-9067xxxxx",
    user_name = "daniel_user"
)
Diagnostics:
  pulumi:pulumi:Stack (aws-sso-dev):
    error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/home/d.ehrlich.sa/monorepo/pulumi/aws-sso/__main__.py", line 27, in <module>
        aws.identitystore.User(
      File "/home/d.ehrlich.sa/monorepo/pulumi/aws-sso/venv/lib/python3.11/site-packages/pulumi_aws/identitystore/user.py", line 598, in __init__
        __self__._internal_init(resource_name, *args, **kwargs)
      File "/home/d.ehrlich.sa/monorepo/pulumi/aws-sso/venv/lib/python3.11/site-packages/pulumi_aws/identitystore/user.py", line 648, in _internal_init
        super(User, __self__).__init__(
      File "/home/d.ehrlich.sa/monorepo/pulumi/aws-sso/venv/lib/python3.11/site-packages/pulumi/resource.py", line 1020, in __init__
        Resource.__init__(self, t, name, True, props, opts, False, dependency)
      File "/home/d.ehrlich.sa/monorepo/pulumi/aws-sso/venv/lib/python3.11/site-packages/pulumi/resource.py", line 772, in __init__
        raise TypeError("Expected resource name to be a string")
    TypeError: Expected resource name to be a string

Outputs:
  + bucket_name: output<string>
m

melodic-tomato-39005

02/14/2023, 6:35 PM
Looking at the API docs, it seems that while
display_name
is a string,
name
is supposed to be an instance of
UserName
, itself containing
given_name
and
family_name
strings.
f

full-soccer-76495

02/14/2023, 9:40 PM
Thanks a lot @melodic-tomato-39005. It looks like that was it!