I need to import an existing aws_cloudwatch_log_stream
(or AWS::Logs::LogStream
in CloudFormation) into my configuration. However, it appears that Terraform does not support this functionality . CloudFormation also doesn't support this functionality, so I can't just wrap it into a mini CloudFormation template.
I don't want to delete and remake my old log stream.
What should I do? What are my options?
This functionality was added in version 2.67.0 of the AWS provider .
You should be able to import a log stream when using that version or greater by running the following command:
terraform import aws_cloudwatch_log_stream.foo Yada:SampleLogStream1234
Original answer:
This pull request was raised today and will add the ability to import Cloudwatch Log Streams in the form of logGroup:logStream
. The documentation provides an example:
terraform import aws_cloudwatch_log_stream.foo Yada:SampleLogStream1234
To be able to use this you can either wait for it to be merged (likely very soon as it's small and the author has contributed a lot to the AWS provider) and then released or you can build the provider yourself from the pull request's forked repo and branch .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.