# 3.8.2

**Release Date:** July 27, 2026

---

## 🐛 Bug Fixes

### Terraform Modules

#### Strip Sensitivity Mark From Front Door Custom Domain List 🔗

**Module:** `saif-event-service`

Fixes a `terraform plan` failure that broke event-service deployments on 3.8.1, replacing the "Duplicate object key" error that 3.8.1 set out to fix:

```text
Error: Invalid for_each argument

  local.create_api is true
  local.fd_custom_domain_ids has a sensitive value

Sensitive values, or values derived from sensitive values, cannot be used as
for_each arguments.
```

3.8.1 wrapped `fd_custom_domain_ids` in `distinct(...)` to dedupe colliding custom domain IDs. Like most Terraform functions, `distinct()` coarsens the sensitivity marks of its arguments onto the whole result — so the local changed from a tuple carrying per-element marks into a wholly sensitive list. The existing `nonsensitive(id) => nonsensitive(id)` in the `azurerm_cdn_frontdoor_custom_domain_association` `for_each` only strips marks at the element level, leaving the new collection-level mark in place.

The fix wraps the entire list in `nonsensitive(...)` before iterating, matching the pattern already proven in `saif-resources/modules/api`. `compact()` is also applied alongside `distinct()` for parity with that module, guarding against a null or missing domain ID that would break the same `for_each`.

No state migration is needed — the `for_each` map keys are unchanged (still the domain ID string).

A regression test now marks the custom domain IDs sensitive so this path is exercised in CI. The existing tests passed plain, unmarked values, which is why neither the original 3.8.0 duplicate-key bug nor this follow-on was caught before release.

---

## 🔄 Breaking Changes

None in this release ✅

---

## 📋 Additional Notes

- Total commits: 1
- Files changed: 3

---

### Support

- 📧 Teams Support Channel: [Support](https://teams.microsoft.com/l/channel/19%3Acb611810fb0b42b080cfff5590bdd51c%40thread.tacv2/Support?groupId=514d2dac-2d62-48ce-bf99-0fa0ce39469c&tenantId=a86cb8ed-369b-4df5-ace5-43811f6e08cf)

---
