glab-opentofu

Manage OpenTofu and Terraform state files in GitLab repositories via glab.

43|5|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/vince-winkintel/gitlab-cli-skills --skill glab-opentofu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: glab-opentofu
Source: https://github.com/vince-winkintel/gitlab-cli-skills/tree/main/glab-opentofu
Command: npx skills add https://github.com/vince-winkintel/gitlab-cli-skills --skill glab-opentofu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the management of OpenTofu and Terraform state files within GitLab, streamlining infrastructure as code workflows.

Core Features & Use Cases

  • Initialize State: Set up new OpenTofu or Terraform state configurations.
  • State Management: Perform operations like listing, downloading, deleting, locking, and unlocking state files.
  • Use Case: When setting up a new project's infrastructure, use this Skill to initialize the Terraform state backend configured in GitLab and later manage its versions.

Quick Start

Initialize the OpenTofu state named 'production' in the current directory.

Frequently Asked Questions about glab-opentofu

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Terraform state files stored in GitLab?

You can manage Terraform state files in GitLab by initializing the backend, then performing operations like listing, downloading, deleting, locking, and unlocking state files directly through GitLab's state management features.

Can I use the GitLab CLI to initialize OpenTofu state configurations?

Yes, you can use the GitLab CLI (`glab`) to initialize OpenTofu state configurations by setting up and naming the state backend within your current project directory.

Do I need the GitLab CLI to perform Terraform state operations?

Yes, the GitLab CLI (`glab`) is required to interact with GitLab's state management features for OpenTofu and Terraform deployments, enabling state initialization and lifecycle operations.

What is the best way to lock and unlock infrastructure as code state in GitLab?

The best way to lock and unlock infrastructure as code state in GitLab is by executing state management operations through the GitLab CLI, which supports locking and unlocking state files to prevent concurrent modifications.

Does this approach work for both OpenTofu and Terraform infrastructure as code workflows?

Yes, this approach works for both OpenTofu and Terraform infrastructure as code workflows, providing a unified method to initialize, list, download, delete, lock, and unlock state files within GitLab repositories.