blog: OpenTofu v1.11.0 release announcement (#396)
Some checks are pending
Deploy to GitHub Pages / deploy (push) Waiting to run

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
Signed-off-by: James Humphries <james@james-humphries.co.uk>
Signed-off-by: Diógenes Fernandes <diofeher@gmail.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: James Humphries <james@james-humphries.co.uk>
Co-authored-by: Diógenes Fernandes <diofeher@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
Martin Atkins 2025-12-09 11:10:47 -08:00 committed by GitHub
parent 2f84167aa5
commit 7b2a233a25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 85 additions and 10 deletions

View file

@ -0,0 +1,75 @@
---
title: "OpenTofu v1.11.0"
slug: opentofu-1-11-0
description: OpenTofu 1.11.0 introduces ephemeral values and a new way to conditionally enable resources.
---
Today we've released OpenTofu v1.11.0, collecting together several months of work from the OpenTofu community, including some significant new features.
## Ephemeral resources and write-only attributes
**Ephemeral values** allow OpenTofu to work with data and resources that exist only in memory during a single OpenTofu phase, guaranteeing that those values will not be persisted in state snapshots or plan files:
- Use [ephemeral resources](https://opentofu.org/docs/language/ephemerality/ephemeral-resources/) to request temporary access to stored credentials or network tunnels for use in provider or provisioner configurations, without the resulting values being saved in OpenTofu plan files or state snapshots.
For example, you could use an ephemeral resource to request time-limited AWS credentials from [OpenBao](https://openbao.org/) and provide them to the `hashicorp/aws` provider, or to open a temporary SSH tunnel so that the `cyrilgdn/postgresql` provider can access a Postgres server on a remote network.
- Use [write-only attributes](https://opentofu.org/docs/language/ephemerality/write-only-attributes/) to set resource arguments that OpenTofu needs access to only when they are changing, such as the initial administrator password for a database.
For example, you could use an ephemeral resource to generate an SSH keypair and then save the private key in your secret store using a write-only attribute so that OpenTofu itself will not need to retain its own copy of the key material.
For more information on these and other related OpenTofu language features, refer to [Ephemerality](https://opentofu.org/docs/language/ephemerality/).
## `enabled` for resources and modules
OpenTofu has traditionally allowed a module to dynamically enable or disable a particular module by using [the `count` meta-argument](https://opentofu.org/docs/v1.11/language/meta-arguments/count/) to choose between either zero or one instances of the object.
OpenTofu v1.11.0 introduces the `enabled` meta-argument, which we hope will make it easier for readers to understand that only zero or one instances of a resource are possible:
```hcl
variable "subnet" {
type = object({
id = string
})
default = null
}
variable "enable_cluster" {
type = bool
default = false
}
resource "aws_subnet" "example" {
# ...
lifecycle {
enabled = var.subnet == null
}
}
resource "aws_instance" "example" {
# ...
subnet_id = var.subnet != null ? var.subnet.id : aws_subnet.example.id
# ...
}
module "servers" {
source = "./app-cluster"
servers = 5
lifecycle {
enabled = var.enable_cluster
}
}
```
For more information, refer to [The `enabled` meta-argument](https://opentofu.org/docs/language/meta-arguments/enabled/).
## Various other improvements
There are numerous other improvements in OpenTofu v1.11. For more information, refer to [What's new in version v1.11](https://opentofu.org/docs/intro/whats-new/), or to [the OpenTofu v1.11.0 release notes](https://github.com/opentofu/opentofu/releases/tag/v1.11.0).
## Download and Install
You can download OpenTofu v1.11.0 directly from [our GitHub releases page](https://github.com/opentofu/opentofu/releases), install it using your preferred package manager, or use our official Docker images.
**[View our installation guides](/docs/intro/install/)**

View file

@ -101,7 +101,7 @@ const config: Config = {
},
docs: {
includeCurrentVersion: false,
lastVersion: "v1.10",
lastVersion: "v1.11",
docVersionRootComponent: "@theme/DocVersionRoot",
versions: {
"v1.6": {
@ -125,12 +125,12 @@ const config: Config = {
},
"v1.10": {
label: "1.10.x",
path: "",
path: "v1.10",
banner: "none",
},
"v1.11": {
label: "1.11.x (beta)",
path: "v1.11",
banner: "none",
label: "1.11.x",
path: "",
},
main: {
label: "Development",
@ -217,7 +217,7 @@ const config: Config = {
announcementBar: {
id: "opentofu-1-11-ga",
content:
'<a href="/blog/help-us-test-opentofu-1-11-0-beta1/" class="announcement-bar-link"><div class="announcement-bar-content">🎉 OpenTofu 1.11.0 Beta1 is here! <span class="announcement-arrow">→</span></div></a>',
'<a href="/blog/opentofu-1-11/" class="announcement-bar-link"><div class="announcement-bar-content">🎉 OpenTofu 1.11.0 has arrived! <span class="announcement-arrow">→</span></div></a>',
backgroundColor: "#00000000",
isCloseable: false,
},
@ -272,12 +272,12 @@ const config: Config = {
position: "left",
items: [
{
label: "v1.11.x (beta)",
href: "/docs/v1.11/",
label: "v1.11.x",
href: "/docs/",
},
{
label: "v1.10.x (current)",
href: "/docs/",
label: "v1.10.x",
href: "/docs/v1.10/",
},
{
label: "v1.9.x",