Name | terragraph JSON |
Version |
0.4.0
JSON |
| download |
home_page | |
Summary | A package to help vizualise output from terraform graph as an svg file |
upload_time | 2024-01-27 15:57:01 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | MIT license |
keywords |
terragraph
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
|
coveralls test coverage |
No coveralls.
|
==========
terragraph
==========
.. image:: https://img.shields.io/pypi/v/terragraph.svg
:target: https://pypi.python.org/pypi/terragraph
.. image:: https://img.shields.io/travis/cdsre/terragraph.svg
:target: https://travis-ci.com/cdsre/terragraph
.. image:: https://readthedocs.org/projects/terragraph/badge/?version=latest
:target: https://terragraph.readthedocs.io/en/latest/?version=latest
:alt: Documentation Status
A package to help vizualise output from terraform graph as an svg file
* Free software: MIT license
* Documentation: https://terragraph.readthedocs.io.
Overview
--------
The idea behind this is to choose a node on a terraform dependency graph and be able to highlight all the preceding or
successor edges or both, recursively.
Terraform is pretty good at calculating dependencies however sometimes there are casues where terraform cannot know. or
where users don't realise how terraform generates dependencies. This can lead to race conditions where running the first
time fails but running the second time works. A prime example of this is when we pass an output of module A as an input
of module B. In most cases users assume that outputs of module A will not be available until all resources in the module
have finished. However, this is not the case. Terraform will start running module B as soon as the output in module A is
available even when other resources in module A are not finished but module B expects them to be.
Generating a terraform graph is easy. However, these graphs can get very large very quickly. So trying to follow and
understand the dependencies of one resource in relation to other resources can get complicated. This project attempts to
solve that by taking the output from a `terraform graph` command and selecting a specific node to highlight dependenices.
it provides a HighlightingMode to allow the user to decide if they want to see all the resources the node depends on, all
the resources that depend on this node, or both.
Usage
-----
Currently, this is pretty raw, it just runs at the command line taking the DOT format file and the node name to highlight.
By default it will highlight all **PRECEDING** edges. These are the things that must be completed before this node can
start. It also supports passing the mode as a flag. The modes are
.. table:: mode flags
========= ===========
Value Description
========= ===========
PRECEDING Highlights all preceding edges to this node. This is all things that needs to complete before this node start
SUCCESSOR Highlights all successor edges from this node. This is all things that cannot start until this node is completed
ALL This applies both PRECEDING and SUCCESSOR modes to highlight the full up and down dependency tree for the node
========= ===========
.. code-block:: sh
terragraph --file-name docs/assets/graph.dot --node-name '"[root] module.mod2.random_pet.this (expand)"'
Colored node SVG file generated: docs/assets/graph.dot.svg
The above will create an SVG file with the preceding edges highlighted.
.. image:: docs/assets/graph.dot.svg
:alt: graph_output
Raw data
{
"_id": null,
"home_page": "",
"name": "terragraph",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "terragraph",
"author": "",
"author_email": "Chris Doyle <uk.chris.doyle+cdsre@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/00/44/150c888fd22108c13766dc58132df43c0c9973774b243caf796caa50079c/terragraph-0.4.0.tar.gz",
"platform": null,
"description": "==========\nterragraph\n==========\n\n\n.. image:: https://img.shields.io/pypi/v/terragraph.svg\n :target: https://pypi.python.org/pypi/terragraph\n\n.. image:: https://img.shields.io/travis/cdsre/terragraph.svg\n :target: https://travis-ci.com/cdsre/terragraph\n\n.. image:: https://readthedocs.org/projects/terragraph/badge/?version=latest\n :target: https://terragraph.readthedocs.io/en/latest/?version=latest\n :alt: Documentation Status\n\n\n\n\nA package to help vizualise output from terraform graph as an svg file\n\n\n* Free software: MIT license\n* Documentation: https://terragraph.readthedocs.io.\n\nOverview\n--------\n\nThe idea behind this is to choose a node on a terraform dependency graph and be able to highlight all the preceding or\nsuccessor edges or both, recursively.\n\nTerraform is pretty good at calculating dependencies however sometimes there are casues where terraform cannot know. or\nwhere users don't realise how terraform generates dependencies. This can lead to race conditions where running the first\ntime fails but running the second time works. A prime example of this is when we pass an output of module A as an input\nof module B. In most cases users assume that outputs of module A will not be available until all resources in the module\nhave finished. However, this is not the case. Terraform will start running module B as soon as the output in module A is\navailable even when other resources in module A are not finished but module B expects them to be.\n\nGenerating a terraform graph is easy. However, these graphs can get very large very quickly. So trying to follow and\nunderstand the dependencies of one resource in relation to other resources can get complicated. This project attempts to\nsolve that by taking the output from a `terraform graph` command and selecting a specific node to highlight dependenices.\nit provides a HighlightingMode to allow the user to decide if they want to see all the resources the node depends on, all\nthe resources that depend on this node, or both.\n\nUsage\n-----\n\nCurrently, this is pretty raw, it just runs at the command line taking the DOT format file and the node name to highlight.\nBy default it will highlight all **PRECEDING** edges. These are the things that must be completed before this node can\nstart. It also supports passing the mode as a flag. The modes are\n\n.. table:: mode flags\n\n ========= ===========\n Value Description\n ========= ===========\n PRECEDING Highlights all preceding edges to this node. This is all things that needs to complete before this node start\n SUCCESSOR Highlights all successor edges from this node. This is all things that cannot start until this node is completed\n ALL This applies both PRECEDING and SUCCESSOR modes to highlight the full up and down dependency tree for the node\n ========= ===========\n\n\n.. code-block:: sh\n\n terragraph --file-name docs/assets/graph.dot --node-name '\"[root] module.mod2.random_pet.this (expand)\"'\n Colored node SVG file generated: docs/assets/graph.dot.svg\n\n\n\nThe above will create an SVG file with the preceding edges highlighted.\n\n.. image:: docs/assets/graph.dot.svg\n :alt: graph_output\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "A package to help vizualise output from terraform graph as an svg file",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/cdsre/terragraph"
},
"split_keywords": [
"terragraph"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e4a9977bc53f737cc0e1208d166660c924ac82bf10bb4a4910ecabe53ae2b9b6",
"md5": "8d0fed3fe88f3379537de7616c41c4a8",
"sha256": "dc210c4251309f16ad1b6a0650a7bbcb23ad9d2520d4790f8b140b74eb2a7d3d"
},
"downloads": -1,
"filename": "terragraph-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8d0fed3fe88f3379537de7616c41c4a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 7432,
"upload_time": "2024-01-27T15:56:59",
"upload_time_iso_8601": "2024-01-27T15:56:59.816248Z",
"url": "https://files.pythonhosted.org/packages/e4/a9/977bc53f737cc0e1208d166660c924ac82bf10bb4a4910ecabe53ae2b9b6/terragraph-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0044150c888fd22108c13766dc58132df43c0c9973774b243caf796caa50079c",
"md5": "cd55374443478ed3953772e642cb853e",
"sha256": "3c1e51c34ffb8f9b371fbfa1810e3d61941cf018990dfa7cc91b05171842ab28"
},
"downloads": -1,
"filename": "terragraph-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "cd55374443478ed3953772e642cb853e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 17110,
"upload_time": "2024-01-27T15:57:01",
"upload_time_iso_8601": "2024-01-27T15:57:01.638106Z",
"url": "https://files.pythonhosted.org/packages/00/44/150c888fd22108c13766dc58132df43c0c9973774b243caf796caa50079c/terragraph-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-27 15:57:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cdsre",
"github_project": "terragraph",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "terragraph"
}