Difference between revisions of "Execute command configuration"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
  
 
  [[configuration]]
 
  [[configuration]]
 +
 +
 +
resource "aws_ecs_cluster" "your_cluster" {
 +
  name = "your-${var.env}-cluster"
 +
 +
  configuration {
 +
    execute_command_configuration {
 +
      kms_key_id = [[aws_kms_key]].cw_kms_key.arn
 +
      [[logging]]    = "OVERRIDE"
 +
 +
      log_configuration {
 +
        cloud_watch_encryption_enabled = true
 +
        cloud_watch_log_group_name    = aws_cloudwatch_log_group.your_cw_group[[.name]]
 +
      }
 +
    }
 +
  }
 +
}
 +
 +
resource "aws_kms_key" "cw_kms_key" {
 +
  description            = "your_app-${var.env}-cw-kms-key"
 +
  [[deletion_window_in_days]] = 7
 +
}
  
  
 
{{aws_ecs_cluster}}
 
{{aws_ecs_cluster}}

Revision as of 17:33, 14 May 2023


configuration


resource "aws_ecs_cluster" "your_cluster" {
  name = "your-${var.env}-cluster"

  configuration {
    execute_command_configuration {
      kms_key_id = aws_kms_key.cw_kms_key.arn
      logging    = "OVERRIDE" 

      log_configuration {
        cloud_watch_encryption_enabled = true
        cloud_watch_log_group_name     = aws_cloudwatch_log_group.your_cw_group.name
      }
    }
  }
}
resource "aws_kms_key" "cw_kms_key" {
  description             = "your_app-${var.env}-cw-kms-key"
  deletion_window_in_days = 7
}


aws_ecs_cluster: name, containerInsights, execute_command_configuration

Advertising: