github_project_card

This resource allows you to create and manage cards for GitHub projects.

Example Usage

resource "github_organization_project" "project" {
  name = "An Organization Project"
  body = "This is an organization project."
}

resource "github_project_column" "column" {
  project_id = github_organization_project.project.id
  name       = "Backlog"
}

resource "github_project_card" "card" {
  column_id = github_project_column.column.column_id
  note        = "## Unaccepted 👇"
}

Example Usage adding an Issue to a Project

resource "github_repository" "test" {
  name = "myrepo"
  has_projects = true
  has_issues   = true
}

resource "github_issue" "test" {
  repository       = github_repository.test.id
  title            = "Test issue title"
  body             = "Test issue body"
}

resource "github_repository_project" "test" {
  name            = "test"
  repository      = github_repository.test.name
  body            = "this is a test project"
}

resource "github_project_column" "test" {
  project_id = github_repository_project.test.id
  name       = "Backlog"
}

resource "github_project_card" "test" {
  column_id    = github_project_column.test.column_id
  content_id   = github_issue.test.issue_id
  content_type = "Issue"
}

Argument Reference

The following arguments are supported:

Remarks: You must either set the note attribute or both content_id and content_type. See note example or issue example for more information.

Import

A GitHub Project Card can be imported using its Card ID:

$ terraform import github_project_card.card 01234567