Skip to content

Add tofu steps to CI#5

Merged
TobiasBabin merged 9 commits intomainfrom
feat-add-opentofu-checks
Nov 21, 2025
Merged

Add tofu steps to CI#5
TobiasBabin merged 9 commits intomainfrom
feat-add-opentofu-checks

Conversation

@TobiasBabin
Copy link
Contributor

@TobiasBabin TobiasBabin commented Nov 20, 2025

This PR adds tofu init and tofu validate as additional steps to the standard CI for the TF modules in this GitHub org, supplementing the existing terraform steps.

The tofu commands are placed in a separate job so that code is checked out fresh and the .terraform files do not get in the way of each other.

The tofu test step is not added. [Edit] The tofu test step is included. Note: due to different behavior of OpenTofu when generating values in mocked providers, OpenTofu tests may fail until all generated values are explicitly mocked to adhere to the proper format. This is a known issue and kind of documented.

E.g. an AWS ARN value would have to be mocked like this:

mock_provider "aws" {
  mock_resource "aws_iam_policy" {
    defaults = {
      policy_arn = "arn:aws:iam::123456789012:policy/3c438f62b542dbe53234f3fd24d66a4fed329ac7"
    }
  }
}

Given that present modules are being backported to mock values in that way, the tofu test step is now included.

@TobiasBabin TobiasBabin merged commit 72e57b2 into main Nov 21, 2025
@TobiasBabin TobiasBabin deleted the feat-add-opentofu-checks branch November 21, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants