pub struct PlanFile {
pub version: u32,
pub generated_at: DateTime<Utc>,
pub braze_sync_version: String,
pub scope: PlanScope,
pub ops: Vec<PlanOp>,
pub values_input_hashes: BTreeMap<String, String>,
}Fields§
§version: u32§generated_at: DateTime<Utc>§braze_sync_version: String§scope: PlanScope§ops: Vec<PlanOp>§values_input_hashes: BTreeMap<String, String>Per-resource hash of the subset of values/<env>.yaml that
the resource’s templated body consumes (RFC §4 Phase 6).
Keys are "<kind>/<name>", values are blake3 hex digests.
Compared at apply --plan time so that values edits made
between plan and apply (including non-obvious global edits
that fan out to many resources) trigger Error::PlanDrift
instead of silently shipping different values than reviewed.
#[serde(default)] keeps old plan files (pre-v0.14)
readable: a missing field deserializes as an empty map, and
apply --plan treats an empty saved-hashes map as “plan
pre-dates the values hash feature, skip the integrity
check” (the saved ops + scope checks still run).
Implementations§
Source§impl PlanFile
impl PlanFile
pub fn from_summary( summary: &DiffSummary, environment: impl Into<String>, resource: Option<ResourceKind>, name: Option<String>, archive_orphans: bool, ) -> Self
pub fn read_from(path: &Path) -> Result<Self>
pub fn write_to(&self, path: &Path) -> Result<()>
Sourcepub fn diff_ops(&self, fresh: &[PlanOp]) -> PlanOpsDiff
pub fn diff_ops(&self, fresh: &[PlanOp]) -> PlanOpsDiff
Compare saved ops against fresh as a multiset over (kind, name, op_type), order-independent. collect_ops is invariant-by-design
unique per (kind, name) today, but we use a merge walk rather
than a set so duplicates would surface as drift instead of being
silently collapsed.