Closed shieldnet closed 10 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Hey @shieldnet 👋 Thank you for taking the time to raise this! The aws_cloudwatch_log_resource_policy
resource uses the PutResourcePolicy
function that you linked to, so I believe that it is the resource that you're looking for. The "connection" between that resource and the aws_cloudwatch_log_group
resource is set up via the policy that you specify in the aws_cloudwatch_log_resource_policy.policy_document
argument.
An example very similar to that example you provided in the "Potential Terraform Configurations" section of this issue may be found on the aws_elasticsearch_domain
resource documentation.
Since we haven't heard back, I'm going to close this issue. If you're still having trouble, please feel free to open a new issue, referencing this one for context as needed.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
Problem
I have problem to adjust
aws_cloudwatch_log_resource_policy
toaws_cloudwatch_log_group
to enable CloudWatch Logs with AWS Opensearch Service.As you can see screenshot that I uploaded upper, we can enable
Slow Search Logs
and 3 other kinds of logs to monitoring AOS clusters.However, there is no resources or methods for connecting
CloudWatch Access Policy
to specificCloudWatch Log Group
.Workaround, but not solution with terraform
aws logs put-resouce-policy
command from AWS CLI documentConclusion
aws_cloudwatch_log_resource_policy
toaws_cloudwatch_log_group
.Affected Resource(s) and/or Data Source(s)
Potential Terraform Configuration
References
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/logs/put-resource-policy.html
Would you like to implement a fix?
None