|
| 1 | +variable "project_id" { |
| 2 | + description = "The ID of the project in which the Fleet resource belongs. If it is not provided, the provider project is used." |
| 3 | + type = string |
| 4 | +} |
| 5 | + |
| 6 | +variable "display_name" { |
| 7 | + description = "A user-assigned display name of the Fleet." |
| 8 | + type = string |
| 9 | +} |
| 10 | + |
| 11 | +# variable "manage_default_cluster_config" { |
| 12 | +# description = "Set to true to manage default_cluster_config. If false, the entire default_cluster_config block will be omitted." |
| 13 | +# type = bool |
| 14 | +# default = true |
| 15 | +# } |
| 16 | + |
| 17 | +# Variables for default_cluster_config.binary_authorization_config |
| 18 | +variable "binary_authorization_evaluation_mode" { |
| 19 | + description = "Mode of operation for binauthz policy evaluation. Set to null to omit the attribute and use provider/API default if the block is rendered. Possible values: \"DISABLED\", \"PROJECT_SINGLETON_POLICY_ENFORCE\"." |
| 20 | + type = string |
| 21 | + default = "DISABLED" # Provider default |
| 22 | + validation { |
| 23 | + condition = var.binary_authorization_evaluation_mode == null || can(regex("^(DISABLED|PROJECT_SINGLETON_POLICY_ENFORCE)$", var.binary_authorization_evaluation_mode)) |
| 24 | + error_message = "Invalid binary_authorization_evaluation_mode. Must be one of: DISABLED, PROJECT_SINGLETON_POLICY_ENFORCE, or null." |
| 25 | + } |
| 26 | +} |
| 27 | + |
| 28 | +variable "binary_authorization_policy_bindings" { |
| 29 | + description = "A list of binauthz policy bindings. Each binding has a 'name' attribute." |
| 30 | + type = list(object({ |
| 31 | + name = string # Name is technically optional in API, but required for a useful binding here. |
| 32 | + })) |
| 33 | + default = [] # Default is no bindings |
| 34 | +} |
| 35 | + |
| 36 | +# Variables for default_cluster_config.security_posture_config |
| 37 | +variable "security_posture_mode" { |
| 38 | + description = "Sets the mode for Security Posture features on the cluster. Set to null to omit the attribute. Possible values: \"DISABLED\", \"BASIC\", \"ENTERPRISE\"." |
| 39 | + type = string |
| 40 | + default = "DISABLED" # Matches original and provider default |
| 41 | + validation { |
| 42 | + condition = var.security_posture_mode == null || can(regex("^(DISABLED|BASIC|ENTERPRISE)$", var.security_posture_mode)) |
| 43 | + error_message = "Invalid security_posture_mode. Must be one of: DISABLED, BASIC, ENTERPRISE, or null." |
| 44 | + } |
| 45 | +} |
| 46 | + |
| 47 | +variable "security_posture_vulnerability_mode" { |
| 48 | + description = "Sets the mode for Vulnerability Scanning. Set to null to omit the attribute. Possible values: \"VULNERABILITY_DISABLED\", \"VULNERABILITY_BASIC\", \"VULNERABILITY_ENTERPRISE\"." |
| 49 | + type = string |
| 50 | + default = "VULNERABILITY_DISABLED" # Matches original and provider default |
| 51 | + validation { |
| 52 | + condition = var.security_posture_vulnerability_mode == null || can(regex("^(VULNERABILITY_DISABLED|VULNERABILITY_BASIC|VULNERABILITY_ENTERPRISE)$", var.security_posture_vulnerability_mode)) |
| 53 | + error_message = "Invalid security_posture_vulnerability_mode. Must be one of: VULNERABILITY_DISABLED, VULNERABILITY_BASIC, VULNERABILITY_ENTERPRISE, or null." |
| 54 | + } |
| 55 | +} |
0 commit comments