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.76k stars 9.11k forks source link

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

Closed ghost closed 4 years ago

ghost commented 4 years ago

This issue was originally opened by @romechax as hashicorp/terraform#23241. It was migrated here as a result of the provider split. The original body of the issue is below.


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

bflad commented 4 years ago

The fix for this has been merged and will release with version 2.35.0 of the Terraform AWS Provider, tomorrow. 👍

ghost commented 4 years ago

This has been released in version 2.35.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 for triage. Thanks!

ghost commented 4 years 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!