github_actions_organization_variable

This resource allows you to create and manage GitHub Actions variables within your GitHub organization. You must have write access to a repository to use this resource.

Example Usage

resource "github_actions_organization_variable" "example_variable" {
  variable_name   = "example_variable_name"
  visibility      = "private"
  value           = "example_variable_value"
}
data "github_repository" "repo" {
  full_name = "my-org/repo"
}

resource "github_actions_organization_variable" "example_variable" {
  variable_name           = "example_variable_name"
  visibility              = "selected"
  value                   = "example_variable_value"
  selected_repository_ids = [data.github_repository.repo.repo_id]
}

Argument Reference

The following arguments are supported:

Attributes Reference

Import

This resource can be imported using an ID made up of the variable name:

$ terraform import github_actions_organization_variable.test_variable test_variable_name