Skip to content

Instantly share code, notes, and snippets.

@iwahbe
Created June 27, 2024 22:12
Show Gist options
  • Save iwahbe/cde411cee6a75dd241ef7475d9b8ea71 to your computer and use it in GitHub Desktop.
Save iwahbe/cde411cee6a75dd241ef7475d9b8ea71 to your computer and use it in GitHub Desktop.
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:
# digitalocean_app.repro will be created
+ resource "digitalocean_app" "repro" {
+ active_deployment_id = (known after apply)
+ created_at = (known after apply)
+ default_ingress = (known after apply)
+ id = (known after apply)
+ live_url = (known after apply)
+ project_id = (known after apply)
+ updated_at = (known after apply)
+ urn = (known after apply)
+ spec {
+ domains = (known after apply)
+ name = "[REDACTED]"
+ region = "nyc3"
+ ingress {
+ rule {
+ cors {
+ allow_methods = [
+ "DELETE",
+ "GET",
+ "POST",
+ "PUT",
]
}
}
}
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
digitalocean_app.repro: Creating...
│ Error: Plugin did not respond
│ with digitalocean_app.repro,
│ on main.tf line 14, in resource "digitalocean_app" "repro":
│ 14: resource "digitalocean_app" "repro" {
│ 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-digitalocean_v2.39.2 plugin:
panic: runtime error: index out of range [0] with length 0
goroutine 82 [running]:
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/app.expandAppCORSPolicy({0x1400094d080?, 0x140008c3e30?, 0x102d2bd63?})
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/app/app_spec.go:2066 +0xa24
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/app.expandAppIngress({0x1400094d020, 0x140008c3bf0?, 0x102d2ea22?})
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/app/app_spec.go:2154 +0x670
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/app.expandAppSpec({0x1400094cfc0?, 0x102d2bd6b?, 0x140008aedc8?})
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/app/app_spec.go:1052 +0xa54
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/app.resourceDigitalOceanAppCreate({0x103249420, 0x140005312d0}, 0x1400049e980, {0x103118280?, 0x140003e77d0?})
github.com/digitalocean/terraform-provider-digitalocean/digitalocean/app/resource_app.go:123 +0xa4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1400056d5e0, {0x103249378, 0x1400070d4a0}, 0xd?, {0x103118280, 0x140003e77d0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:707 +0xe8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x1400056d5e0, {0x103249378, 0x1400070d4a0}, 0x14000723e10, 0x14000517580, {0x103118280, 0x140003e77d0})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:837 +0x850
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x14000237998, {0x103249378?, 0x1400070d3b0?}, 0x14000662280)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/grpc_provider.go:1021 +0xb08
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x14000534140, {0x103249378?, 0x1400070c9c0?}, 0x14000530150)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:818 +0x3c0
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1031fe460?, 0x14000534140}, {0x103249378, 0x1400070c9c0}, 0x140005300e0, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:385 +0x164
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000240000, {0x10324df20, 0x140001029c0}, 0x14000616000, 0x140005bd110, 0x1038f3620, 0x0)
google.golang.org/grpc@v1.56.3/server.go:1335 +0xbe0
google.golang.org/grpc.(*Server).handleStream(0x14000240000, {0x10324df20, 0x140001029c0}, 0x14000616000, 0x0)
google.golang.org/grpc@v1.56.3/server.go:1712 +0x7cc
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/grpc@v1.56.3/server.go:947 +0xb4
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 9
google.golang.org/grpc@v1.56.3/server.go:958 +0x160
Error: The terraform-provider-digitalocean_v2.39.2 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment