Google Cloud Storage
Overview
Section titled “Overview”A GCS source is identified by a bucket and an object. Terragrunt reads the object’s metadata to derive a content-addressed cache key.
The cheap probe
Section titled “The cheap probe”The probe Terragrunt uses to attempt to avoid fetching GCS sources is an object metadata read. It downloads no body. Terragrunt reads the object’s MD5 checksum when present, falling back to its CRC32C checksum, which GCS populates for every object.
Cache key & deduplication
Section titled “Cache key & deduplication”Both MD5 and CRC32C are content hashes, so the key is content-addressed and identical object bytes deduplicate across URLs and buckets. File blobs are content-addressed.
Cache miss
Section titled “Cache miss”If the metadata read fails, or returns no usable checksum, Terragrunt downloads the object and keys the tree by the content hash of what it fetched. A fresh probe key that is not yet stored also downloads, then stores under that key.
Cache hit
Section titled “Cache hit”When the probe returns a checksum already present in the store, Terragrunt links the cached tree without downloading.
Fallback behavior
Section titled “Fallback behavior”Any error reading object metadata makes the probe yield no key, and Terragrunt falls back to downloading and content-hashing the object.