Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Using OpenTofu's Exclude Flag to Isolate Performance Bottlenecks

OpenTofu's new `-exclude` flag lets users skip specific resources during plan/apply operations. This helps isolate performance bottlenecks by avoiding the evaluation of slow modules or providers, making debugging and iteration faster without altering the configuration.

Background

OpenTofu is an open-source fork of Terraform, the widely-used infrastructure-as-code tool originally created by HashiCorp. After HashiCorp changed Terraform's license to a non-open-source one in 2023, the Linux Foundation launched OpenTofu as a community-maintained alternative. Infrastructure-as-code means managing cloud resources (servers, databases, networks) through declarative configuration files rather than clicking around in a dashboard. This article discusses a specific OpenTofu feature — the `--exclude` flag — which lets users skip certain resources during planning or applying changes, a capability that helps isolate which part of a large configuration is causing slow performance. The post is written by Masterpoint, a consulting firm that specializes in cloud infrastructure and OpenTofu/Terraform tooling.

Related stories