Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support log delivery configuration #162

Closed
stevenpitts opened this issue May 10, 2022 · 0 comments · Fixed by #168
Closed

Support log delivery configuration #162

stevenpitts opened this issue May 10, 2022 · 0 comments · Fixed by #168

Comments

@stevenpitts
Copy link

Describe the Feature

Allow enabling log delivery configuration on ElastiCache Redis clusters provisioned by this module.

Expected Behavior

There would be an input or set of inputs to this module that specify log delivery configuration. These inputs would be transformed and passed as log_delivery_configuration blocks to the aws_elasticache_replication_group resource.

Use Case

I was having issues connecting to my ElastiCache Redis cluster provisioned by this module, and I figured enabling logs might help debug the issue. Unfortunately, I learned that there is no way to configure this in the module, so I had to manually enable log delivery temporarily. Of course, this makes Terraform state stale until I disable log delivery.

Describe Ideal Solution

A list(map(string)) input named log_delivery_configuration_blocks or similar, which is provided to aws_elasticache_replication_group.default via a dynamic block as log_delivery_configuration blocks.
I'm not particularly attached to this specific solution.

Alternatives Considered

I considered enabling log delivery manually and having Terraform ignore changes to aws_elasticache_replication_group.default's log_delivery_configuration blocks, but I don't believe I have the ability to configure that external of the module.

I looked into whether there is an alternate Terraform AWS resource like aws_elasticache_replication_group_log_delivery_configuration which would be resource-based rather than attribute-based (such as s3_bucket's logging field versus the s3_bucket_logging resource), which I could provision outside of the module, but it appears no such resource exists.

Additional Context

Snippet of Terraform wanting to revert my manual changes of enabling log delivery:

- log_delivery_configuration {
    - destination      = "REDACTED" -> null
    - destination_type = "cloudwatch-logs" -> null
    - log_format       = "json" -> null
    - log_type         = "engine-log" -> null
  }
- log_delivery_configuration {
    - destination      = "REDACTED" -> null
    - destination_type = "cloudwatch-logs" -> null
    - log_format       = "json" -> null
    - log_type         = "slow-log" -> null
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant