-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
aws_datasync_task accepts a CloudWatch log group but does not enable logging #14666
Comments
Workaround: resource "aws_datasync_task" "main" {
...
# Sets the task LogLevel: OFF, BASIC or TRANSFER (default is OFF)
# TODO: Remove this workaround when support is in Terraform, see terraform-providers/terraform-provider-aws#14666
provisioner "local-exec" {
command = "aws datasync update-task --task-arn ${self.arn} --options LogLevel=TRANSFER"
}
} |
Thank you for the workaround, I also had to do something similar for transfer mode:
|
Thanks for the heads up @mattdrees! Closing. |
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. |
Community Note
Terraform CLI and Terraform AWS Provider Version
I'm a little out of date but I have verified from the source that the same issue would exist as the ability to set the
LogLevel
option doesn't exist and the AWS default isOFF
.Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Datasync task is created with logging enabled to the supplied CloudWatch log group.
Actual Behavior
Datasync task is created, but logging is disabled:
The CloudWatch log group ARN is saved, but user must manually enable logging via the CLI (or AWS console) afterwards, eg.:
Steps to Reproduce
terraform apply
Important Factoids
This is technically a request for supporting the LogLevel option, and could be implemented as follows:
I've logged it as a bug rather than a feature as it was unexpected behaviour to be able to provide a
cloudwatch_log_group_arn
but have logging turnedOFF
and not be able to be configured via Terraform. Apologies if this should have been a feature instead, I think it could go both ways really!References
Other
aws_datasync_task
feature requests:The text was updated successfully, but these errors were encountered: