scribd / terraform-aws-datadog

Terraform module for setting up AWS Datadog integration
https://registry.terraform.io/modules/scribd/datadog/aws/1.0.0
MIT License
38 stars 30 forks source link

It is possible to use this module without specifying an aws_account_id #8

Open jim80net opened 4 years ago

jim80net commented 4 years ago

This breaks when enable_aws_integration is not true.

houqp commented 4 years ago

https://github.com/scribd/terraform-aws-datadog/blob/master/examples/cloudwatch_log_sync/main.tf is already using it without account id isn't it?

jim80net commented 4 years ago

I misrepresented the conditions for error. The module accepts invalid parameters:

I would want the module to reject this misconfiguration, rather than what it currently does, which is create a datadog aws integration with no aws_account value.

houqp commented 4 years ago

I see, yeah, that's a valid bug. alternatively, we can pull default aws account id withiin the datadog module if account_id is not provided but aws_integration is enabled.