-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add disabled control for GCP organization resource
- Loading branch information
1 parent
8af4d77
commit b5bb1e8
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
title 'Test GCP Organizations' | ||
|
||
gcp_organization_id = attribute(:gcp_organization_id, default: '', description: 'The GCP organization identifier.') | ||
gcp_organization_display_name = attribute(:gcp_organization_display_name, default: '', description: 'The GCP organization display name.') | ||
gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') | ||
|
||
control 'gcp-organizations-loop-1.0' do | ||
|
||
only_if { gcp_enable_privileged_resources.to_i == 1 } | ||
impact 1.0 | ||
title 'Ensure organizations have the correct properties in bulk.' | ||
|
||
describe google_organizations do | ||
it { should exist } | ||
its('names'){ should include "organizations/#{gcp_organization_id}" } | ||
its('display_names'){ should include gcp_organization_display_name } | ||
its('lifecycle_state'){ should include 'ACTIVE' } | ||
end | ||
end |