Skip to content

Commit

Permalink
feat: add user resource
Browse files Browse the repository at this point in the history
  • Loading branch information
acch committed Dec 20, 2024
1 parent d51f174 commit fd708e7
Show file tree
Hide file tree
Showing 3 changed files with 613 additions and 0 deletions.
34 changes: 34 additions & 0 deletions examples/resources/forgejo_user/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
terraform {
required_providers {
forgejo = {
source = "registry.terraform.io/svalabs/forgejo"
}
}
}

provider "forgejo" {
host = "http://localhost:3000"
}

resource "forgejo_user" "defaults" {
login = "tftest_defaults"
email = "[email protected]"
password = "passw0rd"
}
resource "forgejo_user" "non_defaults" {
login = "tftest_non_defaults"
email = "[email protected]"
password = "passw0rd"
full_name = "Terraform Test User with non-default attributes"
description = "Purely for testing..."
website = "https://forgejo.org/"
location = "Mêlée Island"
visibility = "private"
}

output "debug_defaults" {
value = forgejo_user.defaults
}
output "debug_non_defaults" {
value = forgejo_user.non_defaults
}
1 change: 1 addition & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ func (p *forgejoProvider) Resources(_ context.Context) []func() resource.Resourc
return []func() resource.Resource{
NewOrganizationResource,
NewRepositoryResource,
NewUserResource,
}
}

Expand Down
Loading

0 comments on commit fd708e7

Please sign in to comment.