我需要将现有的aws_cloudwatch_log_stream
(或CloudFormation中的AWS::Logs::LogStream
导入)到我的配置中。但是,it appears that Terraform does not support this functionality。 CloudFormation也不支持此功能,因此我不能仅将其包装到一个小型CloudFormation模板中。
我不想删除并重新制作旧的日志流。
我该怎么办?我有什么选择?
This pull request今天提出,将增加以logGroup:logStream
形式导入Cloudwatch Log Streams的功能。该文档提供了一个示例:
terraform import aws_cloudwatch_log_stream.foo Yada:SampleLogStream1234
要使用此功能,您可以等待它被合并(可能很小,可能很快,因为作者为AWS提供程序做出了很大贡献),然后发布,或者您可以根据the pull request's forked repo and branch自己构建提供程序。