Repository: integrations/terraform-provider-github

Issue:
[BUG]: Resources using the removed legacy projects API are still present and not deprecated in the provider
### Expected Behavior

Resources which will not work should not be in the provider and should have been deprecated when the API deprecation announcement was issued.

### Actual Behavior

The resources using the removed legacy projects API are still present and not deprecated in the provider.

### Terraform Version

n/a

### Affected Resource(s)

- `github_organization_project`
- `github_project_card`
- `github_project_column`
- `github_repository_project`

### Terraform Configuration Files

_No response_

### Steps to Reproduce

_No response_

### Debug Output

_No response_

### Panic Output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Discussion:
@stevehipwell: The code to deprecate this is currently in #2476 but I'm planning on opening a seperate PR for this change before that gets merged.@emouawad: This is now a breaking change - should be solved!@stevehipwell: Yes it's a breaking change due to the SDK changes, although it's been broken for a long time. The aim 5 months ago was to get a version out with a deprecation notice before changing the SDK and releasing a major version bump. Unfortunately this repo has effectively been abandoned.@emouawad: mm.. abandoned?! this is github provider we are talking about - do you mean development has shifted to another repo? what's the alternative?@stevehipwell: @emouawad check out the commit history and lack of action on issues or PRs.

Solution patch:
diff --git a/github/resource_github_organization_project.go b/github/resource_github_organization_project.go
index 9e4aa15e..c34978b3 100644
--- a/github/resource_github_organization_project.go
+++ b/github/resource_github_organization_project.go
@@ -13,6 +13,8 @@ import (
 
 func resourceGithubOrganizationProject() *schema.Resource {
 	return &schema.Resource{
+		DeprecationMessage: "This resource is deprecated as the API endpoints for classic projects have been removed. This resource no longer works and will be removed in a future version.",
+
 		Create: resourceGithubOrganizationProjectCreate,
 		Read:   resourceGithubOrganizationProjectRead,
 		Update: resourceGithubOrganizationProjectUpdate,
diff --git a/github/resource_github_project_card.go b/github/resource_github_project_card.go
index 8b6dfec1..4fac4543 100644
--- a/github/resource_github_project_card.go
+++ b/github/resource_github_project_card.go
@@ -14,6 +14,8 @@ import (
 
 func resourceGithubProjectCard() *schema.Resource {
 	return &schema.Resource{
+		DeprecationMessage: "This resource is deprecated as the API endpoints for classic projects have been removed. This resource no longer works and will be removed in a future version.",
+
 		Create: resourceGithubProjectCardCreate,
 		Read:   resourceGithubProjectCardRead,
 		Update: resourceGithubProjectCardUpdate,
@@ -184,7 +186,6 @@ func resourceGithubProjectCardDelete(d *schema.ResourceData, meta interface{}) e
 }
 
 func resourceGithubProjectCardImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
-
 	cardIDStr := d.Id()
 	cardID, err := strconv.ParseInt(cardIDStr, 10, 64)
 	if err != nil {
@@ -205,5 +206,4 @@ func resourceGithubProjectCardImport(d *schema.ResourceData, meta interface{}) (
 	}
 
 	return []*schema.ResourceData{d}, nil
-
 }
diff --git a/github/resource_github_project_column.go b/github/resource_github_project_column.go
index fa54106f..67fa7eb8 100644
--- a/github/resource_github_project_column.go
+++ b/github/resource_github_project_column.go
@@ -13,6 +13,8 @@ import (
 
 func resourceGithubProjectColumn() *schema.Resource {
 	return &schema.Resource{
+		DeprecationMessage: "This resource is deprecated as the API endpoints for classic projects have been removed. This resource no longer works and will be removed in a future version.",
+
 		Create: resourceGithubProjectColumnCreate,
 		Read:   resourceGithubProjectColumnRead,
 		Update: resourceGithubProjectColumnUpdate,
diff --git a/github/resource_github_repository_project.go b/github/resource_github_repository_project.go
index 278900c7..e730b7e7 100644
--- a/github/resource_github_repository_project.go
+++ b/github/resource_github_repository_project.go
@@ -14,6 +14,8 @@ import (
 
 func resourceGithubRepositoryProject() *schema.Resource {
 	return &schema.Resource{
+		DeprecationMessage: "This resource is deprecated as the API endpoints for classic projects have been removed. This resource no longer works and will be removed in a future version.",
+
 		Create: resourceGithubRepositoryProjectCreate,
 		Read:   resourceGithubRepositoryProjectRead,
 		Update: resourceGithubRepositoryProjectUpdate,
diff --git a/website/docs/r/organization_project.html.markdown b/website/docs/r/organization_project.html.markdown
index b7764db3..447588d0 100644
--- a/website/docs/r/organization_project.html.markdown
+++ b/website/docs/r/organization_project.html.markdown
@@ -7,6 +7,8 @@ description: |-
 
 # github_organization_project
 
+!> **Warning:** This resource no longer works as the [Projects (classic) REST API](https://docs.github.com/en/rest/projects/projects?apiVersion=2022-11-28) has been [removed](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) and as such has been deprecated. It will be removed in a future release.
+
 This resource allows you to create and manage projects for GitHub organization.
 
 ## Example Usage
diff --git a/website/docs/r/project_card.html.markdown b/website/docs/r/project_card.html.markdown
index 2c338c53..619d49ad 100644
--- a/website/docs/r/project_card.html.markdown
+++ b/website/docs/r/project_card.html.markdown
@@ -7,6 +7,8 @@ description: |-
 
 # github_project_card
 
+!> **Warning:** This resource no longer works as the [Projects (classic) REST API](https://docs.github.com/en/rest/projects/projects?apiVersion=2022-11-28) has been [removed](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) and as such has been deprecated. It will be removed in a future release.
+
 This resource allows you to create and manage cards for GitHub projects.
 
 ## Example Usage
@@ -68,11 +70,11 @@ The following arguments are supported:
 
 * `note` - (Optional) The note contents of the card. Markdown supported.
 
-* `content_id` - (Optional) [`github_issue.issue_id`](issue.html#argument-reference). 
+* `content_id` - (Optional) [`github_issue.issue_id`](issue.html#argument-reference).
 
 * `content_type` - (Optional) Must be either `Issue` or `PullRequest`
 
-**Remarks:** You must either set the `note` attribute or both `content_id` and `content_type`. 
+**Remarks:** You must either set the `note` attribute or both `content_id` and `content_type`.
 See [note example](#example-usage) or [issue example](#example-usage-adding-an-issue-to-a-project) for more information.
 
 ## Import
diff --git a/website/docs/r/project_column.html.markdown b/website/docs/r/project_column.html.markdown
index 139c56b0..cdb972b0 100644
--- a/website/docs/r/project_column.html.markdown
+++ b/website/docs/r/project_column.html.markdown
@@ -7,6 +7,8 @@ description: |-
 
 # github_project_column
 
+!> **Warning:** This resource no longer works as the [Projects (classic) REST API](https://docs.github.com/en/rest/projects/projects?apiVersion=2022-11-28) has been [removed](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) and as such has been deprecated. It will be removed in a future release.
+
 This resource allows you to create and manage columns for GitHub projects.
 
 ## Example Usage
diff --git a/website/docs/r/repository_project.html.markdown b/website/docs/r/repository_project.html.markdown
index ca394617..0ce0c9f5 100644
--- a/website/docs/r/repository_project.html.markdown
+++ b/website/docs/r/repository_project.html.markdown
@@ -7,6 +7,8 @@ description: |-
 
 # github_repository_project
 
+!> **Warning:** This resource no longer works as the [Projects (classic) REST API](https://docs.github.com/en/rest/projects/projects?apiVersion=2022-11-28) has been [removed](https://github.blog/changelog/2024-05-23-sunset-notice-projects-classic/) and as such has been deprecated. It will be removed in a future release.
+
 This resource allows you to create and manage projects for GitHub repository.
 
 ## Example Usage



Test patch:
diff --git a/github/resource_github_organization_project_test.go b/github/resource_github_organization_project_test.go
index f8e9e9eb..5a89a151 100644
--- a/github/resource_github_organization_project_test.go
+++ b/github/resource_github_organization_project_test.go
@@ -13,6 +13,8 @@ import (
 )
 
 func TestAccGithubOrganizationProject_basic(t *testing.T) {
+	t.Skip("Skipping test as the GitHub REST API no longer supports classic projects")
+
 	if err := testAccCheckOrganization(); err != nil {
 		t.Skipf("Skipping because %s.", err.Error())
 	}
@@ -102,7 +104,6 @@ type testAccGithubOrganizationProjectExpectedAttributes struct {
 
 func testAccCheckGithubOrganizationProjectAttributes(project *github.Project, want *testAccGithubOrganizationProjectExpectedAttributes) resource.TestCheckFunc {
 	return func(s *terraform.State) error {
-
 		if name := project.GetName(); name != want.Name {
 			return fmt.Errorf("got project %q; want %q", name, want.Name)
 		}
diff --git a/github/resource_github_project_card_test.go b/github/resource_github_project_card_test.go
index 4172f851..facbd1a7 100644
--- a/github/resource_github_project_card_test.go
+++ b/github/resource_github_project_card_test.go
@@ -2,19 +2,20 @@ package github
 
 import (
 	"fmt"
-	"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
 	"testing"
 
+	"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
+
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
 	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
 )
 
 func TestAccGithubProjectCard(t *testing.T) {
+	t.Skip("Skipping test as the GitHub REST API no longer supports classic projects")
 
 	randomID := acctest.RandStringFromCharSet(5, acctest.CharSetAlphaNum)
 
 	t.Run("creates a project card using a note", func(t *testing.T) {
-
 		config := fmt.Sprintf(`
 
 			resource "github_organization_project" "project" {
@@ -64,11 +65,9 @@ func TestAccGithubProjectCard(t *testing.T) {
 		t.Run("with an organization account", func(t *testing.T) {
 			testCase(t, organization)
 		})
-
 	})
 
 	t.Run("creates a project card using an issue", func(t *testing.T) {
-
 		config := fmt.Sprintf(`
 
 			resource "github_repository" "test" {
@@ -97,7 +96,7 @@ func TestAccGithubProjectCard(t *testing.T) {
 			resource "github_project_card" "test" {
 				column_id    = github_project_column.test.column_id
 				content_id   = github_issue.test.issue_id
-				content_type = "Issue" 
+				content_type = "Issue"
 			}
 
 		`, randomID)
@@ -141,6 +140,5 @@ func TestAccGithubProjectCard(t *testing.T) {
 		t.Run("with an organization account", func(t *testing.T) {
 			testCase(t, organization)
 		})
-
 	})
 }
diff --git a/github/resource_github_project_column_test.go b/github/resource_github_project_column_test.go
index bc2e0dc7..bdab18a4 100644
--- a/github/resource_github_project_column_test.go
+++ b/github/resource_github_project_column_test.go
@@ -12,6 +12,8 @@ import (
 )
 
 func TestAccGithubProjectColumn_basic(t *testing.T) {
+	t.Skip("Skipping test as the GitHub REST API no longer supports classic projects")
+
 	if err := testAccCheckOrganization(); err != nil {
 		t.Skipf("Skipping because %s.", err.Error())
 	}
@@ -107,7 +109,6 @@ type testAccGithubProjectColumnExpectedAttributes struct {
 
 func testAccCheckGithubProjectColumnAttributes(column *github.ProjectColumn, want *testAccGithubProjectColumnExpectedAttributes) resource.TestCheckFunc {
 	return func(s *terraform.State) error {
-
 		if name := column.GetName(); name != want.Name {
 			return fmt.Errorf("got project column %q; want %q", name, want.Name)
 		}
diff --git a/github/resource_github_repository_project_test.go b/github/resource_github_repository_project_test.go
index 42570114..4911660f 100644
--- a/github/resource_github_repository_project_test.go
+++ b/github/resource_github_repository_project_test.go
@@ -10,11 +10,11 @@ import (
 )
 
 func TestAccGithubRepositoryProject(t *testing.T) {
+	t.Skip("Skipping test as the GitHub REST API no longer supports classic projects")
 
 	randomID := acctest.RandStringFromCharSet(5, acctest.CharSetAlphaNum)
 
 	t.Run("creates a repository project", func(t *testing.T) {
-
 		config := fmt.Sprintf(`
 
 			resource "github_repository" "test" {
@@ -60,6 +60,5 @@ func TestAccGithubRepositoryProject(t *testing.T) {
 		t.Run("with an organization account", func(t *testing.T) {
 			testCase(t, organization)
 		})
-
 	})
 }