Use the github_actions_organization_secret resource to manage secrets available to GitHub Actions across an entire organization.
Security Note: While the value field is marked as sensitive in Terraform, it is not hidden from state files. Always treat your Terraform state as sensitive. To avoid storing plaintext in your code, it is recommended to use value_encrypted populated from a variable or data source.
Access Control: You can control which repositories can access the secret using the visibility argument. Valid values are:
all: All repositories in the organization.private: Only private repositories.selected: Only specific repositories (requires managing github_actions_organization_secret_repositories).
resource "github_actions_organization_secret" "example" {
secret_name = "EXAMPLE_SECRET_NAME"
value = "example-value"
visibility = "all"
}