Skip to content

Commit

Permalink
add organization-level user blocking module/resource
Browse files Browse the repository at this point in the history
  • Loading branch information
kevcube committed Sep 5, 2024
1 parent c16b506 commit 2e8dd97
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 0 deletions.
55 changes: 55 additions & 0 deletions modules/organization_block/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!-- BEGIN_TF_DOCS -->
<!-- prettier-ignore-start -->

## Requirements

Check notice on line 4 in modules/organization_block/README.md

View workflow job for this annotation

GitHub Actions / Trunk Check

markdownlint(MD041)

[new] First line in a file should be a top-level heading

| Name | Version |
|------|---------|
| terraform | >= 1.3.0 |
| github | >= 6.2.3 |

## Providers

| Name | Version |
|------|---------|
| github | >= 6.2.3 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [github_organization_block.this](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_block) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| username | The name of the user to block. | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| blocked_user | n/a |


## Contributing

Contributions are welcome and appreciated!

Found an issue or want to request a feature? [Open an issue](TODO)

Want to fix a bug you found or add some functionality? Fork, clone, commit, push, and PR and we'll check it out.

If you have any issues or are waiting a long time for a PR to get merged then feel free to ping us at [[email protected]](mailto:[email protected]).

## Built By

[![Masterpoint Logo](https://i.imgur.com/RDLnuQO.png)](https://masterpoint.io)

<!-- prettier-ignore-end -->
<!-- END_TF_DOCS -->
3 changes: 3 additions & 0 deletions modules/organization_block/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "github_organization_block" "this" {
username = var.username
}
3 changes: 3 additions & 0 deletions modules/organization_block/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "blocked_user" {
value = github_organization_block.this.username
}
4 changes: 4 additions & 0 deletions modules/organization_block/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
variable "username" {
type = string
description = "The name of the user to block."
}
9 changes: 9 additions & 0 deletions modules/organization_block/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_version = ">= 1.3.0"
required_providers {
github = {
source = "integrations/github"
version = ">= 6.2.3"
}
}
}

0 comments on commit 2e8dd97

Please sign in to comment.