module "aoma-p1-vpc-flow-logs" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "aoma-p1-vpc-flow-logs"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.aoma-p1-vpc-flow-logs.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "aoma-p1-vpc-flow-logs"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-aoma-reports-prod" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-aoma-reports-prod"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-aoma-reports-prod.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-aoma-reports-prod"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-arvato-temp" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-arvato-temp"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-arvato-temp.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-arvato-temp"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-athena-out" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-athena-out"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-athena-out.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-athena-out"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-awsconfig" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-awsconfig"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-awsconfig.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-awsconfig"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}


module "sme-aoma-core-prod-db-team-lambda" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-db-team-lambda"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-db-team-lambda.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-db-team-lambda"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "d-server-021njhd9xa37is"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-email-notification-attachment" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-email-notification-attachment"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-email-notification-attachment.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-email-notification-attachment"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "d-server-021njhd9xa37is"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-euc1-s3-inventory" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-euc1-s3-inventory"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-euc1-s3-inventory.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-euc1-s3-inventory"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-ff-alblogs" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-ff-alblogs"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-ff-alblogs.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-ff-alblogs"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-ff-s3logs" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-ff-s3logs"
  versioning = {
    enabled = true
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration

  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-ff-s3logs.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-ff-s3logs"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-quicksight" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-quicksight"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-quicksight.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-quicksight"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-rds-backups" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-rds-backups"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-rds-backups.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-rds-backups"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-ssm-out" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-ssm-out"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-ssm-out.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-ssm-out"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-terraform-state-files" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-terraform-state-files"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = false
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-terraform-state-files"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-ust-bulk-script-processes" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-ust-bulk-script-processes"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-ust-bulk-script-processes.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-core-prod-ust-bulk-script-processes"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-txmgr-metadata-import-prod-processed" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-txmgr-metadata-import-prod-processed"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-txmgr-metadata-import-prod-processed.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-txmgr-metadata-import-prod-processed"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-ust-prod" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-ust-prod"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-ust-prod.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-aoma-ust-prod"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "arvatok8s-prod-elasticsearch-backup" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "arvatok8s-prod-elasticsearch-backup"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.arvatok8s-prod-elasticsearch-backup.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "arvatok8s-prod-elasticsearch-backup"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-india-content" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-india-content"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.ap-south-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-aps1-s3logs"
    target_prefix = "sme-india-content/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-india-content.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "sme-india-content"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "sme-aoma-core-prod-aps1-s3logs" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-aps1-s3logs"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.ap-south-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration

  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-aps1-s3logs.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {

      "Name"           = "sme-aoma-core-prod-aps1-s3logs"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "aoma-core-prod-elb-logs" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "aoma-core-prod-elb-logs"
  versioning = {
    enabled = false
  }
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration

  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.aoma-core-prod-elb-logs.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "aoma-core-prod-elb-logs"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "file-logs-bucket" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "file-logs-bucket"
  versioning = {
    enabled = false
  }
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration

  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = false
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "file-logs-bucket"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "Classification" = "internal-use-only",
      "Purpose"        = " "
  })
}

module "aoma-envelope-frontend-prod-ui" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "aoma-envelope-frontend-prod-ui"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.aoma-envelope-frontend-prod-ui.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags,
    {
      "Name"           = "aoma-envelope-frontend-prod-ui"
      "Project-Name"   = "AOMA-Core",
      "Project-Code"   = "SME-2000-0306A",
      "Owner"          = "nathaniel.lovett@sonymusic.com",
      "Environment"    = "Prod",
      "Terraform"      = "True",
      "Business-Unit"  = "SME-AOMA-Core",
      "map-migrated"   = "migKNBMDMW06I"
      "Classification" = "internal-use-only",
      "Purpose"        = " "

  })
}

module "sme-core-aoma-prod-file-storage" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-core-aoma-prod-file-storage"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-core-aoma-prod-file-storage.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy
  tags = merge(var.tags, { Name = "sme-core-aoma-prod-file-storage",
    "Project-Name"   = "AOMA-Core",
    "Project-Code"   = "SME-2000-0306A",
    "Owner"          = "nathaniel.lovett@sonymusic.com",
    "Environment"    = "Prod",
    "Terraform"      = "True",
    "Business-Unit"  = "SME-AOMA-Core",
    "map-migrated"   = "migKNBMDMW06I"
    "Classification" = "internal-use-only",
    "Purpose"        = " "

  })
}

module "aoma-core-elk-snapshots" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "aoma-core-elk-snapshots"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  logging = {

  }
  server_side_encryption_configuration = {
    rule = {
      bucket_key_enabled = true
      apply_server_side_encryption_by_default = {
        kms_master_key_id = ""
        sse_algorithm     = "AES256"
      }
    }
  }
  object_ownership                      = "BucketOwnerEnforced"
  object_lock_enabled                   = false
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = true
  policy                                = data.aws_iam_policy_document.aoma-core-elk-snapshots.json
  attach_deny_insecure_transport_policy = false
  attach_require_latest_tls_policy      = false

  tags = {}
}

module "sme-aoma-core-prod-dw" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-core-prod-dw"
  versioning = {
    enabled = false
  }
  providers = {
    aws = aws.eu-central-1
  }
  logging = {

  }

  server_side_encryption_configuration  = var.server_side_encryption_configuration
  object_ownership                      = "BucketOwnerEnforced"
  object_lock_enabled                   = false
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = true
  policy                                = data.aws_iam_policy_document.sme-aoma-core-prod-dw.json
  attach_deny_insecure_transport_policy = true
  attach_require_latest_tls_policy      = true

  tags = {
    "Project-Name"   = "AOMA-Core",
    "Project-Code"   = "SME-2000-0306A",
    "Owner"          = "nathaniel.lovett@sonymusic.com",
    "Environment"    = "Prod",
    "Terraform"      = "True",
    "Business-Unit"  = "SME-AOMA-Core",
    "map-migrated"   = "migKNBMDMW06I"
    "Classification" = "internal-use-only",
    "Purpose"        = "CLOUDOPS"
  }
}

module "sme_india_streaming" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-india-streaming"

  versioning = {
    enabled = false
  }

  providers = {
    aws = aws.ap-south-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-aps1-s3logs"
    target_prefix = "sme-india-streaming/"
  }

  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme_india_streaming.json
  attach_deny_insecure_transport_policy = var.attach_deny_insecure_transport_policy
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy

  tags = merge(var.tags, {
    Name           = "sme-india-streaming"
    Project-Name   = "AOMA-Core"
    Project-Code   = "SME-2000-0306A"
    Owner          = "nathaniel.lovett@sonymusic.com"
    Environment    = "Prod"
    Terraform      = "True"
    Business-Unit  = "SME-AOMA-Core"
    map-migrated   = "migKNBMDMW06I"
    Classification = "internal-use-only"
    Purpose        = "APP-SUPPORT"
  })
}

module "aws-athena-query-results-eu-central-1-613871678587" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "aws-athena-query-results-eu-central-1-613871678587"

  # versioning = {
  #   enabled = false
  # }

  providers = {
    aws = aws.eu-central-1
  }
  #server_side_encryption_configuration = var.server_side_encryption_configuration
  # logging = {}

  object_ownership                      = "BucketOwnerEnforced"
  block_public_acls                     = true
  ignore_public_acls                    = true
  restrict_public_buckets               = true
  block_public_policy                   = true
  force_destroy                         = var.force_destroy
  attach_policy                         = false
  attach_deny_insecure_transport_policy = false
  attach_require_latest_tls_policy      = false

}

module "sme-aoma-core-storage-gateway-prod" {
  # checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  # checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  # checkov:skip=CKV_AWS_19: Ensure all data stored in the S3 bucket is securely encrypted at rest
  # checkov:skip=CKV_AWS_145: Ensure that S3 buckets are encrypted with KMS by default
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"

  providers = {
    aws = aws.eu-central-1
  }

  bucket = "sme-aoma-core-storage-gateway-prod"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-core-prod-ff-s3logs"
    target_prefix = "sme-aoma-core-prod/"
  }
  object_ownership                      = "BucketOwnerEnforced"
  object_lock_enabled                   = false
  block_public_acls                     = var.block_public_acls
  ignore_public_acls                    = var.ignore_public_acls
  restrict_public_buckets               = var.restrict_public_buckets
  block_public_policy                   = var.block_public_policy
  force_destroy                         = var.force_destroy
  attach_policy                         = var.attach_policy
  policy                                = data.aws_iam_policy_document.sme-aoma-core-storage-gateway-prod.json
  attach_deny_insecure_transport_policy = false
  attach_require_latest_tls_policy      = var.attach_require_latest_tls_policy

  tags = merge(var.tags, {
    Name    = "sme-aoma-core-storage-gateway-prod"
    Purpose = "APP-SUPPORT"
  })
}
