Skip to content

feat: Add import support for credential resources and fix related bugs#55

Merged
quentinleclerc merged 5 commits intojosh-silvas:mainfrom
user-cube:add-credential-importers
Mar 26, 2026
Merged

feat: Add import support for credential resources and fix related bugs#55
quentinleclerc merged 5 commits intojosh-silvas:mainfrom
user-cube:add-credential-importers

Conversation

@user-cube
Copy link
Copy Markdown

  • Add Importer block to awx_credential_machine, awx_credential_vault, awx_credential_container_registry, awx_credential_azure_key_vault, and awx_credential_google_compute_engine resources;
  • Fix awx_credential_azure_key_vault: credential type was hardcoded as 19 instead of being looked up by name — now uses GetCredentialTypeByName("Microsoft Azure Key Vault") like other credential resources;
  • Fix awx_credential_container_registry: verify_ssl was always reset to false after import because AWX omits the field when it's false — now only sets the value if the field is present in the API response;
  • Fix awx_credential_machine: ssh_public_key_data was incorrectly using setSanitizedEncryptedCredential (for sensitive/encrypted fields) when it is a public, non-sensitive field — this caused a type assertion panic on import

Fields marked as sensitive (vault_password, ssh_key_data, secret) will show a diff after import. This is expected behaviour — AWX never returns encrypted values via the API, so the user must set these values in their configuration after importing.

@quentinleclerc quentinleclerc merged commit a8b9d69 into josh-silvas:main Mar 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants