This resource allows you to create and manage cards for GitHub projects.
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 👇"
}
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"
}
The following arguments are supported:
column_id
- (Required) The ID of the card.
note
- (Optional) The note contents of the card. Markdown supported.
content_id
- (Optional) github_issue.issue_id
.
content_type
- (Optional) Must be either Issue
or PullRequest
Remarks: You must either set the note
attribute or both content_id
and content_type
.
See note example or issue example for more information.
A GitHub Project Card can be imported using its Card ID:
$ terraform import github_project_card.card 01234567