variable "environment" {
  type        = string
  description = "Name of the environment, e.g. dev, qa, prod"
}

variable "service_name" {
  type        = string
  description = "Name of the service."
  default     = "datadog-aws-integration"
}

variable "application_family" {
  type        = string
  description = "The name of the application family."
  default     = "devops"
}

variable "aws_role_name" {
  type        = string
  description = "The name of the AWS IAM role to be created for the Datadog integration"
  default     = "datadog-integration-role"
}

variable "metrics_config" {
  type = object({
    automute_enabled          = optional(bool, true)
    collect_cloudwatch_alarms = optional(bool, true)
    collect_custom_metrics    = optional(bool, true)
    enabled                   = optional(bool, true)
    tag_filters = optional(list(object({
      namespace = string
      tags      = list(string)
    })), [])
    excluded_namespaces = optional(list(string), [
      "AWS/AmazonMQ",
      "AWS/AppRunner",
      "AWS/AppStream",
      "AWS/AppSync",
      "AWS/Budgeting",
      "AWS/Cassandra",
      "AWS/CloudHSM",
      "AWS/CodeBuild",
      "AWS/CodeWhisperer",
      "AWS/Cognito",
      "AWS/Connect",
      "AWS/DMS",
      "AWS/DX",
      "AWS/DocDB",
      "AWS/ElasticBeanstalk",
      "AWS/ElasticInference",
      "AWS/ElasticTranscoder",
      "AWS/MediaConnect",
      "AWS/MediaLive",
      "AWS/MediaPackage",
      "AWS/MediaStore",
      "AWS/MediaTailor",
      "AWS/FSx",
      "AWS/GameLift",
      "AWS/GlobalAccelerator",
      "AWS/IoT",
      "AWS/KinesisAnalytics",
      "AWS/Lex",
      "AWS/ML",
      "AWS/MemoryDB",
      "AWS/Neptune",
      "AWS/Network Manager",
      "AWS/NetworkMonitor",
      "AWS/PCS",
      "AWS/Polly",
      "AWS/PrivateLinkServices",
      "AWS/Redshift",
      "AWS/Rekognition",
      "AWS/StorageGateway",
      "AWS/Textract",
      "AWS/Translate",
      "AWS/WorkSpaces",
      "AWS/X-Ray",
    ])
  })
  default = {}
}

variable "resources_config" {
  type = object({
    cloud_security_posture_management_collection_enabled = optional(bool, false)
    extended_collection_enabled                          = optional(bool, true)
  })
  default = {}
}

variable "traces_config" {
  type = object({
    included_services = optional(list(string), ["AWS/Lambda"])
  })
  default = {}
}

variable "cloud_cost_management_config" {
  type = object({
    enabled            = optional(bool, false)
    bucket_name_prefix = optional(string, "orcd")
  })
  default = {}
}
