-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscrub.tf
22 lines (22 loc) · 842 Bytes
/
scrub.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#__________________________________________________________________
#
# Intersight Scrub Policy
# GUI Location: Policies > Create Policy > Scrub
#__________________________________________________________________
resource "intersight_compute_scrub_policy" "map" {
for_each = local.scrub
description = coalesce(each.value.description, "${each.value.name} Scrub Policy.")
name = each.value.name
scrub_targets = anytrue([each.value.bios, each.value.disk]) ? compact(concat([
length(regexall(true, each.value.bios)) > 0 ? "BIOS" : ""], [
length(regexall(true, each.value.disk)) > 0 ? "Disk" : ""]
)) : []
organization { moid = var.orgs[each.value.org] }
dynamic "tags" {
for_each = { for v in each.value.tags : v.key => v }
content {
key = tags.value.key
value = tags.value.value
}
}
}