terraform-config-inspect | helper library for shallow inspection | Infrastructure Automation library

 by   hashicorp Go Version: Current License: MPL-2.0

kandi X-RAY | terraform-config-inspect Summary

kandi X-RAY | terraform-config-inspect Summary

terraform-config-inspect is a Go library typically used in Devops, Infrastructure Automation, Terraform applications. terraform-config-inspect has no bugs, it has no vulnerabilities, it has a Weak Copyleft License and it has low support. You can download it from GitHub.

A helper library for shallow inspection of Terraform configurations
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              terraform-config-inspect has a low active ecosystem.
              It has 295 star(s) with 62 fork(s). There are 263 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 23 open issues and 13 have been closed. On average issues are closed in 306 days. There are 6 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of terraform-config-inspect is current.

            kandi-Quality Quality

              terraform-config-inspect has 0 bugs and 0 code smells.

            kandi-Security Security

              terraform-config-inspect has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              terraform-config-inspect code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              terraform-config-inspect is licensed under the MPL-2.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              terraform-config-inspect releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.
              It has 1700 lines of code, 40 functions and 37 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of terraform-config-inspect
            Get all kandi verified functions for this library.

            terraform-config-inspect Key Features

            No Key Features are available at this moment for terraform-config-inspect.

            terraform-config-inspect Examples and Code Snippets

            No Code Snippets are available at this moment for terraform-config-inspect.

            Community Discussions

            QUESTION

            Extracting raw (non string) parameter values from terraform using terraform-config-inspect
            Asked 2021-Dec-06 at 22:15

            I'm trying to generate json from terraform modules using terraform-config-inspect (https://github.com/hashicorp/terraform-config-inspect).

            Note: Started with terraform-docs but then found what it uses underneath and it's terraform-config-inspect library.

            The problem is that I want to go beyond what terraform-config-inspect provides out of box at the moment:

            As an example, I want to get the name of aws_ssm_parameter resource.

            For example, I have resource like this:

            ...

            ANSWER

            Answered 2021-Dec-06 at 22:15

            Input Variables in Terraform are a planning option and so to resolve them fully requires creating a Terraform plan. If you are able to create a Terraform plan then you can find the resolved values in the JSON serialization of the plan, using steps like the following:

            • terraform plan -out=tfplan (optionally include -var=... and -var-file=... if you need to set particular values for those variables.
            • terraform show -json tfplan to get a JSON representation of the plan.

            Alternatively, if you've already applied the configuration you want to analyse then you can get similar information from the JSON representation of the latest state snapshot:

            • terraform show -json to get a JSON representation of the latest state snapshot.

            As you've seen, terraform-config-inspect is only for static analysis of the top-level declarations and so it contains no functionality for evaluating expressions.

            In order to properly evaluate expressions here without creating a Terraform plan or reading from a Terraform state snapshot would require reimplementing the Terraform Core runtime, at least to some extent. However, for this particular expression (which only relies on input variable values) you could potentially use the HCL API directly with some hard-coded placeholder values for those variables in order to get a value for that argument, derived from whatever you happen to have set var.deployment and var.service_name to in the hcl.EvalContext you construct yourself.

            Source https://stackoverflow.com/questions/70252507

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install terraform-config-inspect

            You can download it from GitHub.

            Support

            This library and tool are intentionally focused on only extracting simple top-level metadata about a single Terraform module. This is to reduce the maintenance burden of keeping this codebase synchronized with changes to Terraform itself: the features extracted by this package are unlikely to change significantly in future versions. For that reason, we cannot accept external PRs for this codebase that add support for additional Terraform language features. Furthermore, we consider this package feature-complete; if there is a feature you wish to see added, please open a GitHub issue first so we can discuss the feasability and design before submitting a pull request. We are unlikely to accept PRs that add features without discussion first. We would be happy to review PRs to fix bugs in existing functionality or to improve the usability of the Go package API, however. We will be hesitant about any breaking changes to the API, since this library is used by a number of existing tools and systems. To work on this codebase you will need a recent version of Go installed. Please ensure all files match the formatting rules applied by go fmt and that all unit tests are passing.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/hashicorp/terraform-config-inspect.git

          • CLI

            gh repo clone hashicorp/terraform-config-inspect

          • sshUrl

            git@github.com:hashicorp/terraform-config-inspect.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Infrastructure Automation Libraries

            terraform

            by hashicorp

            salt

            by saltstack

            pulumi

            by pulumi

            terraformer

            by GoogleCloudPlatform

            Try Top Libraries by hashicorp

            terraform

            by hashicorpGo

            vault

            by hashicorpGo

            consul

            by hashicorpGo

            vagrant

            by hashicorpRuby

            packer

            by hashicorpGo