Add support for OpenTofu #7861
appleoddity
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As of right now, OpenTofu is incompatible with SAM CLI. I spent quite a bit of time trying to shoehorn it in. It's possible to create a symlink from terraform -> tofu and get SAM CLI to generate plan data. However, the SAM CLI source code hardcodes the terraform registry so that it ignores resources created with modules from the opentofu registry. This includes
null
resources.Because the serverless
terraform-aws-modules
creates a number of additional resources besides just the one that is defined in the IAC, it's not possible to control which module source it uses, specifically for thesam_metadata
null
resource.This terraform/opentofu code generates a number of additional resources, including the
sam_metadata
resource:Even though I specify the terraform registry, the sub-resources this module creates from
aws
,external
,local
andnull
do not honor that. So, we get output like this in the plan JSON:Notice the
provider_name
.At a minimum, the hardcoding of the terraform registry causes inflexibility and incompatibilities with using OpenTofu.
I propose you add an OpenTofu compatible hook.
Beta Was this translation helpful? Give feedback.
All reactions