# 3.6.4

**Release Date:** May 21, 2026

---

## 🐛 Bug Fixes

### Terraform Modules

#### Add `lifecycle` Block to APIM Backend Resources 🔧

**Module:** `saif-resources` (api module)

**Commit:** [`5df320a1`](https://github.com/saif-corp/forge/commit/5df320a1665db348bd4c96a150d7459a166c87c5)

Adds `create_before_destroy = true` lifecycle blocks to the `azurerm_api_management_backend` and `azurerm_api_management_named_value` resources in the api module. This prevents apply failures in workspaces where an existing backend or named value must be replaced — previously, Terraform would attempt to destroy the old resource before creating the new one, but APIM policies referencing the backend would block deletion. With `create_before_destroy`, the new resource is created first, policies are updated to point at it, and only then is the old resource removed.

**Benefits:**

- 🚀 Eliminates 409 conflict errors when APIM backend resources are renamed or replaced
- 🔄 Ensures zero-downtime backend transitions in existing workspaces
- 🎯 Fixes apply failures caused by policy dependency ordering during resource recreation

---

#### Relax `staticsite-service` Version Constraint to `~> 3.0` 📦

**Module:** `site/infra` (app and bootstrap)

**Commit:** [`33b17395`](https://github.com/saif-corp/forge/commit/33b1739512fe169849f6ab3a788fa1724cf0aa70) (#711)

Updated the `staticsite_service` and `staticsite_bootstrap` module version constraints from pinned minor versions (`~> 3.1.0` and `~> 2.1.0`) to the more flexible `~> 3.0`. This allows the static site infrastructure to consume any `3.x` minor or patch release without requiring a manual constraint bump on every module update.

**Changes:**

- `site/infra/app/main.tf` — `staticsite_service` constraint updated from `~> 3.1.0` to `~> 3.0`
- `site/infra/bootstrap/main.tf` — `staticsite_bootstrap` constraint updated from `~> 2.1.0` to `~> 3.0`

**Benefits:**

- 🚀 Static site infrastructure automatically picks up new `3.x` patch and minor releases
- 🔄 Eliminates manual version bumps for every staticsite module release

---

#### Fix Missing `owner` Parameter in `saif-event-service` Template 🛠️

**Module:** `saif-event-service` (template)

**Commit:** [`2fce211e`](https://github.com/saif-corp/forge/commit/2fce211e881e787ad26dee887449bf390fe6c5ea) (#713)

Fixes a runtime error where Terraform running the `saif-event-service` module would fail with `Error: Unable to read workspace ... resource not found` for `data.tfe_outputs.team_services`. The root cause was a missing `owner` parameter when calling `module "event_service"` in the template.

The namer module resolves the TFC team workspace name using:

```
TeamWorkspace = lower("${local.Owner.Name}-${var.TerraformCloudService}-${local.Environment.ShortName}")
```

Without `owner`, `local.Owner` falls back to `{ Name = "" }`, producing an invalid workspace name with a leading hyphen (e.g. `-azure-tst`). This workspace doesn't exist in TFC, causing `data.tfe_outputs.team_services` to fail.

**Changes:**

- Added `owner = local.variables.owner` to `module "event_service"` in the template source
- Updated verified snapshot to match

**Benefits:**

- 🚀 Fixes `saif-event-service` apply failures for new workspace provisioning
- 🎯 Ensures correct TFC team workspace resolution when reading shared outputs

---

## 🔄 Breaking Changes

None in this release ✅

---

## 📋 Additional Notes

- Total commits: 3
- Files changed: 5
- Contributors: Emmitt Johnson, Brian Sheridan, Jason Coria Corona Yue

---

### 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)

---
