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

Errors reading state files generated by terraform aws provider 5.* #1671

Open
ckdake opened this issue Jun 8, 2023 · 2 comments
Open

Errors reading state files generated by terraform aws provider 5.* #1671

ckdake opened this issue Jun 8, 2023 · 2 comments
Labels
kind/bug Something isn't working

Comments

@ckdake
Copy link

ckdake commented Jun 8, 2023

Description
When running driftctl against a state file stored by the most recent version of the terraform aws provider (now on 5.* as of recently), driftctl complains of errors reading from the state file and fails to complete.

Environment

  • OS: Wolfi (container)
  • driftctl version: v0.39.0
  • terraform version: 1.4.6
  • terraform providers versions: aws@5.1.0

How to reproduce
Create a few resources using terraform. Any one of these will fail:

  • aws_route_table -> this will yield a "route": element 0: attribute "instance_id" is required error
  • aws_default_vpc -> this will yield a attributes "enable_classiclink" and "enable_classiclink_dns_support" are required error

Possible Solution
Update to the most recent version of the terraform state file parsing library from hashicorp.

@ckdake ckdake added the kind/bug Something isn't working label Jun 8, 2023
@Forte-RehamAdel
Copy link

Could you please tell me how you solved the issue?

@ckdake
Copy link
Author

ckdake commented Sep 18, 2024

Could you please tell me how you solved the issue?

We gave up on using driftctl, and use a combination of AWS Security Hub controls, custom lambdas, and some other custom bits. prowler-cloud/prowler#2678 would be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants