11-18-2023
11-30-2022
09-11-2022
03-08-2022
Added Windows Support
IMPORTANT - There is currently a bug with Policy Buckets for UCS Domain Profiles. That is the only reason ucs_domain_profiles are not in the same folder as chassis and servers. When this is fixed the ucs_domain_profiles folder will be merged with the profiles folder. Because of this limitation at this time make sure to create a seperate policy for Domains of the following types:
Download Here: Visual Studio Code
Recommended Extensions:
Authorize Visual Studio Code to GitHub via the GitHub Extension
sudo apt update sudo apt install git
configure Git Credentials
git config --global user.name "<username>" git config --global user.email "<email>"
git clone https://github.com/scotttyso/intersight_iac
cd intersight_iac
$ pip install -r requirements.txt
The script utilizes features introduced in 1.3.0 of Terraform. So we need 1.3.0 or preferrably >1.3.0
This script will utilize the Intersight Terraform Provider and two modules built off of the Intersight Provider.
It is recommend to add the following secure variables to your environment before running the script
Linux
## Intersight Variables export TF_VAR_apikey="<your_intersight_api_key>" export TF_VAR_secretkey=`cat ~/Downloads/SecretKey.txt` # The above example is based on the key being in your Downloads folder. Correct for your environment. ## Terraform Cloud Variables export TF_VAR_terraform_cloud_token="<your_terraform_cloud_token>"
## Powershell Intersight Variables $env:TF_VAR_apikey="<your_intersight_api_key>" $env:TF_VAR_secretkey="$HOME\Downloads\SecretKey.txt" # The above example is based on the key being in your Downloads folder. Correct for your environment. ## Powershell Terraform Cloud Variables $env:TF_VAR_terraform_cloud_token="<your_terraform_cloud_token>"
./ezimm.py -j {json_file_name.json}
./ezimm.py
./ezimm.py -h Intersight Easy IMM Deployment Module optional arguments: -h, --help show this help message and exit -a API_KEY_ID, --api-key-id API_KEY_ID The Intersight API client key id for HTTP signature scheme -s API_KEY_FILE, --api-key-file API_KEY_FILE Name of file containing The Intersight secret key for the HTTP signature scheme --api-key-v3 Use New API client (v3) key -d DIR, --dir DIR The Directory to Publish the Terraform Files to. -i, --ignore-tls Ignore TLS server-side certificate verification -j JSON_FILE, --json_file JSON_FILE The IMM Transition Tool JSON Dump File to Convert to HCL. -u URL, --url URL The Intersight root URL for the API endpoint. The default is https://intersight.com
After the Script has generated the Repository and downloaded the resources from the Easy IMM Comprehensive Example, the data will need to be pushed to Intersight using Terraform Cloud.
This code is provided as is. No warranty, support, or guarantee is provided with this. But in typical github fashion there is the opportunity to collaborate and share Bug's/Feedback/PR Requests.
The purpose of this Python Tool is to deploy Policy/Profiles to Intersight using Infastructure as Code with Terraform. The Wizard is a step for users to create and better understand how to utilize Terraform for managing infrastrudture.
The goal of this module is to begin to familiarize you with Terraform through the following steps:
The wizard will show after each section what the YAML Data being generated will look like. In the Heading for each section it will point you to the directly and file where the code will be created. And lastly, publish the code to Terraform Cloud and when you are ready.
This set of modules support creating the following Pool Types:
This set of modules support creating the following Policy Types:
This set of modules support creating the following Profile Types:
To sum this up... the goal is to deploy the infrastructure using Terraform through an easy to consume wizard.
Owner
Contributors
Categories
Products
IntersightUCS ManagerProgramming Languages
PythonLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community