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.77k stars 9.12k forks source link

[Bug]: Plugin Crash with aws_emr_cluster Resource #38276

Closed yogeshselvarajan closed 1 month ago

yogeshselvarajan commented 3 months ago

Terraform Core Version

1.8.4

AWS Provider Version

~> 5.0

Affected Resource(s)

When attempting to create an aws_emr_cluster resource using Terraform, the following error occurs:

Error: Plugin did not respond
│
│   with aws_emr_cluster.emr_cluster,
│   on test.tf line 59, in resource "aws_emr_cluster" "emr_cluster":
│   59: resource "aws_emr_cluster" "emr_cluster" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵

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

Expected Behavior

The aws_emr_cluster resource should be created without errors, configuring an EMR cluster as specified in the Terraform configuration.

Actual Behavior

The plugin crashes with the error message mentioned above.

Relevant Error/Panic Output Snippet

goroutine 207 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/emr.readInstanceFleetConfig(0x214fb020, {0x12ef7abb, 0x6})
        github.com/hashicorp/terraform-provider-aws/internal/service/emr/cluster.go:2136 +0x359
github.com/hashicorp/terraform-provider-aws/internal/service/emr.resourceClusterCreate({0x14f08db8, 0x2142e8a0}, 0x21626e10, {0x12eb2340, 0x212ea2a0})
        github.com/hashicorp/terraform-provider-aws/internal/service/emr/cluster.go:857 +0xe0a
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x21626e10, {0x12eb2340, 0x212ea2a0})       
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x28d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x205efb20, {0x14f08db8, 0x21a203d8}, 0x21626e10, {0x12eb2340, 0x212ea2a0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:801 +0x7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x205efb20, {0x14f08db8, 0x21a203d8}, 0x1fdc1c00, 0x21626d20, {0x12eb2340, 0x212ea2a0})  
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:937 +0xac3
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x2128fd30, {0x14f08db8, 0x21a203a8}, 0x1f8f4780)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:1153 +0xeb1
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x21789130, {0x14f08db8, 0x21a202e8}, 0x1f8f4780)
        github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x21789400, {0x14f08db8, 0x21a20048}, 0x201a4380)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:865 +0x439
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x12dd02a0, 0x21789400}, {0x14f08db8, 0x21a20048}, 0x201a4340, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x98
google.golang.org/grpc.(*Server).processUnaryRPC(0x206b0c88, {0x14f08db8, 0x21a20018}, {0x14f2b594, 0x1fca0368}, 0x213c31e8, 0x21370570, 0x1da8c5ac, 0x0)
        google.golang.org/grpc@v1.63.2/server.go:1369 +0xf44
google.golang.org/grpc.(*Server).handleStream(0x206b0c88, {0x14f2b594, 0x1fca0368}, 0x213c31e8)
        google.golang.org/grpc@v1.63.2/server.go:1780 +0x10cf
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.63.2/server.go:1019 +0xaa
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 37
        google.golang.org/grpc@v1.63.2/server.go:1030 +0x12f

Error: The terraform-provider-aws_v5.57.0_x5.exe 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 Configuration Files

terraform apply --auto-approve
data.aws_emr_release_labels.latest_release_label: Reading...
data.aws_emr_release_labels.latest_release_label: Read complete after 2s [id=emr-7.1.0,emr-7.0.0]

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_emr_cluster.emr_cluster will be created
  + resource "aws_emr_cluster" "emr_cluster" {
      + applications                      = [
          + "Spark",
        ]
      + arn                               = (known after apply)
      + cluster_state                     = (known after apply)
      + ebs_root_volume_size              = 15
      + id                                = (known after apply)
      + keep_job_flow_alive_when_no_steps = true
      + log_uri                           = "s3://aws-logs-381492154328-us-east-1/elasticmapreduce"
      + master_public_dns                 = (known after apply)
      + name                              = "PrivateTerraformClusterWithInstanceFleets"
      + release_label                     = "emr-7.1.0"
      + scale_down_behavior               = (known after apply)
      + service_role                      = (known after apply)
      + step                              = (known after apply)
      + step_concurrency_level            = 1
      + tags                              = {
          + "for-use-with-amazon-emr-managed-policies" = "true"
        }
      + tags_all                          = {
          + "for-use-with-amazon-emr-managed-policies" = "true"
        }
      + termination_protection            = false
      + unhealthy_node_replacement        = false
      + visible_to_all_users              = true

      + auto_termination_policy {
          + idle_timeout = 3600
        }

      + core_instance_fleet {
          + id                             = (known after apply)
          + name                           = "Core Instance Fleet"
          + provisioned_on_demand_capacity = (known after apply)
          + provisioned_spot_capacity      = (known after apply)
          + target_on_demand_capacity      = 1
          + target_spot_capacity           = 1

          + instance_type_configs {
              + bid_price_as_percentage_of_on_demand_price = 100
              + instance_type                              = "m5.xlarge"
              + weighted_capacity                          = 4
                # (1 unchanged attribute hidden)

              + ebs_config {
                  + iops                 = 3000
                  + size                 = 64
                  + type                 = "gp3"
                  + volumes_per_instance = 1
                }
            }

          + launch_specifications {
            }
        }

      + ec2_attributes {
          + emr_managed_master_security_group = (known after apply)
          + emr_managed_slave_security_group  = (known after apply)
          + instance_profile                  = (known after apply)
          + service_access_security_group     = (known after apply)
          + subnet_id                         = "subnet-003617caa860c1043"
          + subnet_ids                        = (known after apply)
            # (2 unchanged attributes hidden)
        }

      + master_instance_fleet {
          + id                             = (known after apply)
          + name                           = "Primary Instance Fleet"
          + provisioned_on_demand_capacity = (known after apply)
          + provisioned_spot_capacity      = (known after apply)
          + target_on_demand_capacity      = 1
          + target_spot_capacity           = 1

          + instance_type_configs {
              + bid_price_as_percentage_of_on_demand_price = 100
              + instance_type                              = "m5.xlarge"
              + weighted_capacity                          = 1
                # (1 unchanged attribute hidden)

              + ebs_config {
                  + iops                 = 3000
                  + size                 = 64
                  + type                 = "gp3"
                  + volumes_per_instance = 1
                }
            }

          + launch_specifications {
            }
        }
    }

  # aws_iam_instance_profile.emr_instance_profile will be created
  + resource "aws_iam_instance_profile" "emr_instance_profile" {
      + arn         = (known after apply)
      + create_date = (known after apply)
      + id          = (known after apply)
      + name        = "EMR_Terraform_Instance_Profile"
      + name_prefix = (known after apply)
      + path        = "/"
      + role        = "EMR_Terraform_Instance_Role"
      + tags_all    = (known after apply)
      + unique_id   = (known after apply)
    }

  # aws_iam_role.emr_instance_role will be created
  + resource "aws_iam_role" "emr_instance_role" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "ec2.amazonaws.com"
                        }
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + force_detach_policies = false
      + id                    = (known after apply)
      + managed_policy_arns   = (known after apply)
      + max_session_duration  = 3600
      + name                  = "EMR_Terraform_Instance_Role"
      + name_prefix           = (known after apply)
      + path                  = "/"
      + tags_all              = (known after apply)
      + unique_id             = (known after apply)
    }

  # aws_iam_role.emr_service_role will be created
  + resource "aws_iam_role" "emr_service_role" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "elasticmapreduce.amazonaws.com"
                        }
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + force_detach_policies = false
      + id                    = (known after apply)
      + managed_policy_arns   = (known after apply)
      + max_session_duration  = 3600
      + name                  = "EMR_Terraform_Service_Role"
      + name_prefix           = (known after apply)
      + path                  = "/"
      + tags_all              = (known after apply)
      + unique_id             = (known after apply)
    }

  # aws_iam_role_policy_attachment.emr_instance_role_policy will be created
  + resource "aws_iam_role_policy_attachment" "emr_instance_role_policy" {
      + id         = (known after apply)
      + policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role"
      + role       = "EMR_Terraform_Instance_Role"
    }

  # aws_iam_role_policy_attachment.emr_service_role_policy will be created
  + resource "aws_iam_role_policy_attachment" "emr_service_role_policy" {
      + id         = (known after apply)
      + policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceRole"
      + role       = "EMR_Terraform_Service_Role"
    }

Plan: 6 to add, 0 to change, 0 to destroy.
aws_iam_role.emr_instance_role: Creating...
aws_iam_role.emr_service_role: Creating...
aws_iam_role.emr_service_role: Creation complete after 3s [id=EMR_Terraform_Service_Role]
aws_iam_role.emr_instance_role: Creation complete after 3s [id=EMR_Terraform_Instance_Role]
aws_iam_role_policy_attachment.emr_instance_role_policy: Creating...
aws_iam_role_policy_attachment.emr_service_role_policy: Creating...
aws_iam_instance_profile.emr_instance_profile: Creating...
aws_iam_role_policy_attachment.emr_service_role_policy: Creation complete after 1s [id=EMR_Terraform_Service_Role-20240707172104681300000001]
aws_iam_role_policy_attachment.emr_instance_role_policy: Creation complete after 1s [id=EMR_Terraform_Instance_Role-20240707172104832800000002]
aws_iam_instance_profile.emr_instance_profile: Creation complete after 2s [id=EMR_Terraform_Instance_Profile]
aws_emr_cluster.emr_cluster: Creating...
╷
│ Error: Plugin did not respond
│
│   with aws_emr_cluster.emr_cluster,
│   on test.tf line 59, in resource "aws_emr_cluster" "emr_cluster":
│   59: resource "aws_emr_cluster" "emr_cluster" {
│
│ 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_v5.57.0_x5.exe plugin:

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

goroutine 207 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/emr.readInstanceFleetConfig(0x214fb020, {0x12ef7abb, 0x6})
        github.com/hashicorp/terraform-provider-aws/internal/service/emr/cluster.go:2136 +0x359
github.com/hashicorp/terraform-provider-aws/internal/service/emr.resourceClusterCreate({0x14f08db8, 0x2142e8a0}, 0x21626e10, {0x12eb2340, 0x212ea2a0})
        github.com/hashicorp/terraform-provider-aws/internal/service/emr/cluster.go:857 +0xe0a
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x21626e10, {0x12eb2340, 0x212ea2a0})       
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x28d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x205efb20, {0x14f08db8, 0x21a203d8}, 0x21626e10, {0x12eb2340, 0x212ea2a0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:801 +0x7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x205efb20, {0x14f08db8, 0x21a203d8}, 0x1fdc1c00, 0x21626d20, {0x12eb2340, 0x212ea2a0})  
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:937 +0xac3
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x2128fd30, {0x14f08db8, 0x21a203a8}, 0x1f8f4780)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:1153 +0xeb1
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x21789130, {0x14f08db8, 0x21a202e8}, 0x1f8f4780)
        github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x21789400, {0x14f08db8, 0x21a20048}, 0x201a4380)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:865 +0x439
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x12dd02a0, 0x21789400}, {0x14f08db8, 0x21a20048}, 0x201a4340, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x98
google.golang.org/grpc.(*Server).processUnaryRPC(0x206b0c88, {0x14f08db8, 0x21a20018}, {0x14f2b594, 0x1fca0368}, 0x213c31e8, 0x21370570, 0x1da8c5ac, 0x0)
        google.golang.org/grpc@v1.63.2/server.go:1369 +0xf44
google.golang.org/grpc.(*Server).handleStream(0x206b0c88, {0x14f2b594, 0x1fca0368}, 0x213c31e8)
        google.golang.org/grpc@v1.63.2/server.go:1780 +0x10cf
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.63.2/server.go:1019 +0xaa
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 37
        google.golang.org/grpc@v1.63.2/server.go:1030 +0x12f

Error: The terraform-provider-aws_v5.57.0_x5.exe 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.

Steps to Reproduce

terraform apply --auto-approve
data.aws_emr_release_labels.latest_release_label: Reading...
data.aws_emr_release_labels.latest_release_label: Read complete after 2s [id=emr-7.1.0,emr-7.0.0]

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_emr_cluster.emr_cluster will be created
  + resource "aws_emr_cluster" "emr_cluster" {
      + applications                      = [
          + "Spark",
        ]
      + arn                               = (known after apply)
      + cluster_state                     = (known after apply)
      + ebs_root_volume_size              = 15
      + id                                = (known after apply)
      + keep_job_flow_alive_when_no_steps = true
      + log_uri                           = "s3://aws-logs-381492154328-us-east-1/elasticmapreduce"
      + master_public_dns                 = (known after apply)
      + name                              = "PrivateTerraformClusterWithInstanceFleets"
      + release_label                     = "emr-7.1.0"
      + scale_down_behavior               = (known after apply)
      + service_role                      = (known after apply)
      + step                              = (known after apply)
      + step_concurrency_level            = 1
      + tags                              = {
          + "for-use-with-amazon-emr-managed-policies" = "true"
        }
      + tags_all                          = {
          + "for-use-with-amazon-emr-managed-policies" = "true"
        }
      + termination_protection            = false
      + unhealthy_node_replacement        = false
      + visible_to_all_users              = true

      + auto_termination_policy {
          + idle_timeout = 3600
        }

      + core_instance_fleet {
          + id                             = (known after apply)
          + name                           = "Core Instance Fleet"
          + provisioned_on_demand_capacity = (known after apply)
          + provisioned_spot_capacity      = (known after apply)
          + target_on_demand_capacity      = 1
          + target_spot_capacity           = 1

          + instance_type_configs {
              + bid_price_as_percentage_of_on_demand_price = 100
              + instance_type                              = "m5.xlarge"
              + weighted_capacity                          = 4
                # (1 unchanged attribute hidden)

              + ebs_config {
                  + iops                 = 3000
                  + size                 = 64
                  + type                 = "gp3"
                  + volumes_per_instance = 1
                }
            }

          + launch_specifications {
            }
        }

      + ec2_attributes {
          + emr_managed_master_security_group = (known after apply)
          + emr_managed_slave_security_group  = (known after apply)
          + instance_profile                  = (known after apply)
          + service_access_security_group     = (known after apply)
          + subnet_id                         = "subnet-003617caa860c1043"
          + subnet_ids                        = (known after apply)
            # (2 unchanged attributes hidden)
        }

      + master_instance_fleet {
          + id                             = (known after apply)
          + name                           = "Primary Instance Fleet"
          + provisioned_on_demand_capacity = (known after apply)
          + provisioned_spot_capacity      = (known after apply)
          + target_on_demand_capacity      = 1
          + target_spot_capacity           = 1

          + instance_type_configs {
              + bid_price_as_percentage_of_on_demand_price = 100
              + instance_type                              = "m5.xlarge"
              + weighted_capacity                          = 1
                # (1 unchanged attribute hidden)

              + ebs_config {
                  + iops                 = 3000
                  + size                 = 64
                  + type                 = "gp3"
                  + volumes_per_instance = 1
                }
            }

          + launch_specifications {
            }
        }
    }

  # aws_iam_instance_profile.emr_instance_profile will be created
  + resource "aws_iam_instance_profile" "emr_instance_profile" {
      + arn         = (known after apply)
      + create_date = (known after apply)
      + id          = (known after apply)
      + name        = "EMR_Terraform_Instance_Profile"
      + name_prefix = (known after apply)
      + path        = "/"
      + role        = "EMR_Terraform_Instance_Role"
      + tags_all    = (known after apply)
      + unique_id   = (known after apply)
    }

  # aws_iam_role.emr_instance_role will be created
  + resource "aws_iam_role" "emr_instance_role" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "ec2.amazonaws.com"
                        }
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + force_detach_policies = false
      + id                    = (known after apply)
      + managed_policy_arns   = (known after apply)
      + max_session_duration  = 3600
      + name                  = "EMR_Terraform_Instance_Role"
      + name_prefix           = (known after apply)
      + path                  = "/"
      + tags_all              = (known after apply)
      + unique_id             = (known after apply)
    }

  # aws_iam_role.emr_service_role will be created
  + resource "aws_iam_role" "emr_service_role" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "elasticmapreduce.amazonaws.com"
                        }
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + force_detach_policies = false
      + id                    = (known after apply)
      + managed_policy_arns   = (known after apply)
      + max_session_duration  = 3600
      + name                  = "EMR_Terraform_Service_Role"
      + name_prefix           = (known after apply)
      + path                  = "/"
      + tags_all              = (known after apply)
      + unique_id             = (known after apply)
    }

  # aws_iam_role_policy_attachment.emr_instance_role_policy will be created
  + resource "aws_iam_role_policy_attachment" "emr_instance_role_policy" {
      + id         = (known after apply)
      + policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceforEC2Role"
      + role       = "EMR_Terraform_Instance_Role"
    }

  # aws_iam_role_policy_attachment.emr_service_role_policy will be created
  + resource "aws_iam_role_policy_attachment" "emr_service_role_policy" {
      + id         = (known after apply)
      + policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonElasticMapReduceRole"
      + role       = "EMR_Terraform_Service_Role"
    }

Plan: 6 to add, 0 to change, 0 to destroy.
aws_iam_role.emr_instance_role: Creating...
aws_iam_role.emr_service_role: Creating...
aws_iam_role.emr_service_role: Creation complete after 3s [id=EMR_Terraform_Service_Role]
aws_iam_role.emr_instance_role: Creation complete after 3s [id=EMR_Terraform_Instance_Role]
aws_iam_role_policy_attachment.emr_instance_role_policy: Creating...
aws_iam_role_policy_attachment.emr_service_role_policy: Creating...
aws_iam_instance_profile.emr_instance_profile: Creating...
aws_iam_role_policy_attachment.emr_service_role_policy: Creation complete after 1s [id=EMR_Terraform_Service_Role-20240707172104681300000001]
aws_iam_role_policy_attachment.emr_instance_role_policy: Creation complete after 1s [id=EMR_Terraform_Instance_Role-20240707172104832800000002]
aws_iam_instance_profile.emr_instance_profile: Creation complete after 2s [id=EMR_Terraform_Instance_Profile]
aws_emr_cluster.emr_cluster: Creating...
╷
│ Error: Plugin did not respond
│
│   with aws_emr_cluster.emr_cluster,
│   on test.tf line 59, in resource "aws_emr_cluster" "emr_cluster":
│   59: resource "aws_emr_cluster" "emr_cluster" {
│
│ 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_v5.57.0_x5.exe plugin:

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

goroutine 207 [running]:
github.com/hashicorp/terraform-provider-aws/internal/service/emr.readInstanceFleetConfig(0x214fb020, {0x12ef7abb, 0x6})
        github.com/hashicorp/terraform-provider-aws/internal/service/emr/cluster.go:2136 +0x359
github.com/hashicorp/terraform-provider-aws/internal/service/emr.resourceClusterCreate({0x14f08db8, 0x2142e8a0}, 0x21626e10, {0x12eb2340, 0x212ea2a0})
        github.com/hashicorp/terraform-provider-aws/internal/service/emr/cluster.go:857 +0xe0a
github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Create.interceptedHandler[...].func8(0x21626e10, {0x12eb2340, 0x212ea2a0})       
        github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x28d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x205efb20, {0x14f08db8, 0x21a203d8}, 0x21626e10, {0x12eb2340, 0x212ea2a0})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:801 +0x7e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x205efb20, {0x14f08db8, 0x21a203d8}, 0x1fdc1c00, 0x21626d20, {0x12eb2340, 0x212ea2a0})  
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:937 +0xac3
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x2128fd30, {0x14f08db8, 0x21a203a8}, 0x1f8f4780)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:1153 +0xeb1
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x21789130, {0x14f08db8, 0x21a202e8}, 0x1f8f4780)
        github.com/hashicorp/terraform-plugin-mux@v0.16.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x1d6
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x21789400, {0x14f08db8, 0x21a20048}, 0x201a4380)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:865 +0x439
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x12dd02a0, 0x21789400}, {0x14f08db8, 0x21a20048}, 0x201a4340, 0x0)
        github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:518 +0x98
google.golang.org/grpc.(*Server).processUnaryRPC(0x206b0c88, {0x14f08db8, 0x21a20018}, {0x14f2b594, 0x1fca0368}, 0x213c31e8, 0x21370570, 0x1da8c5ac, 0x0)
        google.golang.org/grpc@v1.63.2/server.go:1369 +0xf44
google.golang.org/grpc.(*Server).handleStream(0x206b0c88, {0x14f2b594, 0x1fca0368}, 0x213c31e8)
        google.golang.org/grpc@v1.63.2/server.go:1780 +0x10cf
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        google.golang.org/grpc@v1.63.2/server.go:1019 +0xaa
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 37
        google.golang.org/grpc@v1.63.2/server.go:1030 +0x12f

Error: The terraform-provider-aws_v5.57.0_x5.exe 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.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

github-actions[bot] commented 3 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

yogeshselvarajan commented 2 months ago

@justinretzolk Any update on this .. How to fix the same??

github-actions[bot] commented 1 month ago

[!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[bot] commented 1 month ago

This functionality has been released in v5.62.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!

github-actions[bot] commented 3 weeks 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.