Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions github/data_source_github_organization_security_managers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (

func dataSourceGithubOrganizationSecurityManagers() *schema.Resource {
return &schema.Resource{
DeprecationMessage: "This data source is deprecated in favour of using the github_organization_role_teams data source.",

Read: dataSourceGithubOrganizationSecurityManagersRead,

Schema: map[string]*schema.Schema{
Expand Down
2 changes: 2 additions & 0 deletions github/resource_github_organization_role_team_assignment.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (

func resourceGithubOrganizationRoleTeamAssignment() *schema.Resource {
return &schema.Resource{
DeprecationMessage: "This resource is deprecated in favor of the github_organization_role_team resource.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Do we have a naming convention for these kinds of resources? I personally think that github_organization_role_team_assignment is clearer than github_organization_role_team, especially since GitHub uses the "Role assignment" terminology

And a second note: The docs for https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_role_team_assignment are more verbose and user-friendly than https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_role_team

So, if we want to deprecate github_organization_role_team_assignment can we copy over the docs from it? :)

Copy link
Contributor

@ViacheslavKudinov ViacheslavKudinov Nov 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming for the resources and data is a good thing to have.

There is for example another thing which may need to be addressed as well due to naming.

The data and resource for organization custom properties are named in plural properties, but neither data not resource works with more than a single property.

The resource organization_custom_properties and data organization_custom_properties

It means it most likely needs to be done depreciation of these "plurals" and introducing of "singulars" with property in the names.

It could be that "singular" named resources should be introduced in v6 and "plurals" removed in v7.

I saw @mroyme done naming of repsource with singular property in their fork, which is more correct if it adds only a single custom property.

PS Added the issue #2936

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deiga the resource github_organization_role_team was implemented with all of the other related resources and data sources using consistent naming and implementation patterns.

I also don't agree that the assignment suffix is necessarily an improvement to the name, it adds additional characters to parse and fit on a single line. In this context the point is consistency with all of the other related resources. If you want to discuss changing the naming conventions I think that's a separate issue.

@ViacheslavKudinov I agree with your points on pluralization and duplication of context in names. I'm not sure which way you're arguing here but in this context my interpretation of your logic would be that the assignment suffix isn't required as the context is already complete.

Copy link
Contributor

@ViacheslavKudinov ViacheslavKudinov Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have no strong opinion about this concrete resource, tbh.

PS At the same time as it was introduced Enterprise Roles and (Custom) Enterprise Role can be assigned to Enterprise team(s), it would be great if we use same "naming" for those as well to keep consistency, when we introduce new data/resources.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS At the same time as it was introduced Enterprise Roles and (Custom) Enterprise Role can be assigned to Enterprise team(s), it would be great if we use same "naming" for those as well to keep consistency, when we introduce new data/resources.

FYI the PR (#2487) was opened almost a year ago, long before enterprise roles were a thing.

Copy link
Contributor

@ViacheslavKudinov ViacheslavKudinov Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevehipwell thanks for sharing.

Now it looks like (from my perspective) is better to deprecate organization_role_team_assignment, exactly what PR addresses (it was introduced a little bit more than a month ago in v6.7.0.

As it (organization_role_team_assignment) was added "recently" may need less changes for provider consumers instead of organization_role_team, which is present for almost one year.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ViacheslavKudinov they were all introduced in the same release, the PR freeze left everything backed up which meant that overlapping PRs got merged. The organization_role_team resource is part of a set of 11 resources or data sources while organization_role_team_assignment was in a PR on it's own.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevehipwell thank you for sharing the context.

I totally fine with this PR as I got better understanding. Have no any concern.


Create: resourceGithubOrganizationRoleTeamAssignmentCreate,
Read: resourceGithubOrganizationRoleTeamAssignmentRead,
Delete: resourceGithubOrganizationRoleTeamAssignmentDelete,
Expand Down
2 changes: 2 additions & 0 deletions github/resource_github_organization_security_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

func resourceGithubOrganizationSecurityManager() *schema.Resource {
return &schema.Resource{
DeprecationMessage: "This resource is deprecated in favor of the github_organization_role_team resource.",

Create: resourceGithubOrganizationSecurityManagerCreate,
Read: resourceGithubOrganizationSecurityManagerRead,
Update: resourceGithubOrganizationSecurityManagerUpdate,
Expand Down
14 changes: 8 additions & 6 deletions website/docs/d/organization_security_managers.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

# github_organization_security_managers

~> **Note:** This data source is deprecated, please use the `github_organization_role_team` resource instead.

Use this data source to retrieve the security managers for an organization.

## Example Usage
Expand All @@ -17,13 +19,13 @@ data "github_organization_security_managers" "test" {}

## Attributes Reference

* `teams` - An list of GitHub teams. Each `team` block consists of the fields documented below.
* `teams` - An list of GitHub teams. Each `team` block consists of the fields documented below.

___
---___

The `team` block consists of:

* `id` - Unique identifier of the team.
* `slug` - Name based identifier of the team.
* `name` - Name of the team.
* `permission` - Permission that the team will have for its repositories.
* `id` - Unique identifier of the team.
* `slug` - Name based identifier of the team.
* `name` - Name of the team.
* `permission` - Permission that the team will have for its repositories.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

# github_organization_role_team_assignment

~> **Note:** This resource is deprecated, please use the `github_organization_role_team` resource instead.

This resource manages relationships between teams and organization roles
in your GitHub organization. This works on predefined roles, and custom roles, where the latter is an Enterprise feature.

Expand Down Expand Up @@ -39,6 +41,6 @@ The following arguments are supported:

GitHub Team Organization Role Assignment can be imported using an ID made up of `team_slug:role_id`

```
```text
$ terraform import github_organization_role_team_assignment.role_assignment test-team:8132
```
4 changes: 3 additions & 1 deletion website/docs/r/organization_security_manager.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ description: |-

# github_organization_security_manager

~> **Note:** This resource is deprecated, please use the `github_organization_role_team` resource instead.

## Example Usage

```hcl
Expand All @@ -30,6 +32,6 @@ The following arguments are supported:

GitHub Security Manager Teams can be imported using the GitHub team ID e.g.

```
```text
$ terraform import github_organization_security_manager.core 1234567
```