Using OpenTofu with Hashicorp Terraform Cloud

OpenTofu is the open-source fork of Terraform.

It advertises itself as a drop-in replacement for Hashicorp Terraform.

If you’re wondering whether you can use Hashicorp’s Terraform Cloud backend with OpenTofu, you can.

All you need to do is set the hostname explicitly in your cloud backend definition to app.terraform.io.

terraform {
  cloud {
    organization = "example_corp"
    ## Required for Terraform Enterprise; Defaults to app.terraform.io for Terraform Cloud
    hostname = "app.terraform.io"
  }
}

Like what you've read?

If you're an engineering leader or developer, you should subscribe to my 80/20 DevOps Newsletter. Give me 1 minute of your day, and I'll teach you essential DevOps skills. I cover topics like Kubernetes, AWS, Infrastructure as Code, and more.

Not sure yet? Check out the archive.

Unsubscribe at any time.