Parent
gitops-k8s#2530
What to build
A new TFM module github-org-variable-section that manages GitHub Actions organization variables via github_actions_organization_variable resources, with idempotency support.
Input contract — the module accepts var.config with shape:
variable "config" {
type = object({
org = string
variables = map(object({
value = string
visibility = string # "all" | "selected"
selected_repository_ids = optional(list(number))
}))
})
}
Behaviour:
- Uses
for_each over var.config.variables to create github_actions_organization_variable resources keyed by variable name
- When
visibility = "selected", passes selected_repository_ids (resolved repo IDs from the entity)
- Outputs the set of managed variable names as
managed_variables (accumulated across runs, persisted via Kubernetes outputs Secret). This output enables the entity to compute which variables are new-to-module and trigger apply-time adoption.
Acceptance criteria
Blocked by
None — can start immediately.
Parent
gitops-k8s#2530
What to build
A new TFM module
github-org-variable-sectionthat manages GitHub Actions organization variables viagithub_actions_organization_variableresources, with idempotency support.Input contract — the module accepts
var.configwith shape:Behaviour:
for_eachovervar.config.variablesto creategithub_actions_organization_variableresources keyed by variable namevisibility = "selected", passesselected_repository_ids(resolved repo IDs from the entity)managed_variables(accumulated across runs, persisted via Kubernetes outputs Secret). This output enables the entity to compute which variables are new-to-module and trigger apply-time adoption.Acceptance criteria
configobject viaterraform.tfvars.json(gh-provisioner compatible)for_eachcreates onegithub_actions_organization_variableper entry invariablesmapselectedvisibility correctly passesselected_repository_idsallvisibility omitsselected_repository_idsmanaged_variables: set of variable names from the current runvisibilityenum (all, selected)Blocked by
None — can start immediately.