Skip to content
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

Fix terraform backend credential issue #15141

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

abikouo
Copy link
Contributor

@abikouo abikouo commented Apr 25, 2024

SUMMARY

When trying to sync inventory using terraform backend credentials, the job failed when the credential is not a google credential type.

  File "/awx_devel/awx/main/models/inventory.py", line 1507, in build_private_data
    return self.build_plugin_private_data(inventory_update, private_data_dir)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/awx_devel/awx/main/models/inventory.py", line 1663, in build_plugin_private_data
    gce_cred = credential.get_input('gce_credentials')
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/awx_devel/awx/main/models/credential/__init__.py", line 290, in get_input
    raise AttributeError(field_name)
AttributeError: gce_credentials

This issue has been introduced by the merge of #15055
This fix consists in checking whether the user as provided some google credentials.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API
AWX VERSION
24.3.1.dev7+g2fbbd10b1d
ADDITIONAL INFORMATION

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants