Skip to content

Commit

Permalink
updating uuid_pool to be list of object
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttyso committed Nov 5, 2021
1 parent cf6cb0f commit ae213d2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
25 changes: 14 additions & 11 deletions modules/ucs_server_profiles/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ resource "intersight_server_profile" "server_profile" {
target_platform = var.target_platform
type = var.type
uuid_address_type = var.uuid_pool != "" ? "POOL" : var.static_uuid_address != "" ? "STATIC" : "NONE"
uuid_pool = {
moid = var.uuid_pool
object_type = "uuidpool.Pool"
}
wait_for_completion = var.wait_for_completion
organization {
object_type = "organization.Organization"
Expand All @@ -28,20 +24,20 @@ resource "intersight_server_profile" "server_profile" {
object_type = assigned_server.value.object_type
}
}
dynamic "policy_bucket" {
for_each = var.policy_bucket
content {
moid = policy_bucket.value.moid
object_type = policy_bucket.value.object_type
}
}
dynamic "associated_server_pool" {
for_each = var.associated_server_pool
content {
moid = assigned_server.value.moid
object_type = "resourcepool.Pool"
}
}
dynamic "policy_bucket" {
for_each = var.policy_bucket
content {
moid = policy_bucket.value.moid
object_type = policy_bucket.value.object_type
}
}
dynamic "src_template" {
for_each = var.src_template
content {
Expand All @@ -54,5 +50,12 @@ resource "intersight_server_profile" "server_profile" {
key = tags.value.key
value = tags.value.value
}
dynamic "uuid_pool" {
for_each = var.uuid_pool
content {
moid = uuid_pool.value.moid
object_type = "uuidpool.Pool"
}
}
}
}
4 changes: 2 additions & 2 deletions modules/ucs_server_profiles/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ variable "type" {
}

variable "uuid_pool" {
default = ""
default = []
description = "A reference to a uuidpoolPool resource."
type = string
type = list(map(string))
}
variable "wait_for_completion" {
default = false
Expand Down

0 comments on commit ae213d2

Please sign in to comment.