Last active
May 27, 2024 07:47
-
-
Save anderseknert/ee08972646010710ef6caf51a972e2c6 to your computer and use it in GitHub Desktop.
google_sql_database_instance policy
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
package google_sql_database_instance | |
import rego.v1 | |
violations contains db_instance.id if { | |
some db_instance in input.google_sql_database_instance | |
not valid_db_instance(db_instance) | |
} | |
valid_db_instance(db_instance) if every setting in db_instance.config.settings { | |
every ip_configuration in setting.ip_configuration { | |
ip_configuration.require_ssl == true | |
not "0.0.0.0" in {authorized_network.value | some authorized_network in ip_configuration.authorized_networks} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment