You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if I have done something wrong but am experiencing this error:
docker run --rm -v $(pwd):/target -i -t eerkunt/terraform-compliance --features ./ --planfile ./plan.out
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
terraform-compliance v1.3.33 initiated
. Converting terraform plan file.
ERROR: Failed to convert terraform plan file to JSON format via terraform. Here is the error :
None
╷
│ Error: Failed to load plugin schemas
│
│ Error while loading schemas for plugin components: Failed to obtain
│ provider schema: Could not load the schema for provider
│ registry.terraform.io/hashicorp/aws: failed to instantiate provider
│ "registry.terraform.io/hashicorp/aws" to obtain schema: unavailable
│ provider "registry.terraform.io/hashicorp/aws"..
To Reproduce
I am using an M1 MacBook
Feature File:
Scenario Outline: Ensure that specific tags are definedGiven I have resource that supports tags_all defined
When it has tags_all
Then it must contain tags_all
Then it must contain "<tags>"And its value must match the "<value>" regex
Examples:
| tags | value | | Name | .+ | | Team | .+ | | environment | ^(prod\|test\|dev)$ |
│ Error: Failed to load plugin schemas
│
│ Error while loading schemas for plugin components: Failed to obtain
│ provider schema: Could not load the schema for provider
│ registry.terraform.io/hashicorp/aws: failed to instantiate provider
│ "registry.terraform.io/hashicorp/aws" to obtain schema: unavailable
│ provider "registry.terraform.io/hashicorp/aws"..
Expected Behavior:
It runs my feature tests.
Tested Versions:
terraform-compliance version: v1.3.33
terraform version: 1.2.3
python version: N/A
Additional Context:
The text was updated successfully, but these errors were encountered:
I have same problem, but with "registry.terraform.io/hashicorp/azurerm":
$ terraform-compliance -p ./tfplan --features ./tests/
terraform-compliance v1.3.41 initiated
. Converting terraform plan file.
ERROR: Failed to convert terraform plan file to JSON format via terraform. Here is the error :
None
╷
│ Error: Failed to load plugin schemas
│
│ Error while loading schemas for plugin components: Failed to obtain
│ provider schema: Could not load the schema for provider
│ registry.terraform.io/hashicorp/azurerm: failed to instantiate provider
│ "registry.terraform.io/hashicorp/azurerm" to obtain schema: unavailable
│ provider "registry.terraform.io/hashicorp/azurerm"..
╵
Is there some missing action before execute terraform-compliance?
Thanks!
When you use a plan.out file generated by terraform directly via terraform plan -out=plan.out, terraform-compliance executes terraform again to convert it to a JSON file. This sometimes take a bit of time and problems like this, as terraform might require to have an init and other stuff before converting it.
You can skip this step by converting the plan file by yourself with ;
terraform show -json plan.out > plan.out.json
and providing plan.out.json to terraform-compliance, instead of plan.out. terraform-compliance will detect that this is a converted plan and will skip any terraform execution. This will both speed up your process and hopefully solves the problem that you are having right now.
Description
I'm not sure if I have done something wrong but am experiencing this error:
To Reproduce
I am using an M1 MacBook
Feature File:
Plan File:
Sample Terraform Code:
Used
terraform-compliance
Parameters:Running via Docker:
Error Output:
Expected Behavior:
It runs my feature tests.
Tested Versions:
Additional Context:
The text was updated successfully, but these errors were encountered: