no-duplicate-deployment-literal
Share repeated cloud deployment values through variables, locals or resource references.
Why
Repeating deployment identities and locations scatters configuration across resource declarations and makes coordinated changes harder to review.
Fix
Prefer an existing resource/data reference or caller input. A shared local is appropriate only for an intentionally fixed composition-root value; moving an environment-specific literal into a local does not satisfy SARJ219. Keep independently configurable scopes independent.
Examples
resource "cloudflare_r2_bucket" "a" { account_id = "example-account" }resource "cloudflare_r2_bucket" "b" { account_id = "example-account" }variable "account_id" { type = string }resource "cloudflare_r2_bucket" "a" { account_id = var.account_id }resource "cloudflare_r2_bucket" "b" { account_id = var.account_id }resource "google_storage_bucket" "a" { project = "example-project" }resource "google_cloud_run_v2_job" "b" { project = "example-project" }variable "project_id" { type = string }resource "google_storage_bucket" "a" { project = var.project_id }resource "google_cloud_run_v2_job" "b" { project = var.project_id }