-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
FR: data/aws_cloudwatch_log_group #3247
Comments
Hi @jkroepke, you specifically are mentioning the following:
In Terraform's configuration model this is handled by a resource, not a data source. Think of data sources as read-only information about AWS itself or your infrastructure. The documentation for the existing With an example configuration such as: resource "aws_api_gateway_rest_api" "example" {
name = "example"
# ... other configuration ...
}
resource "aws_api_gateway_stage" "example" {
stage_name = "example"
rest_api_id = "${aws_api_gateway_rest_api.example.id}"
# ... other configuration ...
}
# This should work as a configuration when importing (it if it exists)
# However, could have issues if being created the same time as above
resource "aws_cloudwatch_log_group" "example" {
name = "API-Gateway-Execution-Logs_${aws_api_gateway_rest_api.example.id}/${aws_api_gateway_stage.example.stage_name}"
# ... other configuration ...
} You might be have some trouble doing this automatically when the API Gateway is created at the same time as the CloudWatch log group though. AWS might create the log group automatically before Terraform does, in which Terraform will throw an error on creating the log group. If that is your situation, please let us know. |
The |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Terraform v0.11.3
Affected Resource(s)
Please list the resources as a list, for example:
Hi,
For the API Gateway, amazon create automaticly Cloudwatch Log Groups based on the aws gw id (e.g.)
I want to import the Log Group and apply additional configurations. Thats why i'm need the aws_cloudwatch_log_group data source.
The text was updated successfully, but these errors were encountered: