New to Kestra?
Use blueprints to kickstart your first workflows.
Provision GitHub repositories as code with the Terraform GitHub provider, orchestrated by Kestra. Parameterized, reproducible, and self-service ready.
Provision GitHub repositories as code without leaving your orchestration layer. This Infrastructure as Code blueprint runs the official Terraform GitHub provider inside a Kestra flow, so a new repository (with name, description, visibility, and auto-initialization) is created declaratively and reproducibly from a couple of inputs. It solves the problem of manual, click-driven repo creation by turning repository scaffolding into a parameterized, auditable, self-service workflow that platform and DevOps teams can trigger on demand.
repository_name and description, that feed directly into the Terraform configuration.io.kestra.plugin.terraform.cli.TerraformCLI task writes an inline main.tf via inputFiles, declaring the integrations/github provider (pinned to ~> 6.0) and a github_repository resource built from the inputs.{{ secret('GITHUB_TOKEN') }}, keeping the token out of the flow code.beforeCommands runs terraform init to download the provider, then commands runs terraform plan and terraform apply -auto-approve, piping both through tee into plan_output.txt and apply_output.txt.outputFiles captures *.txt so the plan and apply logs are stored as flow outputs for review and downstream use.Terraform on its own has no scheduler, no event triggers, and no built-in run history across executions. Kestra wraps the Terraform CLI in declarative YAML, adds event and schedule triggers, retries, and full execution lineage with stored logs and outputs. You get a parameterized self-service entry point, secret management, and an audit trail that the Terraform CLI alone cannot provide. This flow intentionally runs without a remote backend, which suits one-off bootstrap and scaffolding runs; for long-lived infrastructure, configure a Terraform backend to persist state.
GITHUB_TOKEN: a GitHub Personal Access Token with permission to create repositories. See the GitHub docs on managing personal access tokens.GITHUB_TOKEN as a secret in your Kestra instance.repository_name and description.plan_output.txt and apply_output.txt in the execution outputs to confirm the repository was created.visibility, topics, branch protection, or default branch to control more repository settings.