inframap
inframap copied to clipboard
Unsupported block type; Blocks of type "moved" are not expected here.
It seems Inframap doesn't work with terraform moved blocks for the refactoring: https://developer.hashicorp.com/terraform/language/modules/develop/refactoring#moved-block-syntax
I am currently refactoring a huge monolith code base that describes the whole infra of the project. I moved several things to a separate module and once I started moving some other stuff to another module I got a cycle error. I tried to use inframap but unfortunately, moved blocks are not supported by it. Not sure if it is a bug or expected behavior.
Once I remove those blocks inframap gets generated.
Error:
Error: <infra_repo>/moved_kubernetes.tf:19,1-6: Unsupported block type; Blocks of type "moved" are not expected here., and 56 other diagnostic(s)
Usage:
inframap generate [FILE] [flags]
Examples:
inframap generate state.tfstate
cat state.tfstate | inframap generate
Flags:
--clean Clean will the generated graph will not have any Node that does not have a connection/edge (default true)
--connections Connections will apply the logic of the provider to remove resources that are not nodes (default true)
--external-nodes Toggle the addition of external nodes like 'im_out' (used to show ingress connections) (default true)
-h, --help help for generate
--printer string Type of printer to use for the output. Supported ones are: dot (default "dot")
--raw Raw will not use any specific logic from the provider, will just display the connections between elements. It's used by default if none of the Providers is known
--show-icons Toggle the icons on the printed graph (default true)
Global Flags:
--hcl Forces to use HCL parser
--tfstate Forces to use TFState parser
+1 for this - would help