feat(query): implemented 'ensure critical contacts is configured for organization' query for terraform/gcp #7841
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.








Reason for Proposed Changes
Proposed Changes
contacts_not_configured_for_orghelper function.is_at_organization_levelandall_in_listand returns true if the fieldparentis defined in a certain way that indicates that the resource is on a organization level and if the fieldnotification_category_subscriptionsdoes not have the valueALLdefined or all the following values defined:LEGAL,SECURITY,SUSPENSIONandTECHNICAL. These are the value that have to be defined to ensure that the essential contacts are configured, according to the respective CIS Workbeck documentation.parentpoints to an organization using two different notations. The first one isRESOURCE_TYPE/RESOURCE_IDwith theRESOURCE_TYPEthat can be defined with the valuesprojects,folders, ororganizations, defined with the valueorganization, in order to stay in the scope of the query. This information was found on the following Google Cloud documentation.google_organizationusing the name defined for the data source, which, in all the examples that I found on my research, with the following syntax:data.<DATA_SOURCE_TYPE>.<DATA_SOURCE_NAME>.(id|org|name|...).Missing Authorization.I submit this contribution under the Apache-2.0 license.