google.cloud
google.cloud copied to clipboard
Fix error handling in creation of service account keys
SUMMARY
When creating a service account key with the google.cloud.gcp_iam_service_account_key module, when the service_account.name was incorrect, the 404 error was improperly interpreted as normal business, and resulted in a cryptic stacktrace. Plus, the gcp_iam_service_account_key module had no integration test at all.
Here we fix the above issue and we add proper integration test cases.
Fixes: #244
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
This affects the google.cloud.gcp_iam_service_account_key module only.
ADDITIONAL INFORMATION
Passing tests: ansible-test integration "gcp_iam_service_account_key".