<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>The three pieces on choudoufu</title><link>https://intentius.io/choudoufu/docs/model/</link><description>Recent content in The three pieces on choudoufu</description><generator>Hugo</generator><language>en</language><atom:link href="https://intentius.io/choudoufu/docs/model/index.xml" rel="self" type="application/rss+xml"/><item><title>Identity</title><link>https://intentius.io/choudoufu/docs/model/identity/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://intentius.io/choudoufu/docs/model/identity/</guid><description>&lt;h1 id="identity"&gt;Identity&lt;a class="anchor" href="#identity"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Which real resource a configuration address refers to. AWS already knows this,&#10;once you tell it.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://intentius.io/choudoufu/diagram-identity.svg" alt="How a plan binds a configuration address to a live resource" loading="lazy"&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;Two tags, written as the resource is created.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;tofu-estate = prod-networking&#10;tofu-address = aws_vpc.main&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That pair is the entire ownership contract. Any tool that can write two tags&#10;can adopt a resource. Any tool that can read them can tell you what an estate&#10;contains.&lt;/p&gt;</description></item><item><title>Values</title><link>https://intentius.io/choudoufu/docs/model/values/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://intentius.io/choudoufu/docs/model/values/</guid><description>&lt;h1 id="values"&gt;Values&lt;a class="anchor" href="#values"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Most resources need nothing here. A resource with a cloud twin recovers its&#10;values by reading the live object, the same way it recovers its identity.&lt;/p&gt;&#10;&lt;p&gt;The exceptions are resources with no twin at all. Nothing in AWS knows a&#10;&lt;code&gt;null_resource&lt;/code&gt; ran a script, a &lt;code&gt;time_static&lt;/code&gt; captured a timestamp, or a&#10;&lt;code&gt;random_pet&lt;/code&gt; generated a name.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://intentius.io/choudoufu/diagram-values.svg" alt="Which resources need a record store, and which do not" loading="lazy"&gt;&#10;&lt;/p&gt;&#10;&lt;p&gt;Those persist as one small record each. Declare a store and they are admitted.&#10;Without one they are refused.&lt;/p&gt;</description></item><item><title>Effects</title><link>https://intentius.io/choudoufu/docs/model/effects/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://intentius.io/choudoufu/docs/model/effects/</guid><description>&lt;h1 id="effects"&gt;Effects&lt;a class="anchor" href="#effects"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;A migration that ran. A cache that was invalidated. A notification that was&#10;sent. None of them leaves anything in the cloud to read back, so no plan can&#10;tell you whether it already happened.&lt;/p&gt;&#10;&lt;p&gt;A receipt is how you make it visible.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://intentius.io/choudoufu/diagram-effects.svg" alt="A receipt makes an invisible effect visible in the plan" loading="lazy"&gt;&#10;&lt;/p&gt;&#10;&lt;h2 id="what-a-receipt-is"&gt;What a receipt is&lt;a class="anchor" href="#what-a-receipt-is"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;An ordinary resource you declare, by convention an SSM parameter at&#10;&lt;code&gt;/tofu-receipts/&amp;lt;estate&amp;gt;/&amp;lt;effect&amp;gt;&lt;/code&gt; holding a hash of the effect&amp;rsquo;s input.&lt;/p&gt;</description></item><item><title>Two runs at once</title><link>https://intentius.io/choudoufu/docs/model/concurrency/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://intentius.io/choudoufu/docs/model/concurrency/</guid><description>&lt;h1 id="two-runs-at-once"&gt;Two runs at once&lt;a class="anchor" href="#two-runs-at-once"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Ownership lives on the resources themselves, and records settle concurrent&#10;writes by conditional write. Two simultaneous applies against one estate&#10;resolve one of four ways.&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Race&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Outcome&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Two creates of the same client-named resource&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The cloud&amp;rsquo;s uniqueness constraint rejects the second. The loser re-plans, binds to the winner&amp;rsquo;s resource, and comes back clean.&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Two creates of the same server-assigned resource&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Both are created. The next plan reports a marker collision naming both live IDs and refuses rather than guessing. A human deletes one.&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Divergent in-place updates&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Last writer wins at the API. The next plan reads the live system and converges.&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;An update racing a destroy&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;The loser gets not-found, re-plans, and converges.&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;p&gt;No race orphans a resource silently. Each case is a clean re-plan or a named&#10;collision.&lt;/p&gt;</description></item></channel></rss>