Turbot Guardrails Hub 
Hub
  • Mods
  • Policy Packs
  • Docs
  • Home
ModsPolicy PacksDocsHome
Policy Packs
Enforce Default VPC Network Is Not Used in GCP Projects
  • GCP > Network > Network > Approved
  • GCP > Network > Network > Approved > Custom
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_network_approved_custom" {
resource = turbot_policy_pack.main.id
type = "tmod:@turbot/gcp-network#/policy/types/networkApprovedCustom"
template_input = <<-EOT
{
network {
name: get(path: "name")
}
}
EOT
template = <<-EOT
{%- if $.network.name != "default" -%}
{%- set data = {
"title": "Default Network",
"result": "Approved",
"message": "Project does not use a default network"
} -%}
{%- elif $.network.name == "default" -%}
{%- set data = {
"title": "Default Network",
"result": "Not approved",
"message": "Project uses a default network"
} -%}
{%- else -%}
{%- set data = {
"title": "Default Network",
"result": "Skip",
"message": "No data for default network yet"
} -%}
{%- endif -%}
{{ data | 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