New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/webdevwilson/terraform-eval

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/webdevwilson/terraform-eval

v0.0.0-20200210031439-af59b33bcdc9
Source
Go
Version published
Created
Source

Terraform Evaluator

An incredibly naive interpreter for evaluating expressions in Terraform.

How To Use

docker run webdevwilson/terraform-eval "length([1,2,3])"

Or, use an alias:

alias terraform-eval=docker run webdevwilson/terraform-eval "length([1,2,3])"

A Few Examples

Try the following commands to test it.

> terraform-eval "length([1,2,3])"
3

> terraform-eval "cidrsubnet(\"172.16.0.0/12\", 4, 2)"
172.18.0.0/16

> terraform-eval "formatdate(\"DD MMM YYYY hh:mm ZZZ\", \"2018-01-02T23:12:01Z\")"
02 Jan 2018 23:12 UTC

> terraform-eval "regex(\"^(?:(?P<scheme>[^:/?#]+):)?(?://(?P<authority>[^/?#]*))?\", \"https://terraform.io/docs/\")"
{
  "authority" = "terraform.io"
  "scheme" = "https"
}

FAQs

Package last updated on 10 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts