Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/agent-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Functional examples are included in the [examples](./../../examples) directory.
| description | The description of the policy. | `string` | `null` | no |
| group\_labels | A list of label maps to filter instances to apply policies on. | `list(map(string))` | `null` | no |
| instances | A list of instances to filter instances to apply the policy. | `list(string)` | `null` | no |
| os\_types | A list of OS types to filter instances to apply the policy. | `list(any)` | n/a | yes |
| os\_types | A list of OS types to filter instances to apply the policy. | <pre>list(object({<br> short_name = string<br> version = string<br> }))</pre> | n/a | yes |
| policy\_id | The ID of the policy. | `string` | n/a | yes |
| project\_id | The ID of the project in which to provision resources. | `string` | n/a | yes |
| zones | A list of zones to filter instances to apply the policy. | `list(string)` | `null` | no |
Expand Down
10 changes: 4 additions & 6 deletions modules/agent-policy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ variable "group_labels" {

variable "os_types" {
description = "A list of OS types to filter instances to apply the policy."
type = list(any)

validation {
condition = can([for os_type in var.os_types : os_type["short_name"]])
error_message = "Each os type must have a short_name."
}
type = list(object({
short_name = string
version = string
}))
}

variable "zones" {
Expand Down