Skip to content

Commit

Permalink
Merge pull request #16260 from ewbankkit/b-kinesisanalytics-applicati…
Browse files Browse the repository at this point in the history
…on-record-column-list

Kinesis Analytics Application (v2): records_column(s) are ordered, so use TypeList not TypeSet
  • Loading branch information
breathingdust authored Nov 24, 2020
2 parents c579584 + c6a7a3a commit 1f44738
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 176 deletions.
12 changes: 6 additions & 6 deletions aws/resource_aws_kinesis_analytics_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"record_columns": {
Type: schema.TypeSet,
Type: schema.TypeList,
Required: true,
MaxItems: 1000,
Elem: &schema.Resource{
Expand Down Expand Up @@ -481,7 +481,7 @@ func resourceAwsKinesisAnalyticsApplication() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"record_columns": {
Type: schema.TypeSet,
Type: schema.TypeList,
Required: true,
MaxItems: 1000,
Elem: &schema.Resource{
Expand Down Expand Up @@ -1248,8 +1248,8 @@ func expandKinesisAnalyticsInputUpdate(vInput []interface{}) *kinesisanalytics.I

mInputSchema := vInputSchema[0].(map[string]interface{})

if vRecordColumns, ok := mInputSchema["record_columns"].(*schema.Set); ok && vRecordColumns.Len() > 0 {
inputSchemaUpdate.RecordColumnUpdates = expandKinesisAnalyticsRecordColumns(vRecordColumns.List())
if vRecordColumns, ok := mInputSchema["record_columns"].([]interface{}); ok {
inputSchemaUpdate.RecordColumnUpdates = expandKinesisAnalyticsRecordColumns(vRecordColumns)
}

if vRecordEncoding, ok := mInputSchema["record_encoding"].(string); ok && vRecordEncoding != "" {
Expand Down Expand Up @@ -1555,8 +1555,8 @@ func expandKinesisAnalyticsSourceSchema(vSourceSchema []interface{}) *kinesisana

mSourceSchema := vSourceSchema[0].(map[string]interface{})

if vRecordColumns, ok := mSourceSchema["record_columns"].(*schema.Set); ok && vRecordColumns.Len() > 0 {
sourceSchema.RecordColumns = expandKinesisAnalyticsRecordColumns(vRecordColumns.List())
if vRecordColumns, ok := mSourceSchema["record_columns"].([]interface{}); ok {
sourceSchema.RecordColumns = expandKinesisAnalyticsRecordColumns(vRecordColumns)
}

if vRecordEncoding, ok := mSourceSchema["record_encoding"].(string); ok && vRecordEncoding != "" {
Expand Down
Loading

0 comments on commit 1f44738

Please sign in to comment.