Skip to content

Commit

Permalink
Add enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushi-ishibashi committed Dec 7, 2017
1 parent d4fbe9c commit cbc79a6
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions aws/resource_aws_elasticsearch_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ func resourceAwsElasticSearchDomain() *schema.Resource {
Type: schema.TypeString,
Required: true,
},
"enabled": {
Type: schema.TypeBool,
Optional: true,
Default: true,
},
},
},
},
Expand Down Expand Up @@ -340,7 +345,10 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface
options := v.(*schema.Set).List()
for _, vv := range options {
lo := vv.(map[string]interface{})
input.LogPublishingOptions[lo["log_type"].(string)] = &elasticsearch.LogPublishingOption{CloudWatchLogsLogGroupArn: aws.String(lo["cloud_watch_logs_log_group_arn"].(string)), Enabled: aws.Bool(true)}
input.LogPublishingOptions[lo["log_type"].(string)] = &elasticsearch.LogPublishingOption{
CloudWatchLogsLogGroupArn: aws.String(lo["cloud_watch_logs_log_group_arn"].(string)),
Enabled: aws.Bool(lo["enabled"].(bool)),
}
}
}

Expand Down Expand Up @@ -587,7 +595,10 @@ func resourceAwsElasticSearchDomainUpdate(d *schema.ResourceData, meta interface
options := d.Get("log_publishing_options").(*schema.Set).List()
for _, vv := range options {
lo := vv.(map[string]interface{})
input.LogPublishingOptions[lo["log_type"].(string)] = &elasticsearch.LogPublishingOption{CloudWatchLogsLogGroupArn: aws.String(lo["cloud_watch_logs_log_group_arn"].(string))}
input.LogPublishingOptions[lo["log_type"].(string)] = &elasticsearch.LogPublishingOption{
CloudWatchLogsLogGroupArn: aws.String(lo["cloud_watch_logs_log_group_arn"].(string)),
Enabled: aws.Bool(lo["enabled"].(bool)),
}
}
}

Expand Down

0 comments on commit cbc79a6

Please sign in to comment.