diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2e38b50..73de160 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -46,6 +46,7 @@ quarkus-logging-sentry.tf @quarkiverse/quarkiverse-logging-sen quarkus-logging-splunk.tf @quarkiverse/quarkiverse-logging-splunk quarkus-lucene.tf @quarkiverse/quarkiverse-lucene quarkus-maven-resolver.tf @quarkiverse/quarkiverse-maven-resolver +quarkus-mfa.tf @quarkiverse/quarkiverse-mfa quarkus-micrometer-registry.tf @quarkiverse/quarkiverse-micrometer-registry quarkus-microprofile.tf @quarkiverse/quarkiverse-microprofile quarkus-minio.tf @quarkiverse/quarkiverse-minio diff --git a/quarkus-mfa.tf b/quarkus-mfa.tf new file mode 100644 index 0000000..ea243de --- /dev/null +++ b/quarkus-mfa.tf @@ -0,0 +1,40 @@ +# Create repository +resource "github_repository" "quarkus_mfa" { + name = "quarkus-mfa" + description = "Enhanced Form Based Authentication with TOTP MFA for both HTML and JSON based authentication" + archive_on_destroy = true + delete_branch_on_merge = true + has_issues = true + vulnerability_alerts = true + topics = ["quarkus-extension", "mfa", "authentication"] + lifecycle { + ignore_changes = [ + # Workaround for integrations/terraform-provider-github#1037. + branches, + ] + } +} + +# Create team +resource "github_team" "quarkus_mfa" { + name = "quarkiverse-mfa" + description = "Quarkiverse MFA 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_mfa" { + team_id = github_team.quarkus_mfa.id + repository = github_repository.quarkus_mfa.name + permission = "maintain" +} + +# Add users to the team +resource "github_team_membership" "quarkus_mfa" { + for_each = { for tm in ["aaronanderson"] : tm => tm } + team_id = github_team.quarkus_mfa.id + username = each.value + role = "maintainer" +}