terraform-aws-documentdb-cluster
terraform-aws-documentdb-cluster copied to clipboard
enabled_cloudwatch_logs_exports description is incorrect
Describe the Bug
The input variable enabled_cloudwatch_logs_exports description is incorrect compared to the the Terraform AWS provider version 3.47.0. Resource: aws_docdb_cluster enabled_cloudwatch_logs_exports states:
enabled_cloudwatch_logs_exports - (Optional) List of log types to export to cloudwatch. If omitted, no logs will be exported. The following log types are supported: audit, profiler.
The resulting error is:
Error: expected enabled_cloudwatch_logs_exports.1 to be one of [audit profiler], got error
on .terraform/modules/documentdb_cluster/main.tf line 63, in resource "aws_docdb_cluster" "default":
63: enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
Expected Behavior
Variable documentation should not contradict the AWS provider's capabilities.
Steps to Reproduce
Steps to reproduce the behavior:
- Set module input to
enabled_cloudwatch_logs_exports = ["audit", "error", "general", "slowquery"] - Run 'terraform plan'
- See error
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
- Module Version: 0.13.0
$ terraform version
Terraform v0.13.7
+ provider registry.terraform.io/hashicorp/aws v3.46.0
+ provider registry.terraform.io/hashicorp/external v2.1.0
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
I was coming to say the same thing :-D
Still an issue, fyi, using tf 1.0.9
Still having this issue :
module.documentdb-cluster.aws_docdb_cluster.default[0]: Refreshing state... [id=*******************************]
╷
│ Error: expected enabled_cloudwatch_logs_exports.1 to be one of [audit profiler], got error
│
│ with module.documentdb-cluster.aws_docdb_cluster.default[0],
│ on .terraform/modules/documentdb-cluster/main.tf line 69, in resource "aws_docdb_cluster" "default":
│ 69: enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
│
╵
╷
│ Error: expected enabled_cloudwatch_logs_exports.2 to be one of [audit profiler], got general
│
│ with module.documentdb-cluster.aws_docdb_cluster.default[0],
│ on .terraform/modules/documentdb-cluster/main.tf line 69, in resource "aws_docdb_cluster" "default":
│ 69: enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
│
╵
╷
│ Error: expected enabled_cloudwatch_logs_exports.3 to be one of [audit profiler], got slowquery
│
│ with module.documentdb-cluster.aws_docdb_cluster.default[0],
│ on .terraform/modules/documentdb-cluster/main.tf line 69, in resource "aws_docdb_cluster" "default":
│ 69: enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
│
╵
ERROR: Job failed: exit code 1
The solution is to apply possibles values from aws Doc :
-- logs_exports = ["audit","error","general","slowquery"]
=>
++ logs_exports = ["audit","profiler"]
Please consider updating your ReadME with this.
Result :
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# module.documentdb-cluster.aws_docdb_cluster.default[0] will be updated in-place
~ resource "aws_docdb_cluster" "default" {
~ enabled_cloudwatch_logs_exports = [
+ "audit",
+ "profiler",
]