Policy types for @turbot/gcp-sql

GCP > SQL > API Enabled

Check whether GCP SQL API is enabled.

API Enabled refers specifically to the API state of a service in a cloud project.
This control determines whether the API state is set as per desired level.

The GCP > SQL > API Enabled control compares
the API state against the API Enabled policies,
raises an alarm, and takes the defined enforcement action.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlApiEnabled
Parent
Valid Value
[
"Skip",
"Check: Disabled",
"Check: Enabled",
"Check: Enabled if SQL > Enabled",
"Enforce: Disabled",
"Enforce: Enabled",
"Enforce: Enabled if SQL > Enabled"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Disabled",
"Check: Enabled",
"Check: Enabled if SQL > Enabled",
"Enforce: Disabled",
"Enforce: Enabled",
"Enforce: Enabled if SQL > Enabled"
],
"default": "Skip"
}

GCP > SQL > Approved Regions [Default]

A list of GCP regions in which GCP SQL resources are approved for use.

The expected format is an array of regions names. You may use the '*' and
'?' wildcard characters.

This policy is the default value for all GCP SQL resources' Approved > Regions policies.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlApprovedRegionsDefault
Parent
Default Template Input
"{\n regions: policyValue(uri:\"tmod:@turbot/gcp#/policy/types/approvedRegionsDefault\") {\n value\n }\n}\n"
Default Template
"{% if $.regions.value | length == 0 %} [] {% endif %}{% for item in $.regions.value %}- '{{ item }}'\n{% endfor %}"

GCP > SQL > Backup > Active

Determine the action to take when an GCP SQL backup, based on the GCP > SQL > Backup > Active > * policies.

The control determines whether the resource is in active use, and if not,
has the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Backup > Active > *), raises an alarm, and takes the defined enforcement
action. Each Active sub-policy can calculate a status of active, inactive
or skipped. Generally, if the resource appears to be Active for any reason
it will be considered Active.
Note the contrast with Approved, where if the
resource appears to be Unapproved for any reason it will be considered
Unapproved.

See Active for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/backupActive
Valid Value
[
"Skip",
"Check: Active",
"Enforce: Delete inactive with 1 day warning",
"Enforce: Delete inactive with 3 days warning",
"Enforce: Delete inactive with 7 days warning",
"Enforce: Delete inactive with 14 days warning",
"Enforce: Delete inactive with 30 days warning",
"Enforce: Delete inactive with 60 days warning",
"Enforce: Delete inactive with 90 days warning",
"Enforce: Delete inactive with 180 days warning",
"Enforce: Delete inactive with 365 days warning"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Active",
"Enforce: Delete inactive with 1 day warning",
"Enforce: Delete inactive with 3 days warning",
"Enforce: Delete inactive with 7 days warning",
"Enforce: Delete inactive with 14 days warning",
"Enforce: Delete inactive with 30 days warning",
"Enforce: Delete inactive with 60 days warning",
"Enforce: Delete inactive with 90 days warning",
"Enforce: Delete inactive with 180 days warning",
"Enforce: Delete inactive with 365 days warning"
],
"example": [
"Check: Active"
],
"default": "Skip"
}

GCP > SQL > Backup > Active > Age

The age after which the GCP SQL backup
is no longer considered active. If a create time is unavailable, the time Guardrails discovered the resource is used.

The Active
control determines whether the resource is in active use, and if not, has
the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Backup > Active > *),
raises an alarm, and takes the defined enforcement action. Each Active
sub-policy can calculate a status of active, inactive or skipped. Generally,
if the resource appears to be Active for any reason it will be considered Active.
Note the contrast with Approved, where if the resource appears to be Unapproved
for any reason it will be considered Unapproved.

See Active for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/backupActiveAge
Valid Value
[
"Skip",
"Force inactive if age > 1 day",
"Force inactive if age > 3 days",
"Force inactive if age > 7 days",
"Force inactive if age > 14 days",
"Force inactive if age > 30 days",
"Force inactive if age > 60 days",
"Force inactive if age > 90 days",
"Force inactive if age > 180 days",
"Force inactive if age > 365 days"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Force inactive if age > 1 day",
"Force inactive if age > 3 days",
"Force inactive if age > 7 days",
"Force inactive if age > 14 days",
"Force inactive if age > 30 days",
"Force inactive if age > 60 days",
"Force inactive if age > 90 days",
"Force inactive if age > 180 days",
"Force inactive if age > 365 days"
],
"example": [
"Force inactive if age > 90 days"
],
"default": "Skip"
}

GCP > SQL > Backup > Active > Last Modified

The number of days since the GCP SQL backup was last modified before it is considered
inactive.

The Active
control determines whether the resource is in active use, and if not, has
the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Backup > Active > *), raises an alarm, and takes the defined enforcement
action. Each Active sub-policy can calculate a status of active, inactive
or skipped. Generally, if the resource appears to be Active for any reason
it will be considered Active.
Note the contrast with Approved, where if the
resource appears to be Unapproved for any reason it will be considered
Unapproved.

URI
tmod:@turbot/gcp-sql#/policy/types/backupActiveLastModified
Valid Value
[
"Skip",
"Active if last modified <= 1 day",
"Active if last modified <= 3 days",
"Active if last modified <= 7 days",
"Active if last modified <= 14 days",
"Active if last modified <= 30 days",
"Active if last modified <= 60 days",
"Active if last modified <= 90 days",
"Active if last modified <= 180 days",
"Active if last modified <= 365 days",
"Force active if last modified <= 1 day",
"Force active if last modified <= 3 days",
"Force active if last modified <= 7 days",
"Force active if last modified <= 14 days",
"Force active if last modified <= 30 days",
"Force active if last modified <= 60 days",
"Force active if last modified <= 90 days",
"Force active if last modified <= 180 days",
"Force active if last modified <= 365 days"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Active if last modified <= 1 day",
"Active if last modified <= 3 days",
"Active if last modified <= 7 days",
"Active if last modified <= 14 days",
"Active if last modified <= 30 days",
"Active if last modified <= 60 days",
"Active if last modified <= 90 days",
"Active if last modified <= 180 days",
"Active if last modified <= 365 days",
"Force active if last modified <= 1 day",
"Force active if last modified <= 3 days",
"Force active if last modified <= 7 days",
"Force active if last modified <= 14 days",
"Force active if last modified <= 30 days",
"Force active if last modified <= 60 days",
"Force active if last modified <= 90 days",
"Force active if last modified <= 180 days",
"Force active if last modified <= 365 days"
],
"example": [
"Active if last modified <= 90 days"
],
"default": "Skip"
}

GCP > SQL > Backup > Approved

Determine the action to take when a GCP SQL backup is not approved based on GCP > SQL > Backup > Approved > * policies.

The Approved control checks the status of the defined Approved sub-policies for the resource. If the resource is not approved according to any of these policies, this control raises an alarm and takes the defined enforcement action.

For any enforcement actions that specify if new, e.g., Enforce: Delete unapproved if new, this control will only take the enforcement actions for resources created within the last 60 minutes.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/backupApproved
Valid Value
[
"Skip",
"Check: Approved",
"Enforce: Delete unapproved if new"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Approved",
"Enforce: Delete unapproved if new"
],
"example": [
"Check: Approved"
],
"default": "Skip"
}

GCP > SQL > Backup > Approved > Custom

Determine whether the GCP SQL backup is allowed to exist.
This policy will be evaluated by the Approved control. If a GCP SQL backup is not approved, it will be subject to the action specified in the GCP > SQL > Backup > Approved policy.
See Approved for more information.

Note: The policy value must be a string with a value of Approved, Not approved or Skip, or in the form of YAML objects. The object(s) must contain the key result with its value as Approved or Not approved. A custom title and message can also be added using the keys title and message respectively.

URI
tmod:@turbot/gcp-sql#/policy/types/backupApprovedCustom
Schema
{
"example": [
"Approved",
"Not approved",
"Skip",
{
"result": "Approved"
},
{
"title": "string",
"result": "Not approved"
},
{
"title": "string",
"result": "Approved",
"message": "string"
},
[
{
"title": "string",
"result": "Approved",
"message": "string"
},
{
"title": "string",
"result": "Not approved",
"message": "string"
}
]
],
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"pattern": "^[\\W\\w]{1,32}$"
},
"message": {
"type": "string",
"pattern": "^[\\W\\w]{1,128}$"
},
"result": {
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
},
"required": [
"result"
],
"additionalProperties": false
}
},
{
"type": "object",
"properties": {
"title": {
"type": "string",
"pattern": "^[\\W\\w]{1,32}$"
},
"message": {
"type": "string",
"pattern": "^[\\W\\w]{1,128}$"
},
"result": {
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
},
"required": [
"result"
],
"additionalProperties": false
},
{
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
],
"default": "Skip"
}

GCP > SQL > Backup > Approved > Regions

A list of GCP regions in which GCP SQL backups are approved for use.

The expected format is an array of regions names. You may use the '*' and '?' wildcard characters.

This policy will be evaluated by the Approved control. If a GCP SQL backup is created in a region that is not in the approved list, it will be subject to the action specified in the GCP > SQL > Backup > Approved policy.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/backupApprovedRegions
Default Template Input
"{\n regions: policyValue(uri:\"tmod:@turbot/gcp-sql#/policy/types/sqlApprovedRegionsDefault\") {\n value\n }\n}\n"
Default Template
"{% if $.regions.value | length == 0 %} [] {% endif %}{% for item in $.regions.value %}- &#39;{{ item }}&#39;&#92;n{% endfor %}"

GCP > SQL > Backup > Approved > Usage

Determine whether the GCP SQL backup is allowed to exist.

This policy will be evaluated by the Approved control. If a GCP SQL backup is not approved, it will be subject to the action specified in the GCP > SQL > Backup > Approved policy.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/backupApprovedUsage
Valid Value
[
"Not approved",
"Approved",
"Approved if GCP > SQL > Enabled"
]
Schema
{
"type": "string",
"enum": [
"Not approved",
"Approved",
"Approved if GCP > SQL > Enabled"
],
"example": [
"Not approved"
],
"default": "Approved if GCP > SQL > Enabled"
}

GCP > SQL > Backup > CMDB

Configure whether to record and synchronize details for the GCP SQL backup into the CMDB.

The CMDB control is responsible for populating and updating all the attributes for that resource type in the Guardrails CMDB.
All policies and controls in Guardrails are based around the resource, so usually the CMDB policy is set to "Enforce: Enabled".

If set to Skip then all changes to the CMDB are paused - no new resources will be discovered, no updates will be made and deleted resources will not be removed.

To cleanup resources and stop tracking changes, set this policy to "Enforce: Disabled".

CMDB controls also use the Regions policy associated with the resource. If region is not in GCP > SQL > Backup > Regions policy, the CMDB control will delete the resource from the CMDB.

(Note: Setting CMDB to "Skip" will also pause these changes.)

URI
tmod:@turbot/gcp-sql#/policy/types/backupCmdb
Category
Valid Value
[
"Skip",
"Enforce: Enabled",
"Enforce: Enabled if SQL API is enabled",
"Enforce: Disabled"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Enforce: Enabled",
"Enforce: Enabled if SQL API is enabled",
"Enforce: Disabled"
],
"example": [
"Skip"
],
"default": "Enforce: Enabled if SQL API is enabled"
}

GCP > SQL > Backup > Regions

A list of GCP regions in which GCP SQL backups are supported for use.

Any backups in a region not listed here will not be recorded in CMDB.

The expected format is an array of regions names. You may use the '*' and
'?' wildcard characters.

URI
tmod:@turbot/gcp-sql#/policy/types/backupRegions
Default Template Input
"{\n regions: policyValue(uri:\"tmod:@turbot/gcp-sql#/policy/types/sqlRegionsDefault\") {\n value\n }\n}\n"
Default Template
"{% if $.regions.value | length == 0 %} [] {% endif %}{% for item in $.regions.value %}- &#39;{{ item }}&#39;&#92;n{% endfor %}"

GCP > SQL > Backup > Usage

Configure the number of GCP SQL backups that can be used for this instance and the current consumption against the limit.

You can configure the behavior of the control with this GCP > SQL > Backup > Usage policy.

URI
tmod:@turbot/gcp-sql#/policy/types/backupUsage
Valid Value
[
"Skip",
"Check: Usage <= 85% of Limit",
"Check: Usage <= 100% of Limit"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Usage <= 85% of Limit",
"Check: Usage <= 100% of Limit"
],
"example": [
"Check: Usage <= 85% of Limit"
],
"default": "Skip"
}

GCP > SQL > Backup > Usage > Limit

Maximum number of items that can be created for this instance

URI
tmod:@turbot/gcp-sql#/policy/types/backupUsageLimit
Schema
{
"type": "integer",
"minimum": 0,
"default": 40
}

GCP > SQL > CMDB

Record and synchronize details for GCP SQL sql(s) into the CMDB.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlCmdb
Category
Parent
Valid Value
[
"Skip",
"Enforce: Enabled"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Enforce: Enabled"
],
"example": [
"Skip"
],
"default": "Enforce: Enabled"
}

GCP > SQL > Database > Active

Determine the action to take when an GCP SQL database, based on the GCP > SQL > Database > Active > * policies.

The control determines whether the resource is in active use, and if not,
has the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Database > Active > *), raises an alarm, and takes the defined enforcement
action. Each Active sub-policy can calculate a status of active, inactive
or skipped. Generally, if the resource appears to be Active for any reason
it will be considered Active.
Note the contrast with Approved, where if the
resource appears to be Unapproved for any reason it will be considered
Unapproved.

See Active for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseActive
Valid Value
[
"Skip",
"Check: Active",
"Enforce: Delete inactive with 1 day warning",
"Enforce: Delete inactive with 3 days warning",
"Enforce: Delete inactive with 7 days warning",
"Enforce: Delete inactive with 14 days warning",
"Enforce: Delete inactive with 30 days warning",
"Enforce: Delete inactive with 60 days warning",
"Enforce: Delete inactive with 90 days warning",
"Enforce: Delete inactive with 180 days warning",
"Enforce: Delete inactive with 365 days warning"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Active",
"Enforce: Delete inactive with 1 day warning",
"Enforce: Delete inactive with 3 days warning",
"Enforce: Delete inactive with 7 days warning",
"Enforce: Delete inactive with 14 days warning",
"Enforce: Delete inactive with 30 days warning",
"Enforce: Delete inactive with 60 days warning",
"Enforce: Delete inactive with 90 days warning",
"Enforce: Delete inactive with 180 days warning",
"Enforce: Delete inactive with 365 days warning"
],
"example": [
"Check: Active"
],
"default": "Skip"
}

GCP > SQL > Database > Active > Age

The age after which the GCP SQL database
is no longer considered active. If a create time is unavailable, the time Guardrails discovered the resource is used.

The Active
control determines whether the resource is in active use, and if not, has
the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Database > Active > *),
raises an alarm, and takes the defined enforcement action. Each Active
sub-policy can calculate a status of active, inactive or skipped. Generally,
if the resource appears to be Active for any reason it will be considered Active.
Note the contrast with Approved, where if the resource appears to be Unapproved
for any reason it will be considered Unapproved.

See Active for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseActiveAge
Valid Value
[
"Skip",
"Force inactive if age > 1 day",
"Force inactive if age > 3 days",
"Force inactive if age > 7 days",
"Force inactive if age > 14 days",
"Force inactive if age > 30 days",
"Force inactive if age > 60 days",
"Force inactive if age > 90 days",
"Force inactive if age > 180 days",
"Force inactive if age > 365 days"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Force inactive if age > 1 day",
"Force inactive if age > 3 days",
"Force inactive if age > 7 days",
"Force inactive if age > 14 days",
"Force inactive if age > 30 days",
"Force inactive if age > 60 days",
"Force inactive if age > 90 days",
"Force inactive if age > 180 days",
"Force inactive if age > 365 days"
],
"example": [
"Force inactive if age > 90 days"
],
"default": "Skip"
}

GCP > SQL > Database > Active > Last Modified

The number of days since the GCP SQL database was last modified before it is considered
inactive.

The Active
control determines whether the resource is in active use, and if not, has
the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Database > Active > *), raises an alarm, and takes the defined enforcement
action. Each Active sub-policy can calculate a status of active, inactive
or skipped. Generally, if the resource appears to be Active for any reason
it will be considered Active.
Note the contrast with Approved, where if the
resource appears to be Unapproved for any reason it will be considered
Unapproved.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseActiveLastModified
Valid Value
[
"Skip",
"Active if last modified <= 1 day",
"Active if last modified <= 3 days",
"Active if last modified <= 7 days",
"Active if last modified <= 14 days",
"Active if last modified <= 30 days",
"Active if last modified <= 60 days",
"Active if last modified <= 90 days",
"Active if last modified <= 180 days",
"Active if last modified <= 365 days",
"Force active if last modified <= 1 day",
"Force active if last modified <= 3 days",
"Force active if last modified <= 7 days",
"Force active if last modified <= 14 days",
"Force active if last modified <= 30 days",
"Force active if last modified <= 60 days",
"Force active if last modified <= 90 days",
"Force active if last modified <= 180 days",
"Force active if last modified <= 365 days"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Active if last modified <= 1 day",
"Active if last modified <= 3 days",
"Active if last modified <= 7 days",
"Active if last modified <= 14 days",
"Active if last modified <= 30 days",
"Active if last modified <= 60 days",
"Active if last modified <= 90 days",
"Active if last modified <= 180 days",
"Active if last modified <= 365 days",
"Force active if last modified <= 1 day",
"Force active if last modified <= 3 days",
"Force active if last modified <= 7 days",
"Force active if last modified <= 14 days",
"Force active if last modified <= 30 days",
"Force active if last modified <= 60 days",
"Force active if last modified <= 90 days",
"Force active if last modified <= 180 days",
"Force active if last modified <= 365 days"
],
"example": [
"Active if last modified <= 90 days"
],
"default": "Skip"
}

GCP > SQL > Database > Approved

Determine the action to take when a GCP SQL database is not approved based on GCP > SQL > Database > Approved > * policies.

The Approved control checks the status of the defined Approved sub-policies for the resource. If the resource is not approved according to any of these policies, this control raises an alarm and takes the defined enforcement action.

For any enforcement actions that specify if new, e.g., Enforce: Delete unapproved if new, this control will only take the enforcement actions for resources created within the last 60 minutes.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseApproved
Valid Value
[
"Skip",
"Check: Approved",
"Enforce: Delete unapproved if new"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Approved",
"Enforce: Delete unapproved if new"
],
"example": [
"Check: Approved"
],
"default": "Skip"
}

GCP > SQL > Database > Approved > Custom

Determine whether the GCP SQL database is allowed to exist.
This policy will be evaluated by the Approved control. If a GCP SQL database is not approved, it will be subject to the action specified in the GCP > SQL > Database > Approved policy.
See Approved for more information.

Note: The policy value must be a string with a value of Approved, Not approved or Skip, or in the form of YAML objects. The object(s) must contain the key result with its value as Approved or Not approved. A custom title and message can also be added using the keys title and message respectively.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseApprovedCustom
Schema
{
"example": [
"Approved",
"Not approved",
"Skip",
{
"result": "Approved"
},
{
"title": "string",
"result": "Not approved"
},
{
"title": "string",
"result": "Approved",
"message": "string"
},
[
{
"title": "string",
"result": "Approved",
"message": "string"
},
{
"title": "string",
"result": "Not approved",
"message": "string"
}
]
],
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"pattern": "^[\\W\\w]{1,32}$"
},
"message": {
"type": "string",
"pattern": "^[\\W\\w]{1,128}$"
},
"result": {
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
},
"required": [
"result"
],
"additionalProperties": false
}
},
{
"type": "object",
"properties": {
"title": {
"type": "string",
"pattern": "^[\\W\\w]{1,32}$"
},
"message": {
"type": "string",
"pattern": "^[\\W\\w]{1,128}$"
},
"result": {
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
},
"required": [
"result"
],
"additionalProperties": false
},
{
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
],
"default": "Skip"
}

GCP > SQL > Database > Approved > Regions

A list of GCP regions in which GCP SQL databases are approved for use.

The expected format is an array of regions names. You may use the '*' and '?' wildcard characters.

This policy will be evaluated by the Approved control. If a GCP SQL database is created in a region that is not in the approved list, it will be subject to the action specified in the GCP > SQL > Database > Approved policy.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseApprovedRegions
Default Template Input
"{\n regions: policyValue(uri:\"tmod:@turbot/gcp-sql#/policy/types/sqlApprovedRegionsDefault\") {\n value\n }\n}\n"
Default Template
"{% if $.regions.value | length == 0 %} [] {% endif %}{% for item in $.regions.value %}- &#39;{{ item }}&#39;&#92;n{% endfor %}"

GCP > SQL > Database > Approved > Usage

Determine whether the GCP SQL database is allowed to exist.

This policy will be evaluated by the Approved control. If a GCP SQL database is not approved, it will be subject to the action specified in the GCP > SQL > Database > Approved policy.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseApprovedUsage
Valid Value
[
"Not approved",
"Approved",
"Approved if GCP > SQL > Enabled"
]
Schema
{
"type": "string",
"enum": [
"Not approved",
"Approved",
"Approved if GCP > SQL > Enabled"
],
"example": [
"Not approved"
],
"default": "Approved if GCP > SQL > Enabled"
}

GCP > SQL > Database > CMDB

Configure whether to record and synchronize details for the GCP SQL database into the CMDB.

The CMDB control is responsible for populating and updating all the attributes for that resource type in the Guardrails CMDB.
All policies and controls in Guardrails are based around the resource, so usually the CMDB policy is set to "Enforce: Enabled".

If set to Skip then all changes to the CMDB are paused - no new resources will be discovered, no updates will be made and deleted resources will not be removed.

To cleanup resources and stop tracking changes, set this policy to "Enforce: Disabled".

CMDB controls also use the Regions policy associated with the resource. If region is not in GCP > SQL > Database > Regions policy, the CMDB control will delete the resource from the CMDB.

(Note: Setting CMDB to "Skip" will also pause these changes.)

URI
tmod:@turbot/gcp-sql#/policy/types/databaseCmdb
Category
Valid Value
[
"Skip",
"Enforce: Enabled",
"Enforce: Enabled if SQL API is enabled",
"Enforce: Disabled"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Enforce: Enabled",
"Enforce: Enabled if SQL API is enabled",
"Enforce: Disabled"
],
"example": [
"Skip"
],
"default": "Enforce: Enabled if SQL API is enabled"
}

GCP > SQL > Database > Regions

A list of GCP regions in which GCP SQL databases are supported for use.

Any databases in a region not listed here will not be recorded in CMDB.

The expected format is an array of regions names. You may use the '*' and
'?' wildcard characters.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseRegions
Default Template Input
"{\n regions: policyValue(uri:\"tmod:@turbot/gcp-sql#/policy/types/sqlRegionsDefault\") {\n value\n }\n}\n"
Default Template
"{% if $.regions.value | length == 0 %} [] {% endif %}{% for item in $.regions.value %}- &#39;{{ item }}&#39;&#92;n{% endfor %}"

GCP > SQL > Database > Usage

Configure the number of GCP SQL databases that can be used for this project and the current consumption against the limit.

You can configure the behavior of the control with this GCP > SQL > Database > Usage policy.

URI
tmod:@turbot/gcp-sql#/policy/types/databaseUsage
Valid Value
[
"Skip",
"Check: Usage <= 85% of Limit",
"Check: Usage <= 100% of Limit"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Usage <= 85% of Limit",
"Check: Usage <= 100% of Limit"
],
"example": [
"Check: Usage <= 85% of Limit"
],
"default": "Skip"
}

GCP > SQL > Database > Usage > Limit

Maximum number of items that can be created for this project

URI
tmod:@turbot/gcp-sql#/policy/types/databaseUsageLimit
Schema
{
"type": "integer",
"minimum": 0,
"default": 40
}

GCP > SQL > Enabled

Enabled SQL.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlEnabled
Parent
Valid Value
[
"Enabled",
"Enabled: Metadata Only",
"Disabled"
]
Schema
{
"type": "string",
"enum": [
"Enabled",
"Enabled: Metadata Only",
"Disabled"
],
"example": [
"Enabled"
],
"default": "Disabled"
}

GCP > SQL > Instance > Active

Determine the action to take when an GCP SQL instance, based on the GCP > SQL > Instance > Active > * policies.

The control determines whether the resource is in active use, and if not,
has the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Instance > Active > *), raises an alarm, and takes the defined enforcement
action. Each Active sub-policy can calculate a status of active, inactive
or skipped. Generally, if the resource appears to be Active for any reason
it will be considered Active.
Note the contrast with Approved, where if the
resource appears to be Unapproved for any reason it will be considered
Unapproved.

See Active for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceActive
Valid Value
[
"Skip",
"Check: Active",
"Enforce: Delete inactive with 1 day warning",
"Enforce: Delete inactive with 3 days warning",
"Enforce: Delete inactive with 7 days warning",
"Enforce: Delete inactive with 14 days warning",
"Enforce: Delete inactive with 30 days warning",
"Enforce: Delete inactive with 60 days warning",
"Enforce: Delete inactive with 90 days warning",
"Enforce: Delete inactive with 180 days warning",
"Enforce: Delete inactive with 365 days warning"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Active",
"Enforce: Delete inactive with 1 day warning",
"Enforce: Delete inactive with 3 days warning",
"Enforce: Delete inactive with 7 days warning",
"Enforce: Delete inactive with 14 days warning",
"Enforce: Delete inactive with 30 days warning",
"Enforce: Delete inactive with 60 days warning",
"Enforce: Delete inactive with 90 days warning",
"Enforce: Delete inactive with 180 days warning",
"Enforce: Delete inactive with 365 days warning"
],
"example": [
"Check: Active"
],
"default": "Skip"
}

GCP > SQL > Instance > Active > Age

The age after which the GCP SQL instance
is no longer considered active. If a create time is unavailable, the time Guardrails discovered the resource is used.

The Active
control determines whether the resource is in active use, and if not, has
the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Instance > Active > *),
raises an alarm, and takes the defined enforcement action. Each Active
sub-policy can calculate a status of active, inactive or skipped. Generally,
if the resource appears to be Active for any reason it will be considered Active.
Note the contrast with Approved, where if the resource appears to be Unapproved
for any reason it will be considered Unapproved.

See Active for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceActiveAge
Valid Value
[
"Skip",
"Force inactive if age > 1 day",
"Force inactive if age > 3 days",
"Force inactive if age > 7 days",
"Force inactive if age > 14 days",
"Force inactive if age > 30 days",
"Force inactive if age > 60 days",
"Force inactive if age > 90 days",
"Force inactive if age > 180 days",
"Force inactive if age > 365 days"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Force inactive if age > 1 day",
"Force inactive if age > 3 days",
"Force inactive if age > 7 days",
"Force inactive if age > 14 days",
"Force inactive if age > 30 days",
"Force inactive if age > 60 days",
"Force inactive if age > 90 days",
"Force inactive if age > 180 days",
"Force inactive if age > 365 days"
],
"example": [
"Force inactive if age > 90 days"
],
"default": "Skip"
}

GCP > SQL > Instance > Active > Last Modified

The number of days since the GCP SQL instance was last modified before it is considered
inactive.

The Active
control determines whether the resource is in active use, and if not, has
the ability to delete / cleanup the resource. When running an automated
compliance environment, it's common to end up with a wide range of alarms
that are difficult and time consuming to clear. The Active control brings
automated, well-defined control to this process.

The Active control checks the status of all defined Active policies for the
resource (GCP > SQL > Instance > Active > *), raises an alarm, and takes the defined enforcement
action. Each Active sub-policy can calculate a status of active, inactive
or skipped. Generally, if the resource appears to be Active for any reason
it will be considered Active.
Note the contrast with Approved, where if the
resource appears to be Unapproved for any reason it will be considered
Unapproved.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceActiveLastModified
Valid Value
[
"Skip",
"Active if last modified <= 1 day",
"Active if last modified <= 3 days",
"Active if last modified <= 7 days",
"Active if last modified <= 14 days",
"Active if last modified <= 30 days",
"Active if last modified <= 60 days",
"Active if last modified <= 90 days",
"Active if last modified <= 180 days",
"Active if last modified <= 365 days",
"Force active if last modified <= 1 day",
"Force active if last modified <= 3 days",
"Force active if last modified <= 7 days",
"Force active if last modified <= 14 days",
"Force active if last modified <= 30 days",
"Force active if last modified <= 60 days",
"Force active if last modified <= 90 days",
"Force active if last modified <= 180 days",
"Force active if last modified <= 365 days"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Active if last modified <= 1 day",
"Active if last modified <= 3 days",
"Active if last modified <= 7 days",
"Active if last modified <= 14 days",
"Active if last modified <= 30 days",
"Active if last modified <= 60 days",
"Active if last modified <= 90 days",
"Active if last modified <= 180 days",
"Active if last modified <= 365 days",
"Force active if last modified <= 1 day",
"Force active if last modified <= 3 days",
"Force active if last modified <= 7 days",
"Force active if last modified <= 14 days",
"Force active if last modified <= 30 days",
"Force active if last modified <= 60 days",
"Force active if last modified <= 90 days",
"Force active if last modified <= 180 days",
"Force active if last modified <= 365 days"
],
"example": [
"Active if last modified <= 90 days"
],
"default": "Skip"
}

GCP > SQL > Instance > Approved

Determine the action to take when a GCP SQL instance is not approved based on GCP > SQL > Instance > Approved > * policies.

The Approved control checks the status of the defined Approved sub-policies for the resource. If the resource is not approved according to any of these policies, this control raises an alarm and takes the defined enforcement action.

For any enforcement actions that specify if new, e.g., Enforce: Delete unapproved if new, this control will only take the enforcement actions for resources created within the last 60 minutes.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceApproved
Valid Value
[
"Skip",
"Check: Approved",
"Enforce: Delete unapproved if new"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Approved",
"Enforce: Delete unapproved if new"
],
"example": [
"Check: Approved"
],
"default": "Skip"
}

GCP > SQL > Instance > Approved > Custom

Determine whether the GCP SQL instance is allowed to exist.
This policy will be evaluated by the Approved control. If a GCP SQL instance is not approved, it will be subject to the action specified in the GCP > SQL > Instance > Approved policy.
See Approved for more information.

Note: The policy value must be a string with a value of Approved, Not approved or Skip, or in the form of YAML objects. The object(s) must contain the key result with its value as Approved or Not approved. A custom title and message can also be added using the keys title and message respectively.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceApprovedCustom
Schema
{
"example": [
"Approved",
"Not approved",
"Skip",
{
"result": "Approved"
},
{
"title": "string",
"result": "Not approved"
},
{
"title": "string",
"result": "Approved",
"message": "string"
},
[
{
"title": "string",
"result": "Approved",
"message": "string"
},
{
"title": "string",
"result": "Not approved",
"message": "string"
}
]
],
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"pattern": "^[\\W\\w]{1,32}$"
},
"message": {
"type": "string",
"pattern": "^[\\W\\w]{1,128}$"
},
"result": {
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
},
"required": [
"result"
],
"additionalProperties": false
}
},
{
"type": "object",
"properties": {
"title": {
"type": "string",
"pattern": "^[\\W\\w]{1,32}$"
},
"message": {
"type": "string",
"pattern": "^[\\W\\w]{1,128}$"
},
"result": {
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
},
"required": [
"result"
],
"additionalProperties": false
},
{
"type": "string",
"pattern": "^(Approved|Not approved|Skip)$"
}
],
"default": "Skip"
}

GCP > SQL > Instance > Approved > Regions

A list of GCP regions in which GCP SQL instances are approved for use.

The expected format is an array of regions names. You may use the '*' and '?' wildcard characters.

This policy will be evaluated by the Approved control. If a GCP SQL instance is created in a region that is not in the approved list, it will be subject to the action specified in the GCP > SQL > Instance > Approved policy.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceApprovedRegions
Default Template Input
"{\n regions: policyValue(uri:\"tmod:@turbot/gcp-sql#/policy/types/sqlApprovedRegionsDefault\") {\n value\n }\n}\n"
Default Template
"{% if $.regions.value | length == 0 %} [] {% endif %}{% for item in $.regions.value %}- &#39;{{ item }}&#39;&#92;n{% endfor %}"

GCP > SQL > Instance > Approved > Usage

Determine whether the GCP SQL instance is allowed to exist.

This policy will be evaluated by the Approved control. If a GCP SQL instance is not approved, it will be subject to the action specified in the GCP > SQL > Instance > Approved policy.

See Approved for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceApprovedUsage
Valid Value
[
"Not approved",
"Approved",
"Approved if GCP > SQL > Enabled"
]
Schema
{
"type": "string",
"enum": [
"Not approved",
"Approved",
"Approved if GCP > SQL > Enabled"
],
"example": [
"Not approved"
],
"default": "Approved if GCP > SQL > Enabled"
}

GCP > SQL > Instance > Backup Configuration

Configure whether Backup Configuration setting is enabled for a SQL instance.

URI
tmod:@turbot/gcp-sql#/policy/types/backupConfigurationEnabled
Category
Valid Value
[
"Skip",
"Check: Disabled",
"Check: Enabled",
"Enforce: Disabled",
"Enforce: Enabled"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Disabled",
"Check: Enabled",
"Enforce: Disabled",
"Enforce: Enabled"
],
"example": [
"Skip"
],
"default": "Skip"
}

GCP > SQL > Instance > Binary Log

Configure whether Binary Log setting is enabled for a SQL instance.

URI
tmod:@turbot/gcp-sql#/policy/types/binaryLogEnabled
Category
Valid Value
[
"Skip",
"Check: Disabled",
"Check: Enabled",
"Enforce: Disabled",
"Enforce: Enabled"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Disabled",
"Check: Enabled",
"Enforce: Disabled",
"Enforce: Enabled"
],
"example": [
"Skip"
],
"default": "Skip"
}

GCP > SQL > Instance > CMDB

Configure whether to record and synchronize details for the GCP SQL instance into the CMDB.

The CMDB control is responsible for populating and updating all the attributes for that resource type in the Guardrails CMDB.
All policies and controls in Guardrails are based around the resource, so usually the CMDB policy is set to "Enforce: Enabled".

If set to Skip then all changes to the CMDB are paused - no new resources will be discovered, no updates will be made and deleted resources will not be removed.

To cleanup resources and stop tracking changes, set this policy to "Enforce: Disabled".

CMDB controls also use the Regions policy associated with the resource. If region is not in GCP > SQL > Instance > Regions policy, the CMDB control will delete the resource from the CMDB.

(Note: Setting CMDB to "Skip" will also pause these changes.)

URI
tmod:@turbot/gcp-sql#/policy/types/instanceCmdb
Category
Valid Value
[
"Skip",
"Enforce: Enabled",
"Enforce: Enabled if SQL API is enabled",
"Enforce: Disabled"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Enforce: Enabled",
"Enforce: Enabled if SQL API is enabled",
"Enforce: Disabled"
],
"example": [
"Skip"
],
"default": "Enforce: Enabled if SQL API is enabled"
}

GCP > SQL > Instance > Data Protection

URI
tmod:@turbot/gcp-sql#/policy/types/instanceDataProtection

GCP > SQL > Instance > Data Protection > Managed Backups

Guardrails can automate taking SQL backups and manage the retention of these backups.

This policy enables / disables that feature, enforcing the schedule in the
Managed Backups > Schedule and Managed Backups > Minimum Schedule sub-policies.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceDataProtectionManagedBackups
Valid Value
[
"Skip",
"Enforce: Manage snapshots, per Managed Backups > Schedule and Managed Backups > Minimum Schedule"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Enforce: Manage snapshots, per Managed Backups > Schedule and Managed Backups > Minimum Schedule"
],
"default": "Skip"
}

GCP > SQL > Instance > Data Protection > Managed Backups > Minimum Schedule

A minimum level of backups to be taken and retained. Use this policy to set a
minimum level of data protection, while allowing application teams flexibility
to expand backups using Managed Backups > Schedule

URI
tmod:@turbot/gcp-sql#/policy/types/instanceDataProtectionMinimumSchedule
Valid Value
[
"Per GCP > Data Protection > Default Minimum Schedule",
"Skip",
"Enforce: None",
"Enforce: Daily for 3 days",
"Enforce: Daily for 7 days",
"Enforce: Daily for 14 days",
"Enforce: Daily for 30 days",
"Enforce: Daily for 90 days",
"Enforce: Daily with backoff to 3 months",
"Enforce: Daily with backoff to 1 year",
"Enforce: Daily with backoff",
"Enforce: Hourly with backoff to 7 days",
"Enforce: Hourly with backoff to 14 days",
"Enforce: Hourly with backoff to 1 month",
"Enforce: Hourly with backoff to 3 months",
"Enforce: Hourly with backoff to 1 year",
"Enforce: Hourly with backoff to 3 years",
"Enforce: Hourly with backoff"
]
Schema
{
"type": "string",
"enum": [
"Per GCP > Data Protection > Default Minimum Schedule",
"Skip",
"Enforce: None",
"Enforce: Daily for 3 days",
"Enforce: Daily for 7 days",
"Enforce: Daily for 14 days",
"Enforce: Daily for 30 days",
"Enforce: Daily for 90 days",
"Enforce: Daily with backoff to 3 months",
"Enforce: Daily with backoff to 1 year",
"Enforce: Daily with backoff",
"Enforce: Hourly with backoff to 7 days",
"Enforce: Hourly with backoff to 14 days",
"Enforce: Hourly with backoff to 1 month",
"Enforce: Hourly with backoff to 3 months",
"Enforce: Hourly with backoff to 1 year",
"Enforce: Hourly with backoff to 3 years",
"Enforce: Hourly with backoff"
],
"default": "Per GCP > Data Protection > Default Minimum Schedule"
}

GCP > SQL > Instance > Data Protection > Managed Backups > Schedule

Backups will be taken and retained according to this schedule. Note that
Managed Backups > Minimum Schedule can be used to set a minimum level of backup,
regardless of this policy setting..

URI
tmod:@turbot/gcp-sql#/policy/types/instanceDataProtectionSchedule
Valid Value
[
"Per GCP > Data Protection > Default Schedule",
"Skip",
"Enforce: None",
"Enforce: Daily for 3 days",
"Enforce: Daily for 7 days",
"Enforce: Daily for 14 days",
"Enforce: Daily for 30 days",
"Enforce: Daily for 90 days",
"Enforce: Daily with backoff to 3 months",
"Enforce: Daily with backoff to 1 year",
"Enforce: Daily with backoff",
"Enforce: Hourly with backoff to 7 days",
"Enforce: Hourly with backoff to 14 days",
"Enforce: Hourly with backoff to 1 month",
"Enforce: Hourly with backoff to 3 months",
"Enforce: Hourly with backoff to 1 year",
"Enforce: Hourly with backoff to 3 years",
"Enforce: Hourly with backoff"
]
Schema
{
"type": "string",
"enum": [
"Per GCP > Data Protection > Default Schedule",
"Skip",
"Enforce: None",
"Enforce: Daily for 3 days",
"Enforce: Daily for 7 days",
"Enforce: Daily for 14 days",
"Enforce: Daily for 30 days",
"Enforce: Daily for 90 days",
"Enforce: Daily with backoff to 3 months",
"Enforce: Daily with backoff to 1 year",
"Enforce: Daily with backoff",
"Enforce: Hourly with backoff to 7 days",
"Enforce: Hourly with backoff to 14 days",
"Enforce: Hourly with backoff to 1 month",
"Enforce: Hourly with backoff to 3 months",
"Enforce: Hourly with backoff to 1 year",
"Enforce: Hourly with backoff to 3 years",
"Enforce: Hourly with backoff"
],
"default": "Per GCP > Data Protection > Default Schedule"
}

GCP > SQL > Instance > Labels

Determine the action to take when an GCP SQL instance labels are not updated based on the GCP > SQL > Instance > Labels > * policies.

The control ensure GCP SQL instance labels include labels defined in GCP > SQL > Instance > Labels > Template.

Labels not defined in Instance Labels Template will not be modified or deleted. Setting a label value to undefined will result in the label being deleted.

See Labels for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceLabels
Valid Value
[
"Skip",
"Check: Labels are correct",
"Enforce: Set labels"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Labels are correct",
"Enforce: Set labels"
],
"example": [
"Check: Labels are correct"
],
"default": "Skip"
}

GCP > SQL > Instance > Labels > Template

The template is used to generate the keys and values for GCP SQL instance.

Labels not defined in Instance Labels Template will not be modified or deleted. Setting a label value to undefined will result in the label being deleted.

See Labels for more information.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceLabelsTemplate
Default Template Input
[
"{\n project {\n turbot {\n id\n }\n }\n}\n",
"{\n defaultLabels: policyValue(uri:\"tmod:@turbot/gcp-sql#/policy/types/sqlLabelsTemplate\" resourceId: \"{{ $.project.turbot.id }}\") {\n value\n }\n}\n"
]
Default Template
"{%- if $.defaultLabels.value | length == 0 %} [] {%- elif $.defaultLabels.value != undefined %}{{ $.defaultLabels.value | dump | safe }}{%- else %}{% for item in $.defaultLabels.value %}- {{ item }}{% endfor %}{% endif %}"

GCP > SQL > Instance > Regions

A list of GCP regions in which GCP SQL instances are supported for use.

Any instances in a region not listed here will not be recorded in CMDB.

The expected format is an array of regions names. You may use the '*' and
'?' wildcard characters.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceRegions
Default Template Input
"{\n regions: policyValue(uri:\"tmod:@turbot/gcp-sql#/policy/types/sqlRegionsDefault\") {\n value\n }\n}\n"
Default Template
"{% if $.regions.value | length == 0 %} [] {% endif %}{% for item in $.regions.value %}- &#39;{{ item }}&#39;&#92;n{% endfor %}"

GCP > SQL > Instance > Usage

Configure the number of GCP SQL instances that can be used for this project and the current consumption against the limit.

You can configure the behavior of the control with this GCP > SQL > Instance > Usage policy.

URI
tmod:@turbot/gcp-sql#/policy/types/instanceUsage
Valid Value
[
"Skip",
"Check: Usage <= 85% of Limit",
"Check: Usage <= 100% of Limit"
]
Schema
{
"type": "string",
"enum": [
"Skip",
"Check: Usage <= 85% of Limit",
"Check: Usage <= 100% of Limit"
],
"example": [
"Check: Usage <= 85% of Limit"
],
"default": "Skip"
}

GCP > SQL > Instance > Usage > Limit

Maximum number of items that can be created for this project

URI
tmod:@turbot/gcp-sql#/policy/types/instanceUsageLimit
Schema
{
"type": "integer",
"minimum": 0,
"default": 40
}

GCP > SQL > Labels Template [Default]

A template used to generate the keys and values for GCP SQL resources.

By default, all SQL resource Labels > Template policies will use this value.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlLabelsTemplate
Parent
Default Template Input
"{\n defaultLabels: policyValue(uri:\"tmod:@turbot/gcp#/policy/types/defaultLabelsTemplate\") {\n value\n }\n}\n"
Default Template
"{%- if $.defaultLabels.value | length == 0 %} [] {%- elif $.defaultLabels.value != undefined %}{{ $.defaultLabels.value | dump | safe }}{%- else %}{% for item in $.defaultLabels.value %}- {{ item }}{% endfor %}{% endif %}"

GCP > SQL > Permissions

Configure whether permissions policies are in effect for GCP SQL.
This setting does not affect Project level permissions (GCP/Admin, GCP/Owner, etc).

Note: The behavior of this policy depends on the value of GCP > Permissions.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlPermissions
Parent
Valid Value
[
"Enabled",
"Disabled",
"Enabled if GCP > SQL > Enabled"
]
Schema
{
"type": "string",
"enum": [
"Enabled",
"Disabled",
"Enabled if GCP > SQL > Enabled"
],
"example": [
"Enabled"
],
"default": "Enabled if GCP > SQL > Enabled"
}

GCP > SQL > Permissions > Levels

Define the permissions levels that can be used to grant access to SQL
an GCP project. Permissions levels defined will appear in the UI to assign access to Guardrails users.

Note: Some services do not use all permissions levels, and any permissions level that has
no permissions associated will not be created even if it is selected here.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlPermissionsLevels
Default Template Input
[
"{\n item: project {\n turbot{\n id\n }\n }\n}\n",
"{\n availableLevels: policyValues(filter:\"policyTypeLevel:self resourceId:{{ $.item.turbot.id }} policyTypeId:'tmod:@turbot/gcp-iam#/policy/types/permissionsLevelsDefault'\") {\n items {\n value\n }\n }\n}\n"
]
Default Template
"{% if $.availableLevels.items[0].value | length == 0 %} [] {% endif %}{% for item in $.availableLevels.items[0].value %}- {{ item }}&#92;n{% endfor %}"
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"Metadata",
"ReadOnly",
"Operator",
"Admin",
"Owner"
]
}
}

GCP > SQL > Permissions > Levels > Modifiers

A map of GCP API to Guardrails Permission Level used to customize Guardrails' standard permissions.
You can add, remove or redefine the mapping of GCP API operations to Guardrails permissions levels here.

Note: Modifiers are cumulative - if you add a permission to the metadata level, it is also added
to readOnly, operator and admin. Modifier policies set here will “roll up” to the GCP level too - if
you add a permission to Admin, it will be granted to GCP/Storage/Admin and also GCP/Admin

<br />example:<br /> - &quot;storage.bucket.create&quot;: admin<br /> - &quot;sql.database.create&quot;: metadata<br />

URI
tmod:@turbot/gcp-sql#/policy/types/sqlPermissionsLevelsModifiers

GCP > SQL > Regions

A list of GCP regions in which GCP SQL resources are supported for use.

The expected format is an array of regions names. You may use the '*' and
'?' wildcard characters.

This policy is the default value for all GCP SQL resources' Regions policies.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlRegionsDefault
Parent
Default Template Input
"{\n regions: policyValue(uri:\"tmod:@turbot/gcp#/policy/types/regionsDefault\") {\n value\n }\n}\n"
Default Template
"{% if $.regions.value | length == 0 %} [] {% endif %}{% for item in $.regions.value %}- &#39;{{ item }}&#39;&#92;n{% endfor %}"

GCP > Turbot > Event Handlers > Logging > Sink > Compiled Filter > @turbot/gcp-sql

GCP logs advanced filter
used to specify a subset of log entries that is forwarded to the Guardrails Event Handlers
by the logging sink on behalf of GCP SQL.

URI
tmod:@turbot/gcp-sql#/policy/types/sqlCustomEventPatterns
Schema
{
"type": "string",
"default": "(resource.type = cloudsql_database AND protoPayload.authorizationInfo.permission != cloudsql.instances.get AND protoPayload.authorizationInfo.permission != cloudsql.instances.list AND protoPayload.authorizationInfo.permission != cloudsql.instances.listServerCas AND protoPayload.authorizationInfo.permission != cloudsql.databases.get AND protoPayload.authorizationInfo.permission != cloudsql.databases.list AND protoPayload.authorizationInfo.permission != cloudsql.users.list AND severity>=INFO)"
}

GCP > Turbot > Permissions > Compiled > Levels > @turbot/gcp-sql

A calculated policy that Guardrails uses to create a compiled list of ALL permission
levels for GCP SQL that is used as input to
the stack that manages the Guardrails IAM permissions objects.

URI
tmod:@turbot/gcp-sql#/policy/types/gcpLevelsCompiled

GCP > Turbot > Permissions > Compiled > Service Permissions > @turbot/gcp-sql

A calculated policy that Guardrails uses to create a compiled list of ALL
permissions for GCP SQL that is used as
input to the control that manages the IAM stack.

URI
tmod:@turbot/gcp-sql#/policy/types/gcpCompiledServicePermissions