Description:

ARTIFACTORY: Changes to the Terraform API may impact the ability to retrieve modules

AuthorFullName__c
Elina Floim
articleNumber
000006004
ft:sourceType
Salesforce
FirstPublishedDate
2024-01-25T09:49:18Z
lastModifiedDate
2024-03-13T16:57:23Z
VersionNumber
2
Recently, Terraform registry made unforeseen modifications to its API, which resulted in a 404 error while trying to retrieve modules from Artifactory remote repositories pointing to the Terraform upstream registry. Terraform modified the ref query parameter that is returned in the X-Terraform-Get header for modules GET requests. For example:
https://registry.terraform.io/v1/modules/cloudposse/label/null/0.24.1/download

Prior to the change, the ref query param was returned with a version string. However, following the change, the ref value now returns the last Git commit hash value.
Before the change: ref=v0.24.0 or ref=0.24.0.
After the change: ref=2de8bb4edf38c5ccc17969774cc853e2dfc36df7.

Furthermore, since Terraform was gradually rolling out this change via their CDN, the previous version values were still cached, causing inconsistencies in the Artifactory Terraform remote repository integration.