Turbot Guardrails Hub 
Hub
  • Mods
  • Policy Packs
  • Docs
  • Home
ModsPolicy PacksDocsHome
Policy Packs
GCP CIS v2.0.0 - Section 1 - Identity and Access Management
  • GCP > Dataproc > Cluster > Approved
  • GCP > Dataproc > Cluster > Approved > Custom
  • GCP > IAM > API Key > Active
  • GCP > IAM > API Key > Active > Age
  • GCP > IAM > API Key > Approved
  • GCP > IAM > API Key > Approved > Custom
  • GCP > IAM > Project User > Approved
  • GCP > IAM > Project User > Approved > Custom
  • GCP > IAM > Service Account > Approved
  • GCP > IAM > Service Account > Approved > Custom
  • GCP > IAM > Service Account Key > Active
  • GCP > IAM > Service Account Key > Active > Age
  • GCP > IAM > Service Account Key > Approved
  • GCP > IAM > Service Account Key > Approved > Custom
  • GCP > KMS > Crypto Key > Approved
  • GCP > KMS > Crypto Key > Approved > Custom
  • GCP > KMS > Crypto Key > Policy > Trusted Access
  • GCP > KMS > Crypto Key > Policy > Trusted Access > All Authenticated
  • GCP > KMS > Crypto Key > Policy > Trusted Access > All Users
Get Involved
Discuss on Slack

Policy Setting: GCP > Dataproc > Cluster > Approved > Custom

Policies

This policy setting is dependent on the following policy types:

  • GCP > Dataproc > Cluster > Approved > Custom

Source

resource "turbot_policy_setting" "gcp_dataproc_cluster_approved_custom" {
resource = turbot_policy_pack.main.id
type = "tmod:@turbot/gcp-dataproc#/policy/types/clusterApprovedCustom"
note = "GCP CIS v2.0.0 - Control: 1.17"
template_input = <<-EOT
{
item: cluster {
encryptionConfig: get(path: "config.encryptionConfig")
}
}
EOT
template = <<-EOT
{% set encryptionConfig = $.item.encryptionConfig %}
{# Check gcePdKmsKeyName property because it doesn't exist incase of GCP managed key #}
{%- if encryptionConfig and encryptionConfig.gcePdKmsKeyName -%}
{%- set data = {
"title": "Encryption With Customer Managed Key",
"result": "Approved",
"message": "Cluster is encrypted with customer managed key"
} -%}
{%- elif encryptionConfig and not encryptionConfig.gcePdKmsKeyName -%}
{%- set data = {
"title": "Encryption With Customer Managed Key",
"result": "Not Approved",
"message": "Cluster is not encrypted with customer managed key"
} -%}
{%- else -%}
{%- set data = {
"title": "Encryption With Customer Managed Key",
"result": "Skip",
"message": "No data for encryption 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