Change Terraform module attribute
ProprietaryChange the value of an attribute on a Terraform module block, for example to bump the version of every call site of a shared module. Modules are selected by their source address, since the same module is typically referenced under different local names.
org. openrewrite. terraform. ChangeModuleAttributeRequired
The name of the attribute to change.
The new value to set. For quoted string attributes, provide the value without quotes.
Optional
A regular expression matched against the module's source value. Only modules with a matching source will be changed. If not provided, every module block is considered.
A regular expression matched against the module's local name (its only label). If not provided, modules with any name are considered.
A regular expression to match the current attribute value. Only matching attributes will be changed. If not provided, all values will be changed. For quoted string values, match against the content without quotes.
mod run . --recipe= org. openrewrite. terraform. ChangeModuleAttribute \
-P attributeName= version \
-P newValue=2.0.0Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.