Skip to content

Commit

Permalink
resource/aws_elasticsearch_domain: Replace enum of possible log types…
Browse files Browse the repository at this point in the history
… with `LogType_Values()`

This enables support for the new `AUDIT_LOGS` log type.

Fixes #15217.
  • Loading branch information
reedloden committed Sep 18, 2020
1 parent 121ffc2 commit a4b3fb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions aws/resource_aws_elasticsearch_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,9 @@ func resourceAwsElasticSearchDomain() *schema.Resource {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"log_type": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
elasticsearch.LogTypeIndexSlowLogs,
elasticsearch.LogTypeSearchSlowLogs,
elasticsearch.LogTypeEsApplicationLogs,
}, false),
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(elasticsearch.LogType_Values(), false),
},
"cloudwatch_log_group_arn": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/elasticsearch_domain.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Security Groups and Subnets referenced in these attributes must all be within th

**log_publishing_options** supports the following attribute:

* `log_type` - (Required) A type of Elasticsearch log. Valid values: INDEX_SLOW_LOGS, SEARCH_SLOW_LOGS, ES_APPLICATION_LOGS
* `log_type` - (Required) A type of Elasticsearch log. Valid values: INDEX_SLOW_LOGS, SEARCH_SLOW_LOGS, ES_APPLICATION_LOGS, AUDIT_LOGS
* `cloudwatch_log_group_arn` - (Required) ARN of the Cloudwatch log group to which log needs to be published.
* `enabled` - (Optional, Default: true) Specifies whether given log publishing option is enabled or not.

Expand Down

0 comments on commit a4b3fb0

Please sign in to comment.