Turbot Guardrails Hub 
Hub
  • Mods
  • Policy Packs
  • Docs
  • Home
ModsPolicy PacksDocsHome
Policy Packs
GCP CIS v2.0.0 - Section 3 - Networking
  • GCP > DNS > Managed Zone > Approved
  • GCP > DNS > Managed Zone > Approved > Custom
  • GCP > DNS > Managed Zone > DNSSEC Configuration
  • GCP > Network > Firewall > Approved
  • GCP > Network > Firewall > Approved > Custom
  • GCP > Network > Firewall > Ingress Rules > Approved
  • GCP > Network > Firewall > Ingress Rules > Approved > Rules
  • GCP > Network > Network > Approved
  • GCP > Network > Network > Approved > Custom
  • GCP > Network > SSL Policy > Minimum TLS Version
  • GCP > Network > SSL Policy > Profile
  • GCP > Network > Subnetwork > Flow Log
Get Involved
Discuss on Slack

Policy Setting: GCP > Network > Network > Approved > Custom

Policies

This policy setting is dependent on the following policy types:

  • GCP > Network > Network > Approved > Custom

Source

resource "turbot_policy_setting" "gcp_network_approved_custom" {
resource = turbot_policy_pack.main.id
type = "tmod:@turbot/gcp-network#/policy/types/networkApprovedCustom"
note = "GCP CIS v2.0.0 - Control: 3.1 and 3.2"
template_input = <<-EOT
{
network {
name: get(path: "name")
autoCreateSubnetworks: get(path: "autoCreateSubnetworks")
}
}
EOT
template = <<-EOT
{%- set results = [] -%}
{%- if $.network.name == "default" -%}
{%- set data = {
"title": "Default Network",
"result": "Not approved",
"message": "This is a default network"
} -%}
{%- elif $.network.name != "default" -%}
{%- set data = {
"title": "Default Network",
"result": "Approved",
"message": "This is not a default network"
} -%}
{%- else -%}
{%- set data = {
"title": "Default Network",
"result": "Skip",
"message": "No data for network yet"
} -%}
{%- endif -%}
{%- set results = results.concat(data) -%}
{%- if $.network.autoCreateSubnetworks == null -%}
{%- set data = {
"title": "Legacy Network",
"result": "Not approved",
"message": "This is a legacy network"
} -%}
{%- elif $.network.autoCreateSubnetworks != null -%}
{%- set data = {
"title": "Legacy Network",
"result": "Approved",
"message": "This is not a legacy network"
} -%}
{%- else -%}
{%- set data = {
"title": "Legacy Network",
"result": "Skip",
"message": "No data for legacy network yet"
} -%}
{% endif -%}
{% set results = results.concat(data) -%}
{{ results | json }}
EOT
}
Guardrails
Guardrails Hub
  • Hub
  • Docs
  • Blog
  • Changelog
Products
  • GuardrailsGuardrails
  • PipesPipes
  • SteampipeSteampipe
  • PowerpipePowerpipe
  • FlowpipeFlowpipe
  • TailpipeTailpipe
Turbot
  • Home
  • About us
  • We're hiring!
  • Contact us
Community

Our community of practitioners love to discuss cloud governance & security.

Slack logoJoin us on Slack →

System StatusLegalSecurity
Terms of UseSecurityPrivacy