google.cloud icon indicating copy to clipboard operation
google.cloud copied to clipboard

Fix error handling in creation of service account keys

Open bgandon opened this issue 2 years ago • 0 comments

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".

bgandon avatar Jan 22 '24 16:01 bgandon