module "battery-studios-archive" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "battery-studios-archive"
  versioning = {
    enabled = true
  }
  providers = {
    aws = aws.eu-central-1
  }
  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-eu-central-1-logs"
    target_prefix = "sme-aoma-gmp-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.battery-studios-archive.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 = "battery-studios-archive" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "battery-studios-archive-replica" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "battery-studios-archive-replica"
  versioning = {
    enabled = true
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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.battery-studios-archive-replica.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 = "battery-studios-archive-replica" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "cf-templates-pvtfjvji1vtk-us-east-1" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "cf-templates-pvtfjvji1vtk-us-east-1"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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 = "cf-templates-pvtfjvji1vtk-us-east-1" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "sme-aoma-gmp-prod" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-prod"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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-gmp-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-gmp-prod" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "sme-aoma-gmp-prod-archive" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-prod-archive"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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-gmp-prod-archive.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-gmp-prod-archive" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "sme-aoma-gmp-prod-athena-out" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-prod-athena-out"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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-gmp-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-gmp-prod-athena-out" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "sme-aoma-gmp-prod-awsconfig" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-prod-awsconfig"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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-gmp-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-gmp-prod-awsconfig" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "sme-aoma-gmp-prod-eu-central-1-logs" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-prod-eu-central-1-logs"
  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-gmp-prod-eu-central-1-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 = "sme-aoma-gmp-prod-eu-central-1-logs" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "sme-aoma-gmp-prod-euc1-s3-inventory" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-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-gmp-prod-eu-central-1-logs"
    target_prefix = "sme-aoma-gmp-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-gmp-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-gmp-prod-euc1-s3-inventory" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "sme-aoma-gmp-prod-rrd" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-prod-rrd"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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-gmp-prod-rrd.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-gmp-prod-rrd" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "sme-aoma-gmp-prod-us-east-1-logs" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-prod-us-east-1-logs"
  versioning = {
    enabled = true
  }

  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-gmp-prod-us-east-1-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 = "sme-aoma-gmp-prod-us-east-1-logs" }, { Classification = "internal-use-only" }, { Purpose = "LOGGING" })
}

module "sme-aoma-gmp-prod-use1-s3-inventory" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "sme-aoma-gmp-prod-use1-s3-inventory"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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-gmp-prod-use1-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-gmp-prod-use1-s3-inventory" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}

module "gmp-spe-video-processing-01" {
  #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
  #checkov:skip=CKV_AWS_21: Ensure all data stored in the S3 bucket have versioning enabled
  #checkov:skip=CKV_AWS_300: Ensure S3 lifecycle configuration sets period for aborting failed uploads
  source  = "terraform-aws-modules/s3-bucket/aws"
  version = "~> 3.11.0"
  bucket  = "gmp-spe-video-processing-01"
  versioning = {
    enabled = false
  }

  server_side_encryption_configuration = var.server_side_encryption_configuration
  logging = {
    target_bucket = "sme-aoma-gmp-prod-us-east-1-logs"
    target_prefix = "sme-aoma-gmp-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.gmp-spe-video-processing-01.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 = "gmp-spe-video-processing-01" }, { Classification = "internal-use-only" }, { Purpose = "CLOUDOPS" })
}
