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

Terraform Crash - AWS - Event Rule #26378

Closed
siolfyr opened this issue Aug 18, 2022 · 3 comments · Fixed by #26755
Closed

Terraform Crash - AWS - Event Rule #26378

siolfyr opened this issue Aug 18, 2022 · 3 comments · Fixed by #26755
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/events Issues and PRs that pertain to the events service.
Milestone

Comments

@siolfyr
Copy link

siolfyr commented Aug 18, 2022

It crashed, and asked me to send this. So here you go.

Originally appeared on a Mac with an M1, also on a company VPN, but then the .tf file was copied to a linux machine where the same crash happened.

These resources were working in AWS and then imported. I tried to upload to a separate account also to see if it would work there, no luck.

Terraform Version

Tried on both 1.2.3 and 1.2.7

Terraform Configuration Files

    provider "aws" {
      region = "us-east-1"
    }
    
    resource "aws_cloudwatch_event_rule" "test_api_rule2" {
      name                = "TestAnApiCall2"
      description         = "Testing an api call"
      schedule_expression = "cron(0/5 * * * ? *)"
    }
    
    resource "aws_cloudwatch_event_api_destination" "test_open2" {
        connection_arn                   = aws_cloudwatch_event_connection.example-api-destination--connection2.arn
        http_method                      = "GET"
        invocation_endpoint              = "https://example.api.com/call"
        invocation_rate_limit_per_second = 1
        name                             = "example-api-destination"
    }
    
    resource "aws_cloudwatch_event_connection" "example-api-destination--connection2" {
        authorization_type = "API_KEY"
        name               = "example-api-destination--connection2"
    
        auth_parameters {
            api_key {
                key = "example"
                value = "value"
            }
    
            invocation_http_parameters {
            }
        }
    }
    
    resource "aws_cloudwatch_event_target" "test_api_target_2" {
        arn            = aws_cloudwatch_event_api_destination.test_open2.arn
        event_bus_name = "default"
        rule           = "TestAnApiCall2"
    
        http_target {
            header_parameters       = {}
            path_parameter_values   = []
            query_string_parameters = {
              search = "y"
              path   = "*"
            }
        }
    }

Debug Output

Full gist:
https://gist.github.com/siolfyr/d6be5cb3b102440494069e4fefc70113

Significant output:

%%%%%%%%%% TERRAFORM CRASH %%%%%%%%%%
aws_cloudwatch_event_rule.test_api_rule2: Creating...
aws_cloudwatch_event_connection.example-api-destination--connection2: Creating...
╷
│ Error: Plugin did not respond
│
│   with aws_cloudwatch_event_rule.test_api_rule2,
│   on event.tf line 5, in resource "aws_cloudwatch_event_rule" "test_api_rule2":
│    5: resource "aws_cloudwatch_event_rule" "test_api_rule2" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵
╷
│ Error: Plugin did not respond
│
│   with aws_cloudwatch_event_connection.example-api-destination--connection2,
│   on event.tf line 19, in resource "aws_cloudwatch_event_connection" "example-api-destination--connection2":
│   19: resource "aws_cloudwatch_event_connection" "example-api-destination--connection2" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-aws_v4.26.0_x5 plugin:

panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 401 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/events.expandConnectionHTTPParameters({0x1400056c5e0, 0x1, 0x1090d72cc?})
	github.com/hashicorp/terraform-provider-aws/internal/service/events/connection.go:481 +0x270
github.com/hashicorp/terraform-provider-aws/internal/service/events.expandCreateConnectionAuthRequestParameters({0x1400056c5b0, 0x1, 0x14003086cf8?})
	github.com/hashicorp/terraform-provider-aws/internal/service/events/connection.go:397 +0x23c
github.com/hashicorp/terraform-provider-aws/internal/service/events.resourceConnectionCreate(0x14000532380, {0x10b426d60?, 0x14000284000})
	github.com/hashicorp/terraform-provider-aws/internal/service/events/connection.go:265 +0x110
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x10c996288?, {0x10c996288?, 0x140023eac90?}, 0xd?, {0x10b426d60?, 0x14000284000?})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.20.0/helper/schema/resource.go:695 +0x138
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x14000f281c0, {0x10c996288, 0x140023eac90}, 0x1400053c1a0, 0x14000532200, {0x10b426d60, 0x14000284000})
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.20.0/helper/schema/resource.go:837 +0x874
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x140001983d8, {0x10c996288?, 0x140023eab70?}, 0x1400350c230)
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.20.0/helper/schema/grpc_provider.go:1021 +0xb94
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.muxServer.ApplyResourceChange({0x14001d5cea0, 0x14001d5cf00, {0x14002922a00, 0x2, 0x2}, 0x14001d5ced0, 0x14001d841a0, 0x140024ed2d0, 0x14001d5cf30}, {0x10c996288?, ...}, ...)
	github.com/hashicorp/terraform-plugin-mux@v0.7.0/tf5muxserver/mux_server_ApplyResourceChange.go:27 +0x108
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x1400165bd60, {0x10c996288?, 0x140023ea300?}, 0x140034e2b60)
	github.com/hashicorp/terraform-plugin-go@v0.13.0/tfprotov5/tf5server/server.go:813 +0x370
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x10c68fd20?, 0x1400165bd60}, {0x10c996288, 0x140023ea300}, 0x140034e2af0, 0x0)
	github.com/hashicorp/terraform-plugin-go@v0.13.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x174
google.golang.org/grpc.(*Server).processUnaryRPC(0x140023e2d20, {0x10c99b8d0, 0x140025911e0}, 0x1400350bd40, 0x1400295b4d0, 0x111f61080, 0x0)
	google.golang.org/grpc@v1.48.0/server.go:1295 +0x9d8
google.golang.org/grpc.(*Server).handleStream(0x140023e2d20, {0x10c99b8d0, 0x140025911e0}, 0x1400350bd40, 0x0)
	google.golang.org/grpc@v1.48.0/server.go:1636 +0x840
google.golang.org/grpc.(*Server).serveStreams.func1.2()
	google.golang.org/grpc@v1.48.0/server.go:932 +0x88
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/grpc@v1.48.0/server.go:930 +0x298

Error: The terraform-provider-aws_v4.26.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

%%%%%%%%%% TERRAFORM CRASH %%%%%%%%%%
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/events Issues and PRs that pertain to the events service. labels Aug 18, 2022
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Aug 18, 2022
Copy link

github-actions bot commented May 1, 2024

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.48.0 milestone May 1, 2024
Copy link

github-actions bot commented May 2, 2024

This functionality has been released in v5.48.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

github-actions bot commented Jun 2, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/events Issues and PRs that pertain to the events service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants