question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

get_project_service_account fails with 'dict' object has no attribute 'email_address'

See original GitHub issue
Diagnostics:
  pulumi:pulumi:Stack (import-master):
    error: Program failed with an unhandled exception:
    error: Traceback (most recent call last):
      File "/pulumi/pulumi-language-python-exec", line 85, in <module>
        loop.run_until_complete(coro)
      File "/usr/local/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
        return future.result()
      File "/usr/local/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 83, in run_in_stack
        await run_pulumi_func(lambda: Stack(func))
      File "/usr/local/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 35, in run_pulumi_func
        func()
      File "/usr/local/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 83, in <lambda>
        await run_pulumi_func(lambda: Stack(func))
      File "/usr/local/lib/python3.7/site-packages/pulumi/runtime/stack.py", line 106, in __init__
        func()
      File "/pulumi/pulumi-language-python-exec", line 84, in <lambda>
        coro = pulumi.runtime.run_in_stack(lambda: runpy.run_path(args.PROGRAM, run_name='__main__'))
      File "/usr/local/lib/python3.7/runpy.py", line 280, in run_path
        run_name, mod_spec, pkg_name).copy()
      File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "./__main__.py", line 88, in <module>
        opts=ResourceOptions(depends_on=[ephemeral_project.project, registry_access]),
      File "./my_service.py", line 72, in __init__
        parent=self,
      File "./pulumi_utils/storage/bucket_with_notification.py", line 57, in __init__
        opts=opts,
      File "/usr/local/lib/python3.7/site-packages/pulumi_gcp/storage/get_project_service_account.py", line 96, in get_project_service_account
        email_address=__ret__.email_address,
    AttributeError: 'dict' object has no attribute 'email_address'
    error: an unhandled error occurred: Program exited with non-zero exit code: 1

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
justinvpcommented, Jun 28, 2021

@Bharathkumarraju, I think you want to use gcp.serviceaccount not gcp.service_account:

import pulumi
import pulumi_gcp as gcp

service_account = gcp.serviceaccount.Account("serviceAccount",
    account_id="pulumiautomation",
    display_name="pulumi-automation")

0reactions
Bharathkumarrajucommented, Jun 28, 2021

Thanks @justinvp and yes @edmondo1984 thanks for the reply. I see service_account name has some regex for pulumi upon the GCP one right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django - trying to clean email field is throwing ''dict' object has ...
From my understanding, forms do not have a unique field. I tried using an forms.EmailField(), but the problem still unfortunately remains. – ...
Read more >
969313 – AttributeError: 'dict' object has no attribute 'split'
The problem was in the parsing of DHCP6 options for NTP server information. Since this feature is not currently implemented in NetworkManager or...
Read more >
Ansible when creating an RDS instance: AttributeError: 'dict ...
AttributeError: 'dict' object has no attribute 'split'. FATAL: all hosts have already failed -- aborting. The ansible playbook for RDS which I am...
Read more >
Error dict object has no attribute iteritems | Edureka Community
I'm trying to use NetworkX to read a Shapefile and use the function write_shp() to generate the ... the nx_shp.py file, which seemed...
Read more >
Ansible dict object has no attribute stdout (or) stderr
how to handle the ansible error " 'dict object' has no attribute 'stdout_lines" in the ansible-playbook debug module. how to properly use ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found