Terragrunt: allow opting into using standard plan artifacts

As per https://docs.spacelift.io/vendors/terragrunt/limitations#mocked-outputs-and-the-apply-phase spacelift specifically DOES NOT use the plan artifacts from the plan phase for TG runs.

The way that the documentation says it it kind of makes sense .. at least as a default ..

I wish there was a way to say "We know better, we'll make sure to avoid using mocked outputs in plans, etc etc" .. and have the regular TF functionality back :)

Like in our TG setup we only use mocks for "validate", but not for other commands ..

dependency "something" {
  config_path = "some path"
  mock_outputs_allowed_terraform_commands = ["validate"]
  mock_outputs = include.global.locals.mocks.some-module
}

So we’d be safe from this particular scenario that is being described.

The alternative seems mildly scary .. you may get entirely different stuff applied than was approved, especially if you manage your state outside of spacelift.

Workaround
Ther's not one, live with the risk ..
Problem
In short, Terragrunt stacks should have a way to opt in to standard TF functionality of generating a plan artifact in the Plan phase and then using it in the Apply phase

Please authenticate to join the conversation.

Upvoters
Status

⬆️ Gathering votes

Board

💡 Feature Requests

Tags

Stacks

Date

Over 1 year ago

Subscribe to post

Get notified by email when there are changes.