|
81 | 81 | "settings.0.insights_config.0.query_string_length",
|
82 | 82 | "settings.0.insights_config.0.record_application_tags",
|
83 | 83 | "settings.0.insights_config.0.record_client_address",
|
| 84 | + "settings.0.insights_config.0.query_plans_per_minute", |
84 | 85 | }
|
85 | 86 | )
|
86 | 87 |
|
@@ -466,6 +467,14 @@ is set to true. Defaults to ZONAL.`,
|
466 | 467 | AtLeastOneOf: insightsConfigKeys,
|
467 | 468 | Description: `True if Query Insights will record client address when enabled.`,
|
468 | 469 | },
|
| 470 | + "query_plans_per_minute": { |
| 471 | + Type: schema.TypeInt, |
| 472 | + Optional: true, |
| 473 | + Computed: true, |
| 474 | + ValidateFunc: validation.IntBetween(0, 20), |
| 475 | + AtLeastOneOf: insightsConfigKeys, |
| 476 | + Description: `Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5.`, |
| 477 | + }, |
469 | 478 | },
|
470 | 479 | },
|
471 | 480 | Description: `Configuration of Query Insights.`,
|
@@ -1253,6 +1262,7 @@ func expandInsightsConfig(configured []interface{}) *sqladmin.InsightsConfig {
|
1253 | 1262 | QueryStringLength: int64(_insightsConfig["query_string_length"].(int)),
|
1254 | 1263 | RecordApplicationTags: _insightsConfig["record_application_tags"].(bool),
|
1255 | 1264 | RecordClientAddress: _insightsConfig["record_client_address"].(bool),
|
| 1265 | + QueryPlansPerMinute: int64(_insightsConfig["query_plans_per_minute"].(int)), |
1256 | 1266 | }
|
1257 | 1267 | }
|
1258 | 1268 |
|
@@ -1806,6 +1816,7 @@ func flattenInsightsConfig(insightsConfig *sqladmin.InsightsConfig) interface{}
|
1806 | 1816 | "query_string_length": insightsConfig.QueryStringLength,
|
1807 | 1817 | "record_application_tags": insightsConfig.RecordApplicationTags,
|
1808 | 1818 | "record_client_address": insightsConfig.RecordClientAddress,
|
| 1819 | + "query_plans_per_minute": insightsConfig.QueryPlansPerMinute, |
1809 | 1820 | }
|
1810 | 1821 |
|
1811 | 1822 | return []map[string]interface{}{data}
|
|
0 commit comments