glab(1)

πŸ’… glab(1) β€” glab-opentofu-init πŸ’…

πŸŽ€ NAME πŸŽ€

glab-opentofu-init β€” Initialize OpenTofu or Terraform.

✨ SYNOPSIS ✨

glab opentofu init  [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so bestie, this command configures the GitLab HTTP backend for OpenTofu or Terraform state and then runs tofu init. You must run this from a GitLab project repository β€” no cap, it's a whole requirement.

If glab is installed as a snap, it cannot run OpenTofu or Terraform binaries installed on the host or by other snaps. So put the binary in your home directory and pass its path with --binary. That's the move. πŸ’…

🌸 OPTIONS 🌸

  • -b, --binary="tofu" β€” Name or path of the OpenTofu or Terraform binary to use for the initialization. Default is "tofu", periodt.
  • -d, --directory="." β€” Directory of the OpenTofu or Terraform project to initialize. Default is ".", iykyk.

πŸ’… OPTIONS INHERITED FROM PARENT COMMANDS πŸ’…

  • -h, --help[=false] β€” Show help for this command. Very demure, very helpful.
  • -R, --repo="" β€” Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. Iconic flexibility fr.

πŸ”₯ EXAMPLE πŸ”₯

# Initialize state with name production in working directory
glab opentofu init production

# Initialize state with name production in infra/ directory
glab opentofu init production -d infra/

# Initialize state with name production with Terraform
glab opentofu init production -b terraform

# Initialize state with name production with reconfiguring state
glab opentofu init production -- -reconfigure

🌈 SEE ALSO 🌈

glab-opentofu(1) β€” go check that one too, bestie 🫢


This page was auto generated by spf13/cobra, dated Nov 2026, and it's the glab(1) page β€” slay and goodbye. πŸ’–βœ¨

πŸ“¦ where this page comes from