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

[Bug]: Plugin Crash with aws_emr_cluster Resource #38276

Closed
yogeshselvarajan opened this issue Jul 7, 2024 · 5 comments · Fixed by #38773
Closed

[Bug]: Plugin Crash with aws_emr_cluster Resource #38276

yogeshselvarajan opened this issue Jul 7, 2024 · 5 comments · Fixed by #38773
Assignees
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/emr Issues and PRs that pertain to the emr service.
Milestone

Comments

@yogeshselvarajan
Copy link

yogeshselvarajan commented Jul 7, 2024

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

@yogeshselvarajan yogeshselvarajan added the bug Addresses a defect in current functionality. label Jul 7, 2024
Copy link

github-actions bot commented Jul 7, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added crash Results from or addresses a Terraform crash or kernel panic. service/emr Issues and PRs that pertain to the emr service. service/iam Issues and PRs that pertain to the iam service. labels Jul 7, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jul 7, 2024
@justinretzolk justinretzolk removed service/iam Issues and PRs that pertain to the iam service. needs-triage Waiting for first response or review from a maintainer. labels Jul 10, 2024
@yogeshselvarajan
Copy link
Author

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

@jar-b jar-b self-assigned this Aug 8, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 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.62.0 milestone Aug 8, 2024
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 2024

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!

Copy link

github-actions bot commented Sep 9, 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 Sep 9, 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/emr Issues and PRs that pertain to the emr service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants