Skip to content

Fix terraform backend credential issue#15141

Merged
jessicamack merged 1 commit into
ansible:develfrom
abikouo:fix_terraform_backend_cred_0425
May 15, 2024
Merged

Fix terraform backend credential issue#15141
jessicamack merged 1 commit into
ansible:develfrom
abikouo:fix_terraform_backend_cred_0425

Conversation

@abikouo
Copy link
Copy Markdown
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

@jessicamack jessicamack merged commit a9b2ffa into ansible:devel May 15, 2024
djyasin pushed a commit to djyasin/awx that referenced this pull request Sep 16, 2024
djyasin pushed a commit to djyasin/awx that referenced this pull request Nov 11, 2024
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.

3 participants