Skip to content

Commit

Permalink
Fix reference to Terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Oct 29, 2023
1 parent 3cf5c41 commit f1d1f10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tofu-version/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ outputs yourself.

* `terraform`

The Hashicorp OpenTofu or OpenTofu version that is used by the configuration.
The Hashicorp Terraform or OpenTofu version that is used by the configuration.

* `tofu`

Expand Down
4 changes: 2 additions & 2 deletions tofu/tofuize.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def find_actions(d) -> Iterable[Path]:
yield path

def rewrite(content: str) -> str:
rewritten = re.sub(r'(?<!hashicorp\.com/)(?<!\.)(?<!-)(?<!Hashicorp )(?<!\* `)terraform(?!-github-actions|\.io|\.workspace|-switcher|.html)', 'tofu', content)
rewritten = rewritten.replace('Terraform', 'OpenTofu')
rewritten = re.sub(r'(?<!hashicorp\.com/)(?<!\.)(?<!-)(?<!\* `)terraform(?!-github-actions|\.io|\.workspace|-switcher|.html)', 'tofu', content)
rewritten = re.sub(r'(?<!Hashicorp )Terraform', 'OpenTofu', rewritten)
rewritten = re.sub(r' a OpenTofu', ' an OpenTofu', rewritten)
return rewritten

Expand Down

0 comments on commit f1d1f10

Please sign in to comment.