diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5ad90e2..a46995f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -55,6 +55,7 @@ terraform-scripts/quarkus-logging-manager.tf @quarkiverse/quark terraform-scripts/quarkus-logging-sentry.tf @quarkiverse/quarkiverse-logging-sentry terraform-scripts/quarkus-logging-splunk.tf @quarkiverse/quarkiverse-logging-splunk terraform-scripts/quarkus-lucene.tf @quarkiverse/quarkiverse-lucene +terraform-scripts/quarkus-mailpit.tf @quarkiverse/quarkiverse-mailpit terraform-scripts/quarkus-maven-resolver.tf @quarkiverse/quarkiverse-maven-resolver terraform-scripts/quarkus-mfa.tf @quarkiverse/quarkiverse-mfa terraform-scripts/quarkus-micrometer-registry.tf @quarkiverse/quarkiverse-micrometer-registry diff --git a/terraform-scripts/quarkus-mailpit.tf b/terraform-scripts/quarkus-mailpit.tf new file mode 100644 index 0000000..8d50978 --- /dev/null +++ b/terraform-scripts/quarkus-mailpit.tf @@ -0,0 +1,36 @@ +# Create repository +resource "github_repository" "quarkus_mailpit" { + name = "quarkus-mailpit" + description = "An email and SMTP testing tool with API for developers" + homepage_url = "https://github.com/axllent/mailpit" + allow_update_branch = true + archive_on_destroy = true + delete_branch_on_merge = true + has_issues = true + vulnerability_alerts = true + topics = ["quarkus-extension"] +} + +# Create team +resource "github_team" "quarkus_mailpit" { + name = "quarkiverse-mailpit" + description = "mailpit team" + create_default_maintainer = false + privacy = "closed" + parent_team_id = data.github_team.quarkiverse_members.id +} + +# Add team to repository +resource "github_team_repository" "quarkus_mailpit" { + team_id = github_team.quarkus_mailpit.id + repository = github_repository.quarkus_mailpit.name + permission = "maintain" +} + +# Add users to the team +resource "github_team_membership" "quarkus_mailpit" { + for_each = { for tm in ["melloware"] : tm => tm } + team_id = github_team.quarkus_mailpit.id + username = each.value + role = "maintainer" +}