Skip to content

Commit

Permalink
updating modules to 18371
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttyso committed Sep 13, 2024
1 parent 7d705dd commit 934fcbc
Show file tree
Hide file tree
Showing 18 changed files with 1,097 additions and 29 deletions.
11 changes: 6 additions & 5 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ content: |-
## Recommended Module Versions
## Module(s) Release 4.2.11-17769 Compatibility
## Module(s) Release 4.2.11-18370 Compatibility
| **Module** | **API Version** | **Provider Version** | **Appliance Version** | **Module Notes**
| :-----------: | :-------------: | :------------------: | :-------------------: | :--------------------------: |
| organizations | >=1.0.11-17769 | 1.0.51 | Not Supported | New Module to Manage Organizations/Resource Groups. |
| pools | >=1.0.11-17769 | 1.0.51 | Not Supported | Adds IP Pool Block Level IP Configuration. |
| policies | >=1.0.11-17769 | 1.0.51 | Not Supported | adapter_config - Add physical_nic_mode_settings; bios - M8 AMD BIOS attributes; ethernet_network - QnQ capabilities; vnics - sriov; vnic/vhba templates |
| profiles | >=1.0.11-17769 | 1.0.51 | Not Supported | Adds Chassis/Domain Templates. |
| organizations | >=1.0.11-18371 | >=1.0.47 | Not Supported | New Module to Manage Organizations/Resource Groups. |
| pools | >=1.0.11-18371 | 1.0.54 | Not Supported | Adds IP Pool Block Level IP Configuration. |
| policies | >=1.0.11-18371 | 1.0.54 | Not Supported | adapter_config - Add physical_nic_mode_settings; bios - M8 AMD BIOS attributes; ethernet_network - QnQ capabilities; vnics - sriov; vnic/vhba templates |
| profiles | >=1.0.11-18371 | 1.0.54 | Not Supported | Adds Chassis/Domain Templates. |
## Module(s) Release 4.2.11-16711 Compatibility
Expand All @@ -50,6 +50,7 @@ content: |-
## Updates
* 2024-09-13: Recommended releases are 4.2.11-18371 or 4.2.11-16711. ISSUE 287 resolved
* 2024-09-08: Rolling back SaaS recommendation to 4.2.11-17769 since provider v1.0.54 is broken again for server templates [ISSUE 287](https://github.com/CiscoDevNet/terraform-provider-intersight/issues/287) . Version v4.2.11-18369 and v4.2.11-18370 is on hold for now until provider fixed.
* 2024-09-07: Recommended releases are 4.2.11-18369 or 4.2.11-16711. This update changes the drive security policy to match the updated API of 1.0.11-18369. Make sure to update your variables.tf, locals.tf from the eas-imm repository to get the updated sensitive variables for drive_security. The variables have also been updated to do validation using the regular expression patterns from the API.
* 2024-07-23: Recommended releases are 4.2.11-17769 or 4.2.11-16711. See Notes for modules above.
Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@

## Recommended Module Versions

## Module(s) Release 4.2.11-17769 Compatibility
## Module(s) Release 4.2.11-18370 Compatibility

| **Module** | **API Version** | **Provider Version** | **Appliance Version** | **Module Notes**
| :-----------: | :-------------: | :------------------: | :-------------------: | :--------------------------: |
| organizations | >=1.0.11-17769 | 1.0.51 | Not Supported | New Module to Manage Organizations/Resource Groups. |
| pools | >=1.0.11-17769 | 1.0.51 | Not Supported | Adds IP Pool Block Level IP Configuration. |
| policies | >=1.0.11-17769 | 1.0.51 | Not Supported | adapter_config - Add physical_nic_mode_settings; bios - M8 AMD BIOS attributes; ethernet_network - QnQ capabilities; vnics - sriov; vnic/vhba templates |
| profiles | >=1.0.11-17769 | 1.0.51 | Not Supported | Adds Chassis/Domain Templates. |
| organizations | >=1.0.11-18371 | >=1.0.47 | Not Supported | New Module to Manage Organizations/Resource Groups. |
| pools | >=1.0.11-18371 | 1.0.54 | Not Supported | Adds IP Pool Block Level IP Configuration. |
| policies | >=1.0.11-18371 | 1.0.54 | Not Supported | adapter_config - Add physical_nic_mode_settings; bios - M8 AMD BIOS attributes; ethernet_network - QnQ capabilities; vnics - sriov; vnic/vhba templates |
| profiles | >=1.0.11-18371 | 1.0.54 | Not Supported | Adds Chassis/Domain Templates. |

## Module(s) Release 4.2.11-16711 Compatibility

Expand All @@ -46,6 +46,7 @@

## Updates

* 2024-09-13: Recommended releases are 4.2.11-18371 or 4.2.11-16711. ISSUE 287 resolved
* 2024-09-08: Rolling back SaaS recommendation to 4.2.11-17769 since provider v1.0.54 is broken again for server templates [ISSUE 287](https://github.com/CiscoDevNet/terraform-provider-intersight/issues/287) . Version v4.2.11-18369 and v4.2.11-18370 is on hold for now until provider fixed.
* 2024-09-07: Recommended releases are 4.2.11-18369 or 4.2.11-16711. This update changes the drive security policy to match the updated API of 1.0.11-18369. Make sure to update your variables.tf, locals.tf from the eas-imm repository to get the updated sensitive variables for drive_security. The variables have also been updated to do validation using the regular expression patterns from the API.
* 2024-07-23: Recommended releases are 4.2.11-17769 or 4.2.11-16711. See Notes for modules above.
Expand Down Expand Up @@ -316,7 +317,7 @@ terraform.exe apply "main.plan"
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >=1.3.0 |
| <a name="requirement_intersight"></a> [intersight](#requirement\_intersight) | 1.0.54 |
| <a name="requirement_intersight"></a> [intersight](#requirement\_intersight) | 1.0.55 |
| <a name="requirement_time"></a> [time](#requirement\_time) | 0.9.1 |
| <a name="requirement_utils"></a> [utils](#requirement\_utils) | >= 0.1.3 |

Expand All @@ -334,10 +335,10 @@ terraform.exe apply "main.plan"

| Name | Source | Version |
|------|--------|---------|
| <a name="module_organizations"></a> [organizations](#module\_organizations) | terraform-cisco-modules/organizations/intersight | 4.2.11-18370 |
| <a name="module_pools"></a> [pools](#module\_pools) | terraform-cisco-modules/pools/intersight | 4.2.11-18370 |
| <a name="module_policies"></a> [policies](#module\_policies) | terraform-cisco-modules/policies/intersight | 4.2.11-18370 |
| <a name="module_profiles"></a> [profiles](#module\_profiles) | terraform-cisco-modules/profiles/intersight | 4.2.11-18370 |
| <a name="module_organizations"></a> [organizations](#module\_organizations) | terraform-cisco-modules/organizations/intersight | 4.2.11-18371 |
| <a name="module_pools"></a> [pools](#module\_pools) | terraform-cisco-modules/pools/intersight | 4.2.11-18371 |
| <a name="module_policies"></a> [policies](#module\_policies) | terraform-cisco-modules/policies/intersight | 4.2.11-18371 |
| <a name="module_profiles"></a> [profiles](#module\_profiles) | terraform-cisco-modules/profiles/intersight | 4.2.11-18371 |

**NOTE: When the Data is merged from the YAML files, it will run through the modules using for_each loop(s). Sensitive Variables cannot be added to a for_each loop, instead use the variables below to add sensitive values for policies.**

Expand All @@ -363,7 +364,7 @@ terraform.exe apply "main.plan"
| <a name="input_drive_security_new_security_key_passphrase"></a> [drive\_security\_new\_security\_key\_passphrase](#input\_drive\_security\_new\_security\_key\_passphrase) | Drive Security New Security Key Passphrase for Manual Key Management. It must meet the following criteria:<br> - One Uppercase Letter<br> - One LowerCase Letter<br> - One Number<br> - One Special Character: `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `+`, `_`, `=`, `-`<br> - Be between 8 and 32 Characters in Length. | `string` | `""` | no |
| <a name="input_drive_security_authentication_password"></a> [drive\_security\_authentication\_password](#input\_drive\_security\_authentication\_password) | Drive Security User Password. | `string` | `""` | no |
| <a name="input_drive_security_server_ca_certificate"></a> [drive\_security\_server\_ca\_certificate](#input\_drive\_security\_server\_ca\_certificate) | Drive Security Server CA Certificate, in PEM Format, File Location. | `string` | `"blah.txt"` | no |
| <a name="input_cco_password"></a> [cco\_password](#input\_cco\_password) | CCO User Account Password. It must meet the following criteria:<br> - One Uppercase Letter<br> - One Lowercase Letter<br> - One Number<br> - One Special Character: `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `+`, `_`, `=`, `-`<br> - Be between 12 and 60 Characters in Length. | `string` | `""` | no |
| <a name="input_cco_password"></a> [cco\_password](#input\_cco\_password) | Cisco.com Authentication Password. It must meet the following criteria:<br> - One Uppercase Letter<br> - One Lowercase Letter<br> - One Number<br> - One Special Character: `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `+`, `_`, `=`, `-`<br> - Be between 12 and 60 Characters in Length. | `string` | `""` | no |
| <a name="input_cco_user"></a> [cco\_user](#input\_cco\_user) | CCO User Account Email for Firmware Policies. | `string` | `"cco_user"` | no |
| <a name="input_ipmi_encryption_key"></a> [ipmi\_encryption\_key](#input\_ipmi\_encryption\_key) | Encryption key to use for IPMI communication. It should have an even number of hexadecimal characters and not exceed 40 characters. | `string` | `""` | no |
| <a name="input_iscsi_boot_password"></a> [iscsi\_boot\_password](#input\_iscsi\_boot\_password) | Password to Assign to the iSCSI Boot Policy if doing Authentication. It can be any string that adheres to the following constraints.<br> - Any non-white space character<br> - Be between 12 and 16 Characters in Length. | `string` | `""` | no |
Expand Down
2 changes: 1 addition & 1 deletion Wakanda/global_settings.ezi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ global_settings:
- key: "Module"
value: "easy-imm"
- key: "Version"
value: "4.2.11-18370"
value: "4.2.11-18371"
6 changes: 3 additions & 3 deletions Wakanda/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ data "utils_yaml_merge" "model" {
module "pools" {
# source = "/home/tyscott/terraform-cisco-modules/terraform-intersight-pools"
source = "terraform-cisco-modules/pools/intersight"
version = "4.2.11-18370"
version = "4.2.11-18371"
for_each = {
for i in ["map"] : i => i if length(flatten([for org in setsubtract(keys(local.model), local.non_orgs) : [
for e in keys(lookup(local.model[org], "pools", {})) : e]])) > 0 || length(
Expand All @@ -42,7 +42,7 @@ module "pools" {
module "policies" {
# source = "/home/tyscott/terraform-cisco-modules/terraform-intersight-policies"
source = "terraform-cisco-modules/policies/intersight"
version = "4.2.11-18370"
version = "4.2.11-18371"
for_each = {
for i in ["map"] : i => i if length(flatten([for org in keys(local.model) : [
for e in keys(lookup(local.model[org], "policies", {})) : local.model[org].policies[e] if length(lookup(lookup(
Expand All @@ -64,7 +64,7 @@ module "policies" {
module "profiles" {
# source = "/home/tyscott/terraform-cisco-modules/terraform-intersight-profiles"
source = "terraform-cisco-modules/profiles/intersight"
version = "4.2.11-18370"
version = "4.2.11-18371"
for_each = {
for i in ["map"] : i => i if length(flatten([for org in keys(local.model) : [for e in ["profiles", "templates"] : [
for d in ["chassis", "domain", "server"] : lookup(lookup(local.model[org], e, {}), d, [])]]]
Expand Down
2 changes: 1 addition & 1 deletion Wakanda/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ terraform {
required_providers {
intersight = {
source = "CiscoDevNet/intersight"
version = "1.0.54"
version = "1.0.55"
}
time = {
source = "time"
Expand Down
11 changes: 11 additions & 0 deletions bulk_issue/global_settings.ezi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
#========================================
# Global Settings
#========================================
global_settings:
intersight_fqdn: intersight.com
tags:
- key: "Module"
value: "easy-imm"
- key: "Version"
value: "4.2.11-18370"
112 changes: 112 additions & 0 deletions bulk_issue/locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
locals {
global_settings = {
tags = lookup(local.model.global_settings, "tags", [
{
key = "Module"
value = "terraform-intersight-easy-imm"
},
{
key = "Version"
value = "4.2.11-18370"
}
])
}
intersight_fqdn = lookup(local.model.global_settings, "intersight_fqdn", "intersight.com")
non_orgs = ["global_settings", "intersight"]
model = yamldecode(data.utils_yaml_merge.model.output)
orgs = { for k, v in data.intersight_organization_organization.orgs.results : v.name => v.moid }

#__________________________________________________________________
#
# Sensitive Variables
#__________________________________________________________________
policies_sensitive = {
certificate_management = {
certificate = {
1 = fileexists(var.cert_mgmt_certificate_1) ? file(var.cert_mgmt_certificate_1) : var.cert_mgmt_certificate_1
2 = fileexists(var.cert_mgmt_certificate_2) ? file(var.cert_mgmt_certificate_2) : var.cert_mgmt_certificate_2
3 = fileexists(var.cert_mgmt_certificate_3) ? file(var.cert_mgmt_certificate_3) : var.cert_mgmt_certificate_3
4 = fileexists(var.cert_mgmt_certificate_4) ? file(var.cert_mgmt_certificate_4) : var.cert_mgmt_certificate_4
5 = fileexists(var.cert_mgmt_certificate_5) ? file(var.cert_mgmt_certificate_5) : var.cert_mgmt_certificate_5
}
private_key = {
1 = fileexists(var.cert_mgmt_private_key_1) ? file(var.cert_mgmt_private_key_1) : var.cert_mgmt_private_key_1
2 = fileexists(var.cert_mgmt_private_key_2) ? file(var.cert_mgmt_private_key_2) : var.cert_mgmt_private_key_2
3 = fileexists(var.cert_mgmt_private_key_3) ? file(var.cert_mgmt_private_key_3) : var.cert_mgmt_private_key_3
4 = fileexists(var.cert_mgmt_private_key_4) ? file(var.cert_mgmt_private_key_4) : var.cert_mgmt_private_key_4
5 = fileexists(var.cert_mgmt_private_key_5) ? file(var.cert_mgmt_private_key_5) : var.cert_mgmt_private_key_5
}
}
drive_security = {
current_security_key_passphrase = {
1 = var.drive_security_current_security_key_passphrase
}
new_security_key_passphrase = {
1 = var.drive_security_new_security_key_passphrase
}
password = {
1 = var.drive_security_authentication_password
}
server_public_root_ca_certificate = {
1 = fileexists(var.drive_security_server_ca_certificate
) ? file(var.drive_security_server_ca_certificate) : var.drive_security_server_ca_certificate
}
}
firmware = {
cco_password = { 1 = var.cco_password }
cco_user = { 1 = var.cco_user }
}
ipmi_over_lan = { encryption_key = { 1 = var.ipmi_encryption_key } }
iscsi_boot = { password = { 1 = var.iscsi_boot_password } }
ldap = { password = { 1 = var.binding_parameters_password } }
local_user = {
password = {
1 = var.local_user_password_1
2 = var.local_user_password_2
3 = var.local_user_password_3
4 = var.local_user_password_4
5 = var.local_user_password_5
}
}
persistent_memory = { passphrase = { 1 = var.persistent_passphrase } }
snmp = {
access_community_string = {
1 = var.access_community_string_1
2 = var.access_community_string_2
3 = var.access_community_string_3
4 = var.access_community_string_4
5 = var.access_community_string_5
}
auth_password = {
1 = var.snmp_auth_password_1
2 = var.snmp_auth_password_2
3 = var.snmp_auth_password_3
4 = var.snmp_auth_password_4
5 = var.snmp_auth_password_5
}
privacy_password = {
1 = var.snmp_privacy_password_1
2 = var.snmp_privacy_password_2
3 = var.snmp_privacy_password_3
4 = var.snmp_privacy_password_4
5 = var.snmp_privacy_password_5
}
trap_community_string = {
1 = var.snmp_trap_community_1
2 = var.snmp_trap_community_2
3 = var.snmp_trap_community_3
4 = var.snmp_trap_community_4
5 = var.snmp_trap_community_5
}
}
virtual_media = {
password = {
1 = var.vmedia_password_1
2 = var.vmedia_password_2
3 = var.vmedia_password_3
4 = var.vmedia_password_4
5 = var.vmedia_password_5
}
}
}
}
78 changes: 78 additions & 0 deletions bulk_issue/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#_________________________________________________________________________________________
#
# Data Model Merge Process - Merge YAML Files into HCL Format
#_________________________________________________________________________________________
data "intersight_organization_organization" "orgs" {}
data "utils_yaml_merge" "model" {
input = concat([
for file in fileset(path.module, "*.ezi.yaml") : file(file)], [
for file in fileset(path.module, "p*/*.ezi.yaml") : file(file)], [
for file in fileset(path.module, "t*/*.ezi.yaml") : file(file)]
)
merge_list_items = false
}

#_________________________________________________________________________________________
#
# Intersight:Pools
# GUI Location: Infrastructure Service > Configure > Pools
#_________________________________________________________________________________________
module "pools" {
# source = "/home/tyscott/terraform-cisco-modules/terraform-intersight-pools"
source = "terraform-cisco-modules/pools/intersight"
version = "4.2.11-16711"
for_each = {
for i in ["map"] : i => i if length(flatten([for org in setsubtract(keys(local.model), local.non_orgs) : [
for e in keys(lookup(local.model[org], "pools", {})) : e]])) > 0 || length(
flatten([for org in setsubtract(keys(local.model), local.non_orgs) : [for e in lookup(lookup(local.model[org], "profiles", {}), "server", []) : [
for d in e["targets"] : lookup(d, "reservations", [])
]]])
) > 0
}
global_settings = local.global_settings
model = { for k, v in local.model : k => v if length(regexall("^global_settings|intersight$", k)) == 0 }
orgs = local.orgs
}

#_________________________________________________________________________________________
#
# Intersight:Policies
# GUI Location: Infrastructure Service > Configure > Policies
#_________________________________________________________________________________________
module "policies" {
# source = "/home/tyscott/terraform-cisco-modules/terraform-intersight-policies"
source = "terraform-cisco-modules/policies/intersight"
version = "4.2.11-16711"
for_each = {
for i in ["map"] : i => i if length(flatten([for org in keys(local.model) : [
for e in keys(lookup(local.model[org], "policies", {})) : local.model[org].policies[e] if length(lookup(lookup(
local.model[org], "policies", {}), e, [])) > 0]])
) > 0
}
global_settings = local.global_settings
model = { for k, v in local.model : k => v if length(regexall("^global_settings|intersight$", k)) == 0 }
orgs = local.orgs
policies_sensitive = local.policies_sensitive
pools = module.pools
}

#_________________________________________________________________________________________
#
# Intersight:UCS Chassis and Server Profiles
# GUI Location: Infrastructure Service > Configure > Profiles
#_________________________________________________________________________________________
module "profiles" {
# source = "/home/tyscott/terraform-cisco-modules/terraform-intersight-profiles"
source = "terraform-cisco-modules/profiles/intersight"
version = "4.2.11-16711"
for_each = {
for i in ["map"] : i => i if length(flatten([for org in keys(local.model) : [for e in ["profiles", "templates"] : [
for d in ["chassis", "domain", "server"] : lookup(lookup(local.model[org], e, {}), d, [])]]]
)) > 0
}
global_settings = local.global_settings
model = { for k, v in local.model : k => v if length(regexall("^global_settings|intersight$", k)) == 0 }
orgs = local.orgs
policies = module.policies
pools = module.pools
}
Loading

0 comments on commit 934fcbc

Please sign in to comment.