Skip to content

Add OpenTofu CLI support to Terraform plugin#585

Open
ianneub wants to merge 1 commit into1Password:mainfrom
ianneub:add-opentofu-support
Open

Add OpenTofu CLI support to Terraform plugin#585
ianneub wants to merge 1 commit into1Password:mainfrom
ianneub:add-opentofu-support

Conversation

@ianneub
Copy link

@ianneub ianneub commented Mar 4, 2026

Overview

Add OpenTofu as a new executable in the existing Terraform plugin, allowing tofu commands to authenticate via 1Password shell plugins.

Type of change

  • Created a new plugin
  • Improved an existing plugin
  • Fixed a bug in an existing plugin
  • Improved contributor utilities or experience

Related Issue(s)

How To Test

This change should work identically to the terraform version of the plug in, only it will act with tofu.

To test:

  1. Install OpenTofu (brew install opentofu on macos)
  2. Ensure tofu is aliased to op: alias tofu='op plugin run -- tofu'
  3. In an empty dir create main.tf with the following config:
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.0"
    }
  }
}

provider "aws" {}

data "aws_caller_identity" "current" {}

output "account_id" {
  value = data.aws_caller_identity.current.account_id
}

output "caller_arn" {
  value = data.aws_caller_identity.current.arn
}

output "caller_user_id" {
  value = data.aws_caller_identity.current.user_id
}

Run tofu init

Choose an AWS Access Key credential type.

The command should complete successfully.

Optionally run tofu apply

Changelog

  • Terraform plugin now supports OpenTofu authentication via tofu command line.

Add OpenTofu as a new executable in the existing Terraform plugin,
allowing `tofu` commands to authenticate via 1Password shell plugins.

Closes 1Password#483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terraform plugin: Add support for OpenTofu

1 participant