Skip to content

Commit

Permalink
Avoid crash on empty redshift's S3BackupDescription
Browse files Browse the repository at this point in the history
Fixes #3006
  • Loading branch information
radeksimko committed Jan 17, 2018
1 parent e4c7cc0 commit 126c36d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aws/resource_aws_kinesis_firehose_delivery_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,12 @@ func flattenKinesisFirehoseDeliveryStream(d *schema.ResourceData, s *firehose.De
"copy_options": *destination.RedshiftDestinationDescription.CopyCommand.CopyOptions,
"data_table_columns": *destination.RedshiftDestinationDescription.CopyCommand.DataTableColumns,
"s3_backup_mode": *destination.RedshiftDestinationDescription.S3BackupMode,
"s3_backup_configuration": flattenFirehoseS3Configuration(*destination.RedshiftDestinationDescription.S3BackupDescription),
"retry_duration": *destination.RedshiftDestinationDescription.RetryOptions.DurationInSeconds,
"cloudwatch_logging_options": flattenCloudwatchLoggingOptions(*destination.RedshiftDestinationDescription.CloudWatchLoggingOptions),
}
if s3bd := destination.RedshiftDestinationDescription.S3BackupDescription; s3bd != nil {
redshiftConfiguration["s3_backup_configuration"] = flattenFirehoseS3Configuration(*s3bd)
}
redshiftConfList := make([]map[string]interface{}, 1)
redshiftConfList[0] = redshiftConfiguration
d.Set("redshift_configuration", redshiftConfList)
Expand Down

0 comments on commit 126c36d

Please sign in to comment.