From b18945e2b704950fecb8d4a4a22434ca6c2ada52 Mon Sep 17 00:00:00 2001 From: scotttyso Date: Thu, 4 Nov 2021 23:22:13 -0400 Subject: [PATCH] adding server_assignment_mode attribute --- modules/ucs_server_profiles/main.tf | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/ucs_server_profiles/main.tf b/modules/ucs_server_profiles/main.tf index a3f64ee..e1c82aa 100644 --- a/modules/ucs_server_profiles/main.tf +++ b/modules/ucs_server_profiles/main.tf @@ -5,13 +5,20 @@ #____________________________________________________________ resource "intersight_server_profile" "server_profile" { - action = var.action - description = var.description - name = var.name + action = var.action + description = var.description + name = var.name + server_assignment_mode = length( + var.assigned_server + ) > 0 ? "Static" : length( + var.associated_server_pool + ) > 0 ? "Pool" : "None" static_uuid_address = var.static_uuid_address target_platform = var.target_platform type = var.type - uuid_address_type = length(var.uuid_pool) > 0 ? "POOL" : var.static_uuid_address != "" ? "STATIC" : "NONE" + uuid_address_type = length( + var.uuid_pool + ) > 0 ? "POOL" : var.static_uuid_address != "" ? "STATIC" : "NONE" wait_for_completion = var.wait_for_completion organization { object_type = "organization.Organization"