Coder Social home page Coder Social logo

Issues executing against about terrascan HOT 5 CLOSED

tenable avatar tenable commented on May 21, 2024
Issues executing against

from terrascan.

Comments (5)

cesar-rodriguez avatar cesar-rodriguez commented on May 21, 2024

It's not dependent on any terraform version. Do you have a sample file I can use to replicate your issue?

from terrascan.

m4wk avatar m4wk commented on May 21, 2024

Thanks for the quick response. Attached is the TF and variables files (zipped) I attempted to run TerraScan against.

Are there any plans to integrate outputting results from Terrascan to another format such as HTML, TXT, etc?
tf.zip

from terrascan.

ndarwincorn avatar ndarwincorn commented on May 21, 2024

I'm seeing this as well with heredoc validation. Here's a toy example that repros:

data "template_file" "test" {
  template = <<-EOF
    this
    is
    a
    multiline
    string
  EOF
}

resource "null_resource" "test" {
  provisioner "local-exec" {
    command = "echo '${data.template_file.test.rendered}'"
  }
}
$ terrascan -l $(pwd) -t all
...
Line 16, column 0, index 232: EOF before closing heredoc
...
$ terraform validate
(exit 0)
$ terraform apply
null_resource.test: Creating...
null_resource.test: Provisioning with 'local-exec'...
null_resource.test (local-exec): Executing: ["/bin/sh" "-c" "echo '  this\n  is\n  a\n  multiline\n  string\n'"]
null_resource.test (local-exec):   this
null_resource.test (local-exec):   is
null_resource.test (local-exec):   a
null_resource.test (local-exec):   multiline
null_resource.test (local-exec):   string

from terrascan.

ndarwincorn avatar ndarwincorn commented on May 21, 2024

This is a problem with PyHCL that was maybe* fixed in virtuald/pyhcl#37 (0.3.10), but since terraform-validate pins its PyHCL dependency to 0.3.9 it's not getting that fix.

I'll see what happens when I force terraform-validate to use PyHCL 0.3.10, and submit a PR there if it doesn't fix it. 0.3.10 fixes this problem. Submitting an issue to terraform_validate to update their dependency.

* By issue description, it should've been fixed in virtuald/pyhcl#32 (0.3.8), but that's clearly not the case.

from terrascan.

cesar-rodriguez avatar cesar-rodriguez commented on May 21, 2024

I've updated all dependencies to the latest. Hopefully this fixes these issues.

from terrascan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.