title | platform |
---|---|
About the google_service_account_keys resource |
gcp |
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 google_service_account_key.md for more detailed information
key_names
: an array ofgoogle_service_account_key
nameprivate_key_types
: an array ofgoogle_service_account_key
private_key_typekey_algorithms
: an array ofgoogle_service_account_key
key_algorithmprivate_key_data
: an array ofgoogle_service_account_key
private_key_datapublic_key_data
: an array ofgoogle_service_account_key
public_key_datavalid_after_times
: an array ofgoogle_service_account_key
valid_after_timevalid_before_times
: an array ofgoogle_service_account_key
valid_before_timekey_types
: an array ofgoogle_service_account_key
key_typeservice_accounts
: an array ofgoogle_service_account_key
service_accountpaths
: an array ofgoogle_service_account_key
path
This 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.