Loading...
Loading...
### Terraform Version ```shell Terraform v1.10.2 on darwin_arm64 + provider registry.terraform.io/hashicorp/aws v5.81.0 ``` ### Terraform Configuration Files ```terraform terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 5.81" } } required_version = ">= 1.2.0" } provider "aws" { alias = "east" region = "us-east-2" } resource "aws_resourcegroups_group" "development_group" { name = "development-group" resource_query { query = <<JSON { "ResourceTypeFilters": [ "AWS::AllSupported" ], "TagFilters": [ { "Key": "Stage", "Values": ["Development"] } ] } JSON } } resource "aws_s3_bucket" "dev_assets" { bucket = "driven-dev-assets" provider = aws.east tags = { Name = "DrivenDevAssets" Environment = "Development" ResourceGroup = "driven-dev" } } resource "aws_resourcegroups_resource" "dev_rgr" { group_arn = aws_resourcegroups_group.development_group.arn resource_arn = aws_s3_bucket.dev_assets.arn } ``` ### Debug Output ``` Stack trace from the terraform-provider-aws_v5.81.0_x5 plugin: panic: runtime error: index out of range [1] with length 1 goroutine 85 [running]: github.com/hashicorp/terraform-provider-aws/internal/service/resourcegroups.resourceResourceCreate({0x1197f75a8, 0x140015857a0}, 0x14002f22c00, {0x1194b6ec0, 0x140015ae500}) github.com/hashicorp/terraform-provider-aws/internal/service/resourcegroups/resource.go:66 +0x5d4 github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func9(0x14002f22c00?, {0x1194b6ec0?, 0x140015ae500}) github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x1d8 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1197f75a8?, {0x1197f75a8?, 0x1400127eb70?}, 0xd?, {0x1194b6ec0?, 0x140015ae500?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:801 +0x64 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x140027b0ee0, {0x1197f75a8, 0x1400127eb70}, 0x14003ec3a00, 0x14002f22a80, {0x1194b6ec0, 0x140015ae500}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:937 +0x874 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x14002daa570, {0x1197f75a8?, 0x1400127e990?}, 0x14002f60780) github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/grpc_provider.go:1155 +0xaa4 github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x14001218c00, {0x1197f75a8?, 0x140014156b0?}, 0x14002f60780) github.com/hashicorp/terraform-plugin-mux@v0.17.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x184 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x140006e3860, {0x1197f75a8?, 0x1400441bbc0?}, 0x14000312310) github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/tf5server/server.go:865 +0x2a8 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x119345100, 0x140006e3860}, {0x1197f75a8, 0x1400441bbc0}, 0x14002f22180, 0x0) github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:611 +0x1c0 google.golang.org/grpc.(*Server).processUnaryRPC(0x1400150f200, {0x1197f75a8, 0x1400441bb30}, {0x11987a500, 0x14002212ea0}, 0x14004096360, 0x14002e7c450, 0x1247b8e58, 0x0) google.golang.org/grpc@v1.68.1/server.go:1394 +0xb64 google.golang.org/grpc.(*Server).handleStream(0x1400150f200, {0x11987a500, 0x14002212ea0}, 0x14004096360) google.golang.org/grpc@v1.68.1/server.go:1805 +0xb20 google.golang.org/grpc.(*Server).serveStreams.func2.1() google.golang.org/grpc@v1.68.1/server.go:1029 +0x84 created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 55 google.golang.org/grpc@v1.68.1/server.go:1040 +0x13c Error: The terraform-provider-aws_v5.81.0_x5 plugin crashed! ``` ### Expected Behavior adds an S3 bucket to a resource group ### Actual Behavior plugin crashes ### Steps to Reproduce terraform init terraform apply ### Additional Context if I remove the following block it works: ```terraform resource "aws_resourcegroups_resource" "dev_rgr" { group_arn = aws_resourcegroups_group.development_group.arn resource_arn = aws_s3_bucket.dev_assets.arn } ``` ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.