A google_service_account_keys is used to test a Google ServiceAccountKey resource
describe google_service_account_keys(project: 'chef-gcp-inspec', service_account: "[email protected]") do
its('count') { should be <= 1000 }
its('key_types') { should_not include 'USER_MANAGED' }
end
describe google_service_account_keys(project: 'sample-project', service_account: '[email protected]') do
its('count') { should be <= 1000}
end
describe google_service_account_keys(project: 'sample-project', service_account: '[email protected]') do
its('key_names'){ should include "projects/sample-project/serviceAccounts/[email protected]/keys/c6bd986da9fac6d71178db41d1741cbe751a5080" }
end
Properties that can be accessed from the google_service_account_keys resource:
See the google_service_account_key resource for more information.
key_namesgoogle_service_account_key nameprivate_key_typesgoogle_service_account_key private_key_typekey_algorithmsgoogle_service_account_key key_algorithmprivate_key_datagoogle_service_account_key private_key_datapublic_key_datagoogle_service_account_key public_key_datavalid_after_timesgoogle_service_account_key valid_after_timevalid_before_timesgoogle_service_account_key valid_before_timekey_typesgoogle_service_account_key key_typeservice_accountsgoogle_service_account_key service_accountpathsgoogle_service_account_key pathThis resource supports all of the above properties as filter criteria, which can be used with where as a block or a method.
Ensure the Identity and Access Management (IAM) API is enabled for the current project.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/inspec/resources/google_service_account_keys/