terraform-aws-datadog icon indicating copy to clipboard operation
terraform-aws-datadog copied to clipboard

It is possible to use this module without specifying an aws_account_id

Open jim80net opened this issue 4 years ago • 3 comments

This breaks when enable_aws_integration is not true.

jim80net avatar Jun 16 '20 21:06 jim80net

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?

houqp avatar Jun 17 '20 08:06 houqp

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

  • enable_aws_integration is true, or the default value (true)
  • aws_account_id is null

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.

jim80net avatar Jun 23 '20 17:06 jim80net

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.

houqp avatar Jun 23 '20 18:06 houqp