No project description provided
Project description
Description
The existing cloud infrastructure gets managed either directly via cloud provider console or via software tools like Terraform. The goal of project ‘Idem CodeGen’ is to onboard customers to use Idem for Infrastructure as Code (IaC) management solution by discovering their existing infrastructure and to facilitate the process of migration for customers who currently use Terraform for IaC management by converting terraform files into SLS files. Manually converting each Terraform file into SLS file is not a feasible option for any Terraform customer as all files collectively may comprise of 1000+ resource objects distributed across 100+ files. Also, for customers those use web console directly to manage the infrastructure, Idem can discover existing cloud infrastructure and automatically generates SLS code for all discovered resources. ‘Idem CodeGen’ leverages this capability to organise the SLS code by automatically generating hierarchical, maintainable and reusable SLS files.
Steps to run idem-codegen for terraform to idem IaC transformation
Run following commands:
pip install -e . idem_codegen tf_idem -c [path_to_config_file]
Sample config file:
{ "idem_codegen": { "tf_state_bucket_name": "", "tf_state_key": "", "idem_describe": False, "get_tf_state_from_s3": False, "output_directory_path": "[path_to_output_directory]", "idem_describe_path": "[path_to_idem_describe_response_file]", "tf_state_file_path": "[path_to_tfstate_json_file]", "terraform_directory_path": "[path_to_terraform_directory]", "group_style": "default" } }
Steps to run idem-codegen for infrastructure discovery and IaC generation
Run following commands:
pip install -e . idem_codegen discovery -c [path_to_config_file]
Sample config file:
{ "idem_codegen": { "idem_describe": False, "output_directory_path": "[path_to_output_directory]", "idem_describe_path": "[path_to_idem_describe_response_file]", "group_style": "default" } }
Steps to generate resource_ids from terraform state file
Run the following command:
idem_codegen generate --type=resource_ids -c [path_to_config_file]
Note-: ‘–type’ parameter is only required with ‘generate’ subcommand.
Sample config file:
{ "idem_codegen": { "output_directory_path": "[path_to_output_directory]", "tf_state_file_path": "[path_to_tfstate_json_file]", } }
Note-: Resource ids of security group rule have to be changed manually.
Run help command to understand more about configuration parameters:
idem_codegen --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file idem-codegen-3.0.0.tar.gz
.
File metadata
- Download URL: idem-codegen-3.0.0.tar.gz
- Upload date:
- Size: 45.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88e747c4317855bfd96978fbcc0b0e6d58d00764d565de4b8d9029cad6f35d6a |
|
MD5 | fe95d1db1b950e07d3ecef8ebe01fe12 |
|
BLAKE2b-256 | 63d2ec3c11046382822e4a4c5007dddc0edd319163f41efb1fc239d9980ae9cc |
File details
Details for the file idem_codegen-3.0.0-py3-none-any.whl
.
File metadata
- Download URL: idem_codegen-3.0.0-py3-none-any.whl
- Upload date:
- Size: 65.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.8.2 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d3a4ab2f6c627d05ba5e71180c90a9cbb91a09398cf006bcf7d2f1b1333ecf2 |
|
MD5 | d0db4ea18ae2d5a521ad36216e19c757 |
|
BLAKE2b-256 | 200917e7b24c9bf593c8f7eb9122cec8dab86dd9efbc4404b749b42b910a444e |