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

Issues with terraform versioning when using rover #116

Open
captaindanila opened this issue Aug 24, 2022 · 0 comments
Open

Issues with terraform versioning when using rover #116

captaindanila opened this issue Aug 24, 2022 · 0 comments

Comments

@captaindanila
Copy link

captaindanila commented Aug 24, 2022

I'm trying to build a graphic while running rover (from my terraform project directory) through docker with the following command:

docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover:v0.3.3 -planPath terraform.tfstate

The output would be the following:

2022/08/24 13:54:51 Starting Rover...
2022/08/24 13:54:51 Using provided plan...
2022/08/24 13:54:53 Unable to parse Plan: Unable to read Plan (/src/terraform.tfstate): exit status 1

Error: missing or corrupted provider plugins:
  - registry.terraform.io/hashicorp/random: there is no package for registry.terraform.io/hashicorp/random 3.3.2 cached in .terraform/providers
  - registry.terraform.io/hashicorp/time: there is no package for registry.terraform.io/hashicorp/time 0.7.2 cached in .terraform/providers
  - registry.terraform.io/hashicorp/cloudinit: there is no package for registry.terraform.io/hashicorp/cloudinit 2.2.0 cached in .terraform/providers
  - registry.terraform.io/gavinbunney/kubectl: there is no package for registry.terraform.io/gavinbunney/kubectl 1.14.0 cached in .terraform/providers
  - registry.terraform.io/hashicorp/external: there is no package for registry.terraform.io/hashicorp/external 2.2.2 cached in .terraform/providers
  - registry.terraform.io/hashicorp/aws: there is no package for registry.terraform.io/hashicorp/aws 3.75.2 cached in .terraform/providers
  - registry.terraform.io/hashicorp/null: there is no package for registry.terraform.io/hashicorp/null 3.1.1 cached in .terraform/providers
  - registry.terraform.io/hashicorp/tls: there is no package for registry.terraform.io/hashicorp/tls 4.0.1 cached in .terraform/providers
  - registry.terraform.io/hashicorp/helm: there is no package for registry.terraform.io/hashicorp/helm 2.6.0 cached in .terraform/providers
  - registry.terraform.io/hashicorp/kubernetes: there is no package for registry.terraform.io/hashicorp/kubernetes 2.12.1 cached in .terraform/providers
  - registry.terraform.io/hashicorp/http: there is no package for registry.terraform.io/hashicorp/http 3.0.1 cached in .terraform/providers
  - registry.terraform.io/hashicorp/local: there is no package for registry.terraform.io/hashicorp/local 2.2.3 cached in .terraform/providers

I can however start rover through passing the plan as a json:

docker run --rm -it -p 9000:9000 -v $(pwd):/src im2nguyen/rover:v0.3.3 -planJSONPath=plan.json

If I access the container via CLI I can see that the terraform version used is 1.1.2 when the version used for the deployment is 1.1.9. I've tried passing the terraform path through -tfPath hoping it would take the correct one used for my deployment but to no help.

How can I fix the versioning issue so that terraform init doesn't fail? (I'm also parsing it as a json to work because if I don't parse any plan rover will freeze during terraform init, most likely due to this issue)

Also, is there a way to generate a graphic (since I want to include it in a pipeline) with only specific resources shown, like for example only created and updated resources without anything else (especially variables) ?

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant