Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support terraform import blocks #4657

Closed
simar7 opened this issue Jun 16, 2023 · 0 comments
Closed

feat: Support terraform import blocks #4657

simar7 opened this issue Jun 16, 2023 · 0 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Milestone

Comments

@simar7
Copy link
Member

simar7 commented Jun 16, 2023

As of Terraform 1.5, support has been added for import blocks.

https://github.com/hashicorp/terraform/blob/v1.5/CHANGELOG.md#150-june-12-2023
https://developer.hashicorp.com/terraform/language/import

Today we do not support this, therefore scanning any file that has an import block will not be classified as a terraform config file.

$ trivy config .
2023-06-16T15:54:47.536-0600    INFO    Misconfiguration scanning is enabled
2023-06-16T15:54:48.037-0600    INFO    Detected config files: 0
$ cat main.tf 
import {
  to = aws_instance.example
  id = "i-abcd1234"
}

resource "aws_instance" "example" {
  name = "hashi"
}
@simar7 simar7 added kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning labels Jun 16, 2023
@simar7 simar7 added this to the v0.43.0 milestone Jun 16, 2023
@simar7 simar7 closed this as completed Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Projects
None yet
Development

No branches or pull requests

1 participant