Hello,
I have a terraform stack that is not working anymore and I get this message:
│ 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 Terraform Registry failed to instantiate provider “Terraform Registry” to obtain schema: timeout while waiting
│ for plugin to start…
I am not aware about any major changes, just suddenly stopped working.
Hey @Nano We had some issues with the 5.71.0 release, and so subsequently pulled it entirely. You’ll want to use version 5.72.0 or later, which will resolve this issue if you were still encountering it.
AWS % terraform init
**Initializing the backend...**
**Initializing provider plugins...**
- Reusing previous version of hashicorp/aws from the dependency lock file
- Using previously-installed hashicorp/aws v5.75.0
**Terraform has been successfully initialized!**
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
ohansen@Oves-MacBook-Air AWS % terraform plan
╷
│ **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: timeout while waiting
│ for plugin to start..
╵
AWS % terraform plan
╷
│ **Error:** **timeout while waiting for plugin to start**
│
│
Some times it works:
AWS % terraform apply
Terraform used the selected providers to generate the following execution plan.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_eip.ip will be created
+ resource "aws_eip" "ip" {
+ allocation_id = (known after apply)
+ arn = (known after apply)
Debug
024-11-10T08:38:39.273Z [DEBUG] Starting graph walk: walkValidate
2024-11-10T08:38:39.284Z [DEBUG] created provider logger: level=debug
2024-11-10T08:38:39.284Z [INFO] provider: configuring client automatic mTLS
2024-11-10T08:38:39.293Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.75.0/darwin_amd64/terraform-provider-aws_v5.75.0_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/aws/5.75.0/darwin_amd64/terraform-provider-aws_v5.75.0_x5"]
2024-11-10T08:38:39.301Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.75.0/darwin_amd64/terraform-provider-aws_v5.75.0_x5 pid=7206
2024-11-10T08:38:39.301Z [DEBUG] provider: waiting for RPC address: plugin=.terraform/providers/registry.terraform.io/hashicorp/aws/5.75.0/darwin_amd64/terraform-provider-aws_v5.75.0_x5
2024-11-10T08:38:39.463Z [DEBUG] provider.terraform-provider-aws_v5.75.0_x5: assertion failed [arm_interval().contains(address)]: code fragment does not contain the given arm address
2024-11-10T08:38:39.463Z [DEBUG] provider.terraform-provider-aws_v5.75.0_x5: (CodeFragmentMetadata.cpp:48 instruction_extents_for_arm_address)
2024-11-10T08:39:39.304Z [ERROR] vertex "provider[\"registry.terraform.io/hashicorp/aws\"]" error: timeout while waiting for plugin to start
2024-11-10T08:39:39.309Z [DEBUG] provider.terraform-provider-aws_v5.75.0_x5:
2024-11-10T08:39:39.309Z [ERROR] provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/hashicorp/aws/5.75.0/darwin_amd64/terraform-provider-aws_v5.75.0_x5 id=7206 error="signal: killed"
╷
│ **Error:** **timeout while waiting for plugin to start**
│
│
╵
2024-11-10T08:39:39.310Z [WARN] provider: plugin failed to exit gracefully
This looks to be related to attempting to run the darwin_amd64 binary on an ARM device. That configuration isn’t supported (by Terraform Core or the providers) because Rosetta doesn’t always do a perfect job of emulating x86.