Does terramate do change detection in remote modules? #1266
-
In the change detection article here: https://terramate.io/docs/cli/change-detection/ I can only see change detection of local modules mentioned. Does it mean that references to remote modules are not considered for change detection at all? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
In the case of remote modules, their module version is pinned in the |
Beta Was this translation helpful? Give feedback.
-
Hi,
No I am at this stage considering if terramate could be a better tool for my company.
The issue I see is that we do not version modules independently - they are in a module repo which is tagged every time any module is updated for simplicity reasons.
I assume that this then means terramate would consider every update to a module tag as a change to all modules and that is not what I want to achieve.
Unless there is actual syntax/code analysis going on checking if given part actually changed?
Sent from Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: i4k ***@***.***>
Sent: Friday, December 1, 2023 3:11:53 PM
To: terramate-io/terramate ***@***.***>
Cc: Tomasz Kluczkowski ***@***.***>; Mention ***@***.***>
Subject: Re: [terramate-io/terramate] Does terramate do change detection in remote modules? (Discussion #1266)
Hi @Tomasz-Kluczkowski<https://github.com/Tomasz-Kluczkowski>
In the case of remote modules, their module version is pinned in the module.source then whenever you update the version, Terramate detects this change because the file was changed (normal change detection). AFAICS no special handling is needed for remote modules.
If you think that's not the case, can you elaborate?
—
Reply to this email directly, view it on GitHub<#1266 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGGVI2MPLBAQEZYCXF5DKXDYHHXTTAVCNFSM6AAAAABACU465GVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TOMZQGU4DS>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Actually the answer would be "No, terramate will not detect all stacks as changed always when updating the remote repository"; Terramate just considers it a change if you change the tag in a reference to a module. When the module on the remote side changes, terramate is not aware of this. In case you do not reference anything or use refs like
main
orlatest
, terramate will actually not detect any remote changes ever.If you reference a Terraform Module with something like
source = "github.com/org/repo?ref=v1.2"
and change the ref tov1.3
then Terramate will notice the change in the change detection as the actual code changed. This is true for generated code or plain Terraform.If you chan…