<commit_before>variable "alphagov_git_repositories" {
  type = map(object({
    default_branch = string
  }))

  default = {
    digitalmarketplace-api = {
      default_branch = "main"
    },
    digitalmarketplace-search-api = {
      default_branch = "main"
    },
    digitalmarketplace-admin-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-agreements = {
      default_branch = "master"
    },
    digitalmarketplace-antivirus-api = {
      default_branch = "main"
    },
    digitalmarketplace-apiclient = {
      default_branch = "main"
    },
    digitalmarketplace-aws = {
      default_branch = "main"
    },
    digitalmarketplace-bad-words = {
      default_branch = "master"
    },
    digitalmarketplace-brief-responses-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-briefs-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-buyer-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-content-loader = {
      default_branch = "master"
    },
    digitalmarketplace-credentials = {
      default_branch = "master"
    },
    digitalmarketplace-docker-base = {
      default_branch = "main"
    },
    digitalmarketplace-frameworks = {
      default_branch = "main"
    },
    digitalmarketplace-frontend-toolkit = {
      default_branch = "main"
    },
    digitalmarketplace-functional-tests = {
      default_branch = "main"
    },
    digitalmarketplace-jenkins = {
      default_branch = "main"
    },
    digitalmarketplace-maintenance = {
      default_branch = "master"
    },
    digitalmarketplace-manual = {
      default_branch = "master"
    },
    digitalmarketplace-performance-testing = {
      default_branch = "master"
    },
    digitalmarketplace-router = {
      default_branch = "main"
    },
    digitalmarketplace-runner = {
      default_branch = "main"
    },
    digitalmarketplace-scripts = {
      default_branch = "main"
    },
    digitalmarketplace-supplier-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-test-utils = {
      default_branch = "main"
    },
    digitalmarketplace-user-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-utils = {
      default_branch = "main"
    },
    digitalmarketplace-visual-regression = {
      default_branch = "master"
    },
    digitalmarketplace-govuk-frontend = {
      default_branch = "master"
    },
    digitalmarketplace-developer-tools = {
      default_branch = "main"
    },
  }
}

resource "aws_codecommit_repository" "codecommit_backup_repos" {
  for_each = var.alphagov_git_repositories

  repository_name = each.key
  description     = "Backup CodeCommit repo for github.com/alphagov/${each.key}"
  default_branch  = each.value["default_branch"]
}

<commit_msg>reflect branch rename<commit_after>variable "alphagov_git_repositories" {
  type = map(object({
    default_branch = string
  }))

  default = {
    digitalmarketplace-api = {
      default_branch = "main"
    },
    digitalmarketplace-search-api = {
      default_branch = "main"
    },
    digitalmarketplace-admin-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-agreements = {
      default_branch = "master"
    },
    digitalmarketplace-antivirus-api = {
      default_branch = "main"
    },
    digitalmarketplace-apiclient = {
      default_branch = "main"
    },
    digitalmarketplace-aws = {
      default_branch = "main"
    },
    digitalmarketplace-bad-words = {
      default_branch = "master"
    },
    digitalmarketplace-brief-responses-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-briefs-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-buyer-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-content-loader = {
      default_branch = "master"
    },
    digitalmarketplace-credentials = {
      default_branch = "master"
    },
    digitalmarketplace-docker-base = {
      default_branch = "main"
    },
    digitalmarketplace-frameworks = {
      default_branch = "main"
    },
    digitalmarketplace-frontend-toolkit = {
      default_branch = "main"
    },
    digitalmarketplace-functional-tests = {
      default_branch = "main"
    },
    digitalmarketplace-jenkins = {
      default_branch = "main"
    },
    digitalmarketplace-maintenance = {
      default_branch = "master"
    },
    digitalmarketplace-manual = {
      default_branch = "main"
    },
    digitalmarketplace-performance-testing = {
      default_branch = "master"
    },
    digitalmarketplace-router = {
      default_branch = "main"
    },
    digitalmarketplace-runner = {
      default_branch = "main"
    },
    digitalmarketplace-scripts = {
      default_branch = "main"
    },
    digitalmarketplace-supplier-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-test-utils = {
      default_branch = "main"
    },
    digitalmarketplace-user-frontend = {
      default_branch = "main"
    },
    digitalmarketplace-utils = {
      default_branch = "main"
    },
    digitalmarketplace-visual-regression = {
      default_branch = "master"
    },
    digitalmarketplace-govuk-frontend = {
      default_branch = "master"
    },
    digitalmarketplace-developer-tools = {
      default_branch = "main"
    },
  }
}

resource "aws_codecommit_repository" "codecommit_backup_repos" {
  for_each = var.alphagov_git_repositories

  repository_name = each.key
  description     = "Backup CodeCommit repo for github.com/alphagov/${each.key}"
  default_branch  = each.value["default_branch"]
}


{'fraction_non_alphanumeric': 0.11083392729864576, 'fraction_numerical': 0.0, 'mean_word_length': 2.6236281471917366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '806562', 'n_tokens_mistral': 1730, 'n_tokens_neox': 1703, 'n_words': 232}