hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.75k stars 9.11k forks source link

Terraform AWS Plugin Version 4.3.0 #23511

Closed LennyCastaneda closed 5 months ago

LennyCastaneda commented 2 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Affected Resource(s)

Transit Gateway and VPCs

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 2.7.0"
}
}
}

Debug Output

│ Error: Plugin did not respond │ │ with module.ingress_routes_from_usw2_to_usw2.provider["registry.terraform.io/hashicorp/aws"].local_region, │ on .terraform/modules/ingress_routes_from_usw2_to_usw2/tgw_ingress_routes/main.tf line 10, in provider "aws": │ 10: provider "aws" { │ │ The plugin encountered an error, and failed to respond to the │ plugin.(*GRPCProvider).GetProviderSchema call. The plugin logs may contain │ more details. ╵ 2022-03-04T18:32:55.988Z [WARN] provider: plugin failed to exit gracefully 2022-03-04T18:32:55.991Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1886 error="signal: killed"

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform plan
  2. Errors out after plan

Important Factoids

References

justinretzolk commented 2 years ago

Hey @LennyCastaneda 👋 Thank you for taking the time to raise this. So that we have all of the necessary information in order to look into this, can you supply full debug logs (redacted as needed) and the provider declaration that appears to be within the module ingress_routes_from_usw2_to_usw2?

LennyCastaneda commented 2 years ago

Hi @justinretzolk below is the logs...

When I updated my provider aws plugin version constraint to:... the error went away on most plans...

aws = { source = "hashicorp/aws" version = ">= 2.7.0, < 4.3.0" }

2022-03-04T18:32:53.876Z [TRACE] vertex "module.tgw_ingress_routes_from_euce1_to_usw2.aws_ec2_transit_gateway_route.local": visit complete
2022-03-04T18:32:53.882Z [TRACE] vertex "module.tgw_ingress_routes_from_euce1_to_usw2.provider[\"registry.terraform.io/hashicorp/aws\"].local_region (close)": starting visit (*terraform.graphNodeCloseProvider)
2022-03-04T18:32:53.882Z [TRACE] vertex "module.tgw_ingress_routes_from_usw2_to_euce1.provider[\"registry.terraform.io/hashicorp/aws\"].local_region (close)": visit complete
2022-03-04T18:32:53.882Z [TRACE] vertex "module.tgw_ingress_routes_from_use1_to_usw2 (close)": visit complete
2022-03-04T18:32:53.882Z [TRACE] vertex "module.tgw_ingress_routes_from_euce1_to_usw2.provider[\"registry.terraform.io/hashicorp/aws\"].target_region (close)": starting visit (*terraform.graphNodeCloseProvider)
2022-03-04T18:32:53.882Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1647
2022-03-04T18:32:53.883Z [TRACE] vertex "module.tgw_ingress_routes_from_euce1_to_usw2 (close)": starting visit (*terraform.nodeCloseModule)
2022-03-04T18:32:53.883Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.883Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.883Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.883Z [TRACE] vertex "module.ingress_routes_from_use1_to_use1.provider[\"registry.terraform.io/hashicorp/aws\"].local_region (close)": visit complete
2022-03-04T18:32:53.884Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.892Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1717
2022-03-04T18:32:53.892Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.892Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.892Z [TRACE] vertex "module.tgw_ingress_routes_from_use1_to_euce1.provider[\"registry.terraform.io/hashicorp/aws\"].target_region (close)": visit complete
2022-03-04T18:32:53.892Z [TRACE] vertex "module.tgw_ingress_routes_from_euce1_to_usw2 (close)": visit complete
2022-03-04T18:32:53.893Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.897Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1701
2022-03-04T18:32:53.897Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.897Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.897Z [TRACE] vertex "module.tgw_ingress_routes_from_euce1_to_use1.provider[\"registry.terraform.io/hashicorp/aws\"].target_region (close)": visit complete
2022-03-04T18:32:53.901Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.905Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1683
2022-03-04T18:32:53.905Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.906Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.906Z [TRACE] vertex "module.tgw_attachment_SECONDARY.provider[\"registry.terraform.io/hashicorp/aws\"].target_environment (close)": visit complete
2022-03-04T18:32:53.907Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.910Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1745
2022-03-04T18:32:53.910Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.910Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.910Z [TRACE] vertex "provider[\"registry.terraform.io/hashicorp/aws\"].euce1 (close)": visit complete
2022-03-04T18:32:53.914Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.914Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1848
2022-03-04T18:32:53.914Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.915Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.915Z [TRACE] vertex "module.tgw_ingress_routes_from_usw2_to_use1.provider[\"registry.terraform.io/hashicorp/aws\"].local_region (close)": visit complete
2022-03-04T18:32:53.916Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.919Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1691
2022-03-04T18:32:53.919Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.919Z [TRACE] vertex "module.tgw_ingress_routes_from_use1_to_usw2.provider[\"registry.terraform.io/hashicorp/aws\"].local_region (close)": visit complete
2022-03-04T18:32:53.919Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.924Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.924Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1709
2022-03-04T18:32:53.924Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.924Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.924Z [TRACE] vertex "module.tgw_ingress_routes_from_use1_to_usw2.provider[\"registry.terraform.io/hashicorp/aws\"].target_region (close)": visit complete
2022-03-04T18:32:53.925Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.929Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1859
2022-03-04T18:32:53.930Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.930Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.930Z [TRACE] vertex "module.ingress_routes_from_usw2_to_usw2.provider[\"registry.terraform.io/hashicorp/aws\"].target_region (close)": visit complete
2022-03-04T18:32:53.934Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.934Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1772
2022-03-04T18:32:53.934Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.934Z [TRACE] GRPCProvider: Close
2022-03-04T18:32:53.934Z [TRACE] vertex "module.tgw_ingress_routes_from_euce1_to_usw2.provider[\"registry.terraform.io/hashicorp/aws\"].local_region (close)": visit complete
2022-03-04T18:32:53.935Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing"
2022-03-04T18:32:53.938Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1763
2022-03-04T18:32:53.938Z [DEBUG] provider: plugin exited
2022-03-04T18:32:53.938Z [TRACE] vertex "module.tgw_ingress_routes_from_euce1_to_usw2.provider[\"registry.terraform.io/hashicorp/aws\"].target_region (close)": visit complete
2022-03-04T18:32:53.938Z [TRACE] dag/walk: upstream of "root" errored, so skipping
╷
│ Error: Plugin did not respond
│ 
│   with module.ingress_routes_from_usw2_to_usw2.provider["registry.terraform.io/hashicorp/aws"].local_region,
│   on .terraform/modules/ingress_routes_from_usw2_to_usw2/tgw_ingress_routes/main.tf line 10, in provider "aws":
│   10: provider "aws" {
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).GetProviderSchema call. The plugin logs may contain
│ more details.
╵
2022-03-04T18:32:55.988Z [WARN]  provider: plugin failed to exit gracefully
2022-03-04T18:32:55.991Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/4.3.0/linux_amd64/terraform-provider-aws_v4.3.0_x5 pid=1886 error="signal: killed"

LennyCastaneda commented 2 years ago

@justinretzolk here is another plan log I got last week as well... a timeout error:

{"@level":"info","@message":"module.tgw_ingress_routes_from_use1_to_euce1.aws_ec2_transit_gateway_route.local[0]: Refresh complete [id=tgw-rtb-0e328e79378c2e762_10.67.8.0/21]","@module":"terraform.ui","@timestamp":"2022-03-03T23:20:18.873618Z","hook":{"resource":{"addr":"module.tgw_ingress_routes_from_use1_to_euce1.aws_ec2_transit_gateway_route.local[0]","module":"module.tgw_ingress_routes_from_use1_to_euce1","resource":"aws_ec2_transit_gateway_route.local[0]","implied_provider":"aws","resource_type":"aws_ec2_transit_gateway_route","resource_name":"local","resource_key":0},"id_key":"id","id_value":"tgw-rtb-0e328e79378c2e762_10.67.8.0/21"},"type":"refresh_complete"} {"@level":"error","@message":"Error: timeout while waiting for plugin to start","@module":"terraform.ui","@timestamp":"2022-03-03T23:20:18.952213Z","diagnostic":{"severity":"error","summary":"timeout while waiting for plugin to start","detail":""},"type":"diagnostic"}

LennyCastaneda commented 2 years ago

When I set the provider constraint to < 4.3.0 it seem to work fine with version 4.2.0...but sometimes did timeout. It appears to be isolated to only VPC/subnet resources. As I don't see this issues with other terraform modules for other specific blast radiuses.

The most stable version we could find for networking was version ~> 3.68.0

github-actions[bot] commented 6 months ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

github-actions[bot] commented 4 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.