module "multibranch_pipelines_with_remote_jenkinsfile" {
  for_each = local.multibranch_pipelines_with_remote_jenkinsfile

  source = "../../modules/jenkins/multibranch-pipeline-remote-jenkinsfile"

  disabled = each.value["disabled"]

  folder = jenkins_folder.decibel_pipelines.id

  github_repository_http_url          = each.value["http_url"]
  github_repository_name              = each.value["name"]
  github_repository_ssh_url           = each.value["ssh_url"]
  github_repository_branches_to_build = each.value["branches_to_build"]
  jenkinsfile_branch                  = lookup(each.value, "jenkinsfile_branch", "develop")

  github_ssh_credentials_id = "theorchard-ci-ssh-key"
  github_credentials_id     = "orchardci-user-token"
  github_repository_owner   = "theorchard"
}
