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.1.0.tar.gz
.
File metadata
- Download URL: idem-codegen-3.1.0.tar.gz
- Upload date:
- Size: 48.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.2 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.3 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ee0f6774421db94fd0353b13e4aad9d5e48f58d44f158b8332ac11108915c7b |
|
MD5 | e4f39f741a83924a6915400091925148 |
|
BLAKE2b-256 | fecf72a1201088fc5b8d63a83e60a113c4292f79b7eba1d3b110abff8ffccb83 |
File details
Details for the file idem_codegen-3.1.0-py3-none-any.whl
.
File metadata
- Download URL: idem_codegen-3.1.0-py3-none-any.whl
- Upload date:
- Size: 71.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/37.2 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.12.0 keyring/23.9.3 rfc3986/2.0.0 colorama/0.4.5 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0476038e3d1c5cce4b907f5a2da393657d7eb1f462851dae1d3d552c1bdba05b |
|
MD5 | f77f292fea11e1d3bb8c84412cfb345a |
|
BLAKE2b-256 | 63898a50a9f95cc20bd00f087d1ca6838df08c413b8824cc57599c5e90fce90a |