Skip to content

Commit

Permalink
r/cloudtrail: Prevent default configurations show difference
Browse files Browse the repository at this point in the history
  • Loading branch information
kjmkznr committed Feb 17, 2018
1 parent 28d11a9 commit 1ac5f16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws/resource_aws_cloudtrail.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ func expandAwsCloudTrailEventSelectorDataResource(configured []interface{}) []*c
func flattenAwsCloudTrailEventSelector(configured []*cloudtrail.EventSelector) []map[string]interface{} {
eventSelectors := make([]map[string]interface{}, 0, len(configured))

// Prevent default configurations shows differences
if len(configured) == 1 && len(configured[0].DataResources) == 0 {
return eventSelectors
}

for _, raw := range configured {
item := make(map[string]interface{})
item["read_write_type"] = *raw.ReadWriteType
Expand Down

0 comments on commit 1ac5f16

Please sign in to comment.