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

tf crash while while 'apply' with notification_config { } blanked out #23241

Closed
romechax opened this issue Oct 31, 2019 · 3 comments
Closed

tf crash while while 'apply' with notification_config { } blanked out #23241

romechax opened this issue Oct 31, 2019 · 3 comments

Comments

@romechax
Copy link

Terraform Version

Terraform v0.12.12

Terraform Configuration Files

resource "aws_ssm_maintenance_window" "window" {
  name     = "test-maint-window-romeo1-tf"
  schedule = "cron(0 16 ? * TUE *)"
  duration = 3
  cutoff   = 1
}

resource "aws_ssm_maintenance_window_target" "target1" {
  window_id     = "${aws_ssm_maintenance_window.window.id}"
  name          = "maintenance-window-target-test-1"
  description   = "This is a maintenance window target"
  resource_type = "INSTANCE"

  targets {
    key    = "tag:app:name"
    values = ["${var.app-name}"]
  }
}

resource "aws_ssm_maintenance_window_task" "task" {
  window_id        = "${aws_ssm_maintenance_window.window.id}"
  name             = "maintenance-window-task"
  description      = "This is a maintenance window task"
  task_type        = "RUN_COMMAND"
  task_arn         = "AWS-RunPatchBaseline"
  priority         = 1
  service_role_arn = "${var.service-role}"  #this is SSM Role
  max_concurrency  = "2"
  max_errors       = "1"

  targets {
    key    = "WindowTargetIds"
    values = ["${aws_ssm_maintenance_window_target.target1.id}"]
  }

  task_invocation_parameters {
    run_command_parameters {
      output_s3_bucket     = "${var.s3-bucket-name}" #S3 bucket 
      #output_s3_key_prefix = "output"
      service_role_arn     = "${var.service-role}"
      timeout_seconds      = 600
      
      notification_config {
          }
        parameter {
        name   = "Operation"
        values = ["Install"]
      }
    }
 }
}

Debug Output

Crash Output

Expected Behavior

Actual Behavior

Steps to Reproduce

Additional Context

References

@ghost ghost added bug crash labels Oct 31, 2019
@romechax
Copy link
Author

Crash Report -

Plan: 0 to add, 1 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

aws_ssm_maintenance_window_task.task: Modifying... [id=24b8b4d4-934b-41ab-8c43-ea1fe2c5af3c]

Error: rpc error: code = Unavailable desc = transport is closing

panic: interface conversion: interface {} is nil, not map[string]interface {}
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe:
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: goroutine 30 [running]:
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: github.com/terraform-providers/terraform-provider-aws/aws.expandAwsSsmTaskInvocationRunCommandParametersNotificationConfig(0xc000a031c0, 0x1, 0x1, 0x13)
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go:576 +0x30d
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: github.com/terraform-providers/terraform-provider-aws/aws.expandAwsSsmTaskInvocationRunCommandParameters(0xc000a031a0, 0x1, 0x1, 0x16)
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go:494 +0x632
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: github.com/terraform-providers/terraform-provider-aws/aws.expandAwsSsmTaskInvocationParameters(0xc000a03180, 0x1, 0x1, 0x3d961a0)
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go:395 +0x48c
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsSsmMaintenanceWindowTaskUpdate(0xc0003abb20, 0x3d3f8a0, 0xc00030ad80, 0x24, 0x7f1d1e0)
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/src/github.com/terraform-providers/terraform-provider-aws/aws/resource_aws_ssm_maintenance_window_task.go:780 +0x894
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc0005f8b00, 0xc0008e0b40, 0xc0009793e0, 0x3d3f8a0, 0xc00030ad80, 0xc0005c1101, 0xc0009a0900, 0x40ef68)
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/helper/schema/resource.go:311 +0x26a
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc0006a3900, 0xc0009b1918, 0xc0008e0b40, 0xc0009793e0, 0xc00095f3a8, 0xc000b0f310, 0x427f5c0)
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/helper/schema/provider.go:294 +0xa0
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc0000071c0, 0x556c6c0, 0xc000780c00, 0xc00011dbc0, 0xc0000071c0, 0xc000780c00, 0xc00064fa80)
2019-10-31T11:51:25.454+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:885 +0x889
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler(0x4bc88c0, 0xc0000071c0, 0x556c6c0, 0xc000780c00, 0xc00011db60, 0x0, 0x556c6c0, 0xc000780c00, 0xc0008b2000, 0x9d2)
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3189 +0x21e
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000ca160, 0x558bfa0, 0xc000504c00, 0xc000846700, 0xc000870b70, 0x7ef15a0, 0x0, 0x0, 0x0)
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:995 +0x467
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: google.golang.org/grpc.(*Server).handleStream(0xc0000ca160, 0x558bfa0, 0xc000504c00, 0xc000846700, 0x0)
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:1275 +0xd9e
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc000536470, 0xc0000ca160, 0x558bfa0, 0xc000504c00, 0xc000846700)
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:710 +0xc2
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: created by google.golang.org/grpc.(*Server).serveStreams.func1
2019-10-31T11:51:25.455+0530 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4.exe: /opt/teamcity-agent/work/5d79fe75d4460a2f/pkg/mod/google.golang.org/[email protected]/server.go:708 +0xa8
2019/10/31 11:51:25 [DEBUG] aws_ssm_maintenance_window_task.task: apply errored, but we're indicating that via the Error pointer rather than returning it: rpc error: code = Unavailable desc = transport is closing
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalMaybeTainted
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalWriteState
2019/10/31 11:51:25 [TRACE] EvalWriteState: writing current state object for aws_ssm_maintenance_window_task.task
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalApplyProvisioners
2019/10/31 11:51:25 [TRACE] EvalApplyProvisioners: aws_ssm_maintenance_window_task.task is not freshly-created, so no provisioning is required
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalMaybeTainted
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalWriteState
2019/10/31 11:51:25 [TRACE] EvalWriteState: writing current state object for aws_ssm_maintenance_window_task.task
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalIf
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalIf
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalWriteDiff
2019/10/31 11:51:25 [TRACE] : eval: *terraform.EvalApplyPost
2019/10/31 11:51:25 [ERROR] : eval: *terraform.EvalApplyPost, err: rpc error: code = Unavailable desc = transport is closing
2019/10/31 11:51:25 [ERROR] : eval: *terraform.EvalSequence, err: rpc error: code = Unavailable desc = transport is closing
2019/10/31 11:51:25 [TRACE] [walkApply] Exiting eval tree: aws_ssm_maintenance_window_task.task
2019/10/31 11:51:25 [TRACE] vertex "aws_ssm_maintenance_window_task.task": visit complete
2019/10/31 11:51:25 [TRACE] dag/walk: upstream of "provider.aws (close)" errored, so skipping
2019/10/31 11:51:25 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2019/10/31 11:51:25 [TRACE] dag/walk: upstream of "root" errored, so skipping
2019/10/31 11:51:25 [TRACE] statemgr.Filesystem: not making a backup, because the new snapshot is identical to the old
2019/10/31 11:51:25 [TRACE] statemgr.Filesystem: no state changes since last snapshot
2019/10/31 11:51:25 [TRACE] statemgr.Filesystem: writing snapshot at terraform.tfstate
2019/10/31 11:51:25 [TRACE] statemgr.Filesystem: removing lock metadata file .terraform.tfstate.lock.info
2019/10/31 11:51:25 [TRACE] statemgr.Filesystem: unlocked by closing terraform.tfstate
2019-10-31T11:51:25.477+0530 [DEBUG] plugin: plugin process exited: path="D:\UserData\z0041faa\Documents\Project\Mosaic\SSM Implementation\Tf-scripts.terraform\plugins\windows_amd64\terraform-provider-aws_v2.33.0_x4.exe" pid=388876 error="exit status 2"
2019-10-31T11:51:25.482+0530 [DEBUG] plugin: plugin exited

!!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!!

@ghost
Copy link

ghost commented Oct 31, 2019

This issue has been automatically migrated to hashicorp/terraform-provider-aws#10702 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#10702.

@ghost
Copy link

ghost commented Mar 29, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants