diff --git a/00-repositories.tf b/00-repositories.tf index ee9e56e..bc0ede1 100644 --- a/00-repositories.tf +++ b/00-repositories.tf @@ -211,6 +211,13 @@ resource "github_repository" "repositories" { archived = contains(local._archived_repositories, each.value) visibility = "public" has_projects = false + + template { + owner = "ros2-gbp" + repository = "release-repository-template" + include_all_branches = true + } + lifecycle { # Plans that destroy repository releases will delete the repository on # GitHub and that shouldn't be done in the normal course of operation. @@ -225,6 +232,7 @@ resource "github_repository" "repositories" { has_issues, has_wiki, homepage_url, + template, vulnerability_alerts ] } diff --git a/00-ros2_gbp.tf b/00-ros2_gbp.tf index 30fef35..c7b6055 100644 --- a/00-ros2_gbp.tf +++ b/00-ros2_gbp.tf @@ -25,6 +25,28 @@ resource "github_repository" "dotgithub" { } } +resource "github_repository" "release-repository-template" { + name = "release-repository-template" + visibility = "public" + is_template = true + has_projects = false + lifecycle { + # Plans that destroy repository releases will delete the repository on + # GitHub and that shouldn't be done in the normal course of operation. + prevent_destroy = true + # Ignore fields that are not set or managed by this terraform project + # to prevent unecessary drift. + ignore_changes = [ + allow_merge_commit, + description, + has_downloads, + has_issues, + has_wiki, + vulnerability_alerts + ] + } +} + resource "github_team" "docs_team" { name = "ros2-gbp-docs" description = "ros2-gbp documentation contributors"