A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.
A policy is a configurable behavior you attach to a stack. Where a forma declares what resources should exist, a policy declares how formae should manage the stack’s lifecycle over time, without you having to run another apply.formae has two built-in policy types:
TTL policy: destroys a stack and its resources after a set duration.
Auto-reconcile policy: re-applies the stack’s declared state at a fixed interval, undoing out-of-band and incremental changes.
You can define a policy two ways.Inline policies live directly inside a stack definition. They belong to that stack alone and are deleted along with it.
new formae.Stack { label = "dev-environment" policies = new Listing { new formae.TTLPolicy { ttl = 4.h onDependents = "cascade" } }}
Reusable policies are standalone objects, defined once and referenced from any number of stacks with .res. Changes to the policy propagate to every stack that references it.
local ephemeralPolicy = new formae.TTLPolicy { label = "ephemeral-1h" ttl = 1.h onDependents = "abort"}forma { ephemeralPolicy new formae.Stack { label = "dev-stack-1" policies = new Listing { ephemeralPolicy.res } } new formae.Stack { label = "dev-stack-2" policies = new Listing { ephemeralPolicy.res } }}
Aspect
Inline
Reusable
Label
None
Required
Lifecycle
Follows the stack’s declaration; deleted with the stack
Independent, must be explicitly deleted
Sharing
Single stack only
Any number of stacks
Use case
One-off behavior
Consistent policy across stacks
Reach for a reusable policy as soon as you find yourself copying the same ttl or interval value into more than one stack. A single source of truth means one edit updates every stack that uses it.
In reconcile mode, the applied forma is the source of truth for a stack’s policies, the same way it is for the stack’s resources:
Inline policy: re-apply the stack without the policy in its policies listing, and the policy is deleted.
Reusable policy: re-apply the stack without the .res reference, and the policy is detached from that stack. The standalone policy object itself lives on, attached to whatever other stacks still reference it, until it is destroyed.
This also means an inline policy added outside the forma (for example through an operator tool) does not survive the next reconcile of a stack the forma declares: declare it in the forma to keep it. Patch mode never touches policies you don’t mention.
Lists reusable policies only, since inline policies have no independent identity outside their stack. To see which policy, inline or reusable, is attached to a given stack, check the stack itself:
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"formae","colors":{"primary":"#ff8201","light":"#ff8201","dark":"#9c4f00"},"logo":{"light":"https://mintcdn.com/platform-engineering-labs/mNa46DBzXSjV0agT/logo/formae-logo-light.png?fit=max\u0026auto=format\u0026n=mNa46DBzXSjV0agT\u0026q=85\u0026s=8563b5284bd2cf259539ff5e7b9d457f","dark":"https://mintcdn.com/platform-engineering-labs/mNa46DBzXSjV0agT/logo/formae-logo-dark.png?fit=max\u0026auto=format\u0026n=mNa46DBzXSjV0agT\u0026q=85\u0026s=12888995934ece68e08ef7c2c8da99b7"},"favicon":"https://mintcdn.com/platform-engineering-labs/CG7M-6iCStm7YFly/logo/favicon.ico?fit=max\u0026auto=format\u0026n=CG7M-6iCStm7YFly\u0026q=85\u0026s=dbfd5946ac35d39a009c90d67740874a","appearance":{"default":"dark"},"background":{"decoration":"grid","color":{"light":"#f4f5fb","dark":"#05051f"}},"fonts":{"heading":{"family":"Saans","weight":700,"source":"fonts/Saans-Bold.woff2","format":"woff2"},"body":{"family":"Saans","weight":400,"source":"fonts/Saans-Regular.woff2","format":"woff2"}},"styling":{"codeblocks":{"languages":{"custom":["/languages/pkl.json"]}},"latex":true},"banner":{"content":"The formae MCP plugin is now **formae**. Uninstall **formae-mcp** and install **formae**. [Migration steps](/documentation/guides/ai-coding-assistants#migrate-from-formae-mcp).","dismissible":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"platform-engineering-labs","hasAudioNarration":false,"actualSubdomain":"platform-engineering-labs","customDomains":["docs.formae.ai"],"gitSource":{"type":"github","owner":"platform-engineering-labs","repo":"formae-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"5e7fa02b-cbcc-4078-aba0-ba3b5a3518af","liveDeploymentHistoryId":"6ac68da1059039e5661c1ae1","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ac68da1059039e5661c1ae1"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ac68da1059039e5661c1ae1","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Documentation","count":103},{"language":"default","tag":"Reference","count":59},{"language":"default","tag":"Plugin development","count":34},{"language":"default","tag":"Cloud providers","count":33},{"language":"default","tag":"Guides","count":32},{"language":"default","tag":"Concepts","count":24},{"language":"default","tag":"Get started","count":22},{"language":"default","tag":"Common patterns","count":22},{"language":"default","tag":"CLI","count":16},{"language":"default","tag":"Tutorial","count":16}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--brand-navy:#02024b;--brand-orange:#ff8201;--brand-orange-deep:#e07301;--brand-sky:#29abe2;--brand-green:#00c153;--brand-radius:12px;--brand-mono:\"Saans Mono\", ui-monospace, SFMono-Regular, Menlo, monospace;--brand-mono-safe:ui-monospace, \"SF Mono\", SFMono-Regular, Menlo, Consolas, monospace;--brand-ink:#0a0a1f;--brand-ink-soft:#494c66;--brand-ink-faint:rgba(2, 2, 75, 0.62);--brand-rail:rgba(255, 255, 255, 0.55);--brand-card:rgba(255, 255, 255, 0.78);--brand-edge:rgba(2, 2, 75, 0.13);--brand-edge-strong:rgba(2, 2, 75, 0.26)}html.dark{--brand-ground:#05051f;--brand-ink:#ffffff;--brand-ink-soft:#cccccc;--brand-ink-faint:rgba(255, 255, 255, 0.55);--brand-rail:rgba(255, 255, 255, 0.03);--brand-card:rgba(255, 255, 255, 0.045);--brand-edge:rgba(255, 255, 255, 0.12);--brand-edge-strong:rgba(255, 255, 255, 0.22)}@font-face{font-family:\"Saans Mono\";src:url(/fonts/SaansMono-Medium.woff2) format(\"woff2\");font-weight:500;font-style:normal;font-display:swap}code,kbd,samp{font-family:var(--brand-mono)}pre,pre code,pre.shiki,pre.shiki code{font-family:var(--brand-mono-safe)}.nav-logo{height:2.625rem!important}.fa-convo{border:1px solid var(--brand-edge);border-radius:var(--brand-radius);background:var(--brand-card);overflow:hidden;margin:1.1rem 0}.fa-convo-head{display:flex;align-items:center;gap:8px;padding:8px 16px;font-family:var(--brand-mono);font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--brand-ink-faint);background:var(--brand-rail);border-bottom:1px solid var(--brand-edge)}.fa-convo-head::before{content:\"\";width:8px;height:8px;border-radius:999px;background:var(--brand-orange)}.fa-turn{display:grid;grid-template-columns:82px 1fr;gap:14px;padding:13px 16px;border-left:3px solid transparent}.fa-turn+.fa-turn{border-top:1px solid var(--brand-edge)}.fa-turn.fa-bot{border-left-color:var(--brand-orange)}.fa-tag{font-family:var(--brand-mono);font-size:11px;letter-spacing:.03em;text-transform:uppercase;font-weight:600;padding-top:2px}.fa-turn.fa-you .fa-tag{color:var(--brand-orange)}.fa-turn.fa-bot .fa-tag{color:var(--brand-ink-faint)}.fa-body{margin:0}@media (max-width:640px){.fa-turn{grid-template-columns:62px 1fr;gap:10px}}.fa-term{border-radius:16px;overflow:hidden;border:1px solid rgba(255,255,255,.1);margin:1.1rem 0;background:#0b0c0e}.fa-term-body{color:#ccc;padding:14px 16px;overflow-x:auto;white-space:nowrap;font-family:var(--brand-mono-safe);font-size:12.5px;line-height:1.1}.fa-term-banner{display:flex;align-items:flex-end;gap:12px;padding:16px 16px 2px}.fa-term-banner img{display:block;width:165px;max-width:55%;height:auto;margin:0!important}.fa-term-ver{font-family:var(--brand-mono-safe);font-size:12.5px;line-height:1;padding-bottom:3.5px;color:rgba(255,255,255,.45)}.fa-term-banner+.fa-term-body{padding-top:6px}.fa-plate img,.fa-plate>div{border-radius:var(--brand-radius)}.fa-plate img{border:1px solid var(--brand-edge)}html.dark .fa-plate img{background:#fff;padding:14px}html:not(.dark) span[style*=\"rgba(255, 130, 1, 0.1)\"]{background:0 0!important}.fa-arch{margin:1.5rem 0}.fa-arch img{width:100%;height:auto}.fa-arch .fa-arch-d,html.dark .fa-arch .fa-arch-l{display:none}.fa-arch img,html.dark .fa-arch .fa-arch-d{display:block}html:not(.dark) .prose a{border-bottom-color:#9c4f00;border-bottom-width:1.5px}html:not(.dark) .prose a:hover{border-bottom-width:2.5px}body,html{overflow-x:clip!important}"}],"page":{"pagePath":"documentation/concepts/policy","slug":"/documentation/concepts/policy","pageMetadata":{"title":"Policy","sidebarTitle":"Overview","description":"A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.","href":"/documentation/concepts/policy"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A policy is a configurable behavior you attach to a stack. Where a forma declares what resources should exist, a policy declares how formae should manage the stack’s lifecycle over time, without you having to run another `,_jsx(_components.code,{children:`apply`}),`.`]}),`\n`,_jsx(_components.p,{children:`formae has two built-in policy types:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`/documentation/concepts/policies/ttl`,children:`TTL policy`})}),`: destroys a stack and its resources after a set duration.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`/documentation/concepts/policies/auto-reconcile`,children:`Auto-reconcile policy`})}),`: re-applies the stack’s declared state at a fixed interval, undoing out-of-band and incremental changes.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`inline-vs-reusable-policies`,children:`Inline vs. reusable policies`}),`\n`,_jsx(_components.p,{children:`You can define a policy two ways.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Inline policies`}),` live directly inside a stack definition. They belong to that stack alone and are deleted along with it.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`pkl`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`pkl`,children:_jsxs(_components.code,{language:`pkl`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` formae`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.Stack {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dev-environment\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` policies`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Listing `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` formae`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.TTLPolicy {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ttl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.h`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` onDependents`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cascade\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Reusable policies`}),` are standalone objects, defined once and referenced from any number of stacks with `,_jsx(_components.code,{children:`.res`}),`. Changes to the policy propagate to every stack that references it.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`pkl`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`pkl`,children:_jsxs(_components.code,{language:`pkl`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`local`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ephemeralPolicy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` formae`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.TTLPolicy {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ephemeral-1h\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ttl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.h`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` onDependents`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abort\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`forma`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ephemeralPolicy`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` formae`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.Stack {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dev-stack-1\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` policies`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Listing `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ ephemeralPolicy.res }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` formae`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.Stack {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dev-stack-2\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` policies`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Listing `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ ephemeralPolicy.res }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Aspect`}),_jsx(_components.th,{children:`Inline`}),_jsx(_components.th,{children:`Reusable`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Label`}),_jsx(_components.td,{children:`None`}),_jsx(_components.td,{children:`Required`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Lifecycle`}),_jsx(_components.td,{children:`Follows the stack’s declaration; deleted with the stack`}),_jsx(_components.td,{children:`Independent, must be explicitly deleted`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sharing`}),_jsx(_components.td,{children:`Single stack only`}),_jsx(_components.td,{children:`Any number of stacks`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Use case`}),_jsx(_components.td,{children:`One-off behavior`}),_jsx(_components.td,{children:`Consistent policy across stacks`})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Reach for a reusable policy as soon as you find yourself copying the same `,_jsx(_components.code,{children:`ttl`}),` or `,_jsx(_components.code,{children:`interval`}),` value into more than one stack. A single source of truth means one edit updates every stack that uses it.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`removing-a-policy`,children:`Removing a policy`}),`\n`,_jsx(_components.p,{children:`In reconcile mode, the applied forma is the source of truth for a stack’s policies, the same way it is for the stack’s resources:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Inline policy`}),`: re-apply the stack without the policy in its `,_jsx(_components.code,{children:`policies`}),` listing, and the policy is deleted.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reusable policy`}),`: re-apply the stack without the `,_jsx(_components.code,{children:`.res`}),` reference, and the policy is detached from that stack. The standalone policy object itself lives on, attached to whatever other stacks still reference it, until it is destroyed.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This also means an inline policy added outside the forma (for example through an operator tool) does not survive the next reconcile of a stack the forma declares: declare it in the forma to keep it. Patch mode never touches policies you don’t mention.`}),`\n`,_jsx(Heading,{level:`2`,id:`querying-policies`,children:`Querying policies`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`formae`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` inventory`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` policies`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Lists reusable policies only, since inline policies have no independent identity outside their stack. To see which policy, inline or reusable, is attached to a given stack, check the stack itself:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`formae`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` inventory`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` stacks`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`see-also`,children:`See also`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/documentation/concepts/policies/ttl`,children:`TTL policy`}),`: automatic cleanup after a duration.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/documentation/concepts/policies/auto-reconcile`,children:`Auto-reconcile policy`}),`: automatic enforcement of declared state.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/documentation/concepts/stack`,children:`Stack`}),`: the unit a policy attaches to.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"languages":{"custom":["/languages/pkl.json"]}},"config":{},"pageMetadata":{"title":"Policy","sidebarTitle":"Overview","description":"A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.","href":"/documentation/concepts/policy"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Inline vs. reusable policies","slug":"inline-vs-reusable-policies","depth":2,"children":[]},{"title":"Removing a policy","slug":"removing-a-policy","depth":2,"children":[]},{"title":"Querying policies","slug":"querying-policies","depth":2,"children":[]},{"title":"See also","slug":"see-also","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/platform-engineering-labs/4ffdbad5874a08d3/posthog.js"],"subdomain":"platform-engineering-labs","siteName":"formae","title":"Policy - formae","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-30T21:54:24.318Z","originalFileLocation":"documentation/concepts/policy.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.\">\u003cmeta data-mint-head name=\"application-name\" content=\"formae\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Policy - formae\">\u003cmeta data-mint-head property=\"og:description\" content=\"A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"formae\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.formae.ai/documentation/concepts/policy\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://platform-engineering-labs.mintlify.app/_mintlify/api/og/v2?division=Policies\u0026amp;title=Policy\u0026amp;description=A+policy+is+a+lifecycle+rule+you+attach+to+a+stack%3A+automatic+cleanup+after+a+duration%2C+or+automatic+enforcement+of+declared+state.\u0026amp;theme=07768c424fb26f39d157f55a\u0026amp;signature=0b460dafe23bfde8f0ad7740e6292387739ae6a7bb834063ab053d5717091be5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Policy - formae\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://platform-engineering-labs.mintlify.app/_mintlify/api/og/v2?division=Policies\u0026amp;title=Policy\u0026amp;description=A+policy+is+a+lifecycle+rule+you+attach+to+a+stack%3A+automatic+cleanup+after+a+duration%2C+or+automatic+enforcement+of+declared+state.\u0026amp;theme=07768c424fb26f39d157f55a\u0026amp;signature=0b460dafe23bfde8f0ad7740e6292387739ae6a7bb834063ab053d5717091be5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/platform-engineering-labs/ih3MxqvV1WG3EvUf/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"formae\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff8201\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.formae.ai/documentation/concepts/policy\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/documentation/concepts/policy.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.formae.ai/#organization\",\"name\":\"formae\",\"url\":\"https://docs.formae.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/platform-engineering-labs/mNa46DBzXSjV0agT/logo/formae-logo-light.png?fit=max\u0026auto=format\u0026n=mNa46DBzXSjV0agT\u0026q=85\u0026s=8563b5284bd2cf259539ff5e7b9d457f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.formae.ai#website\",\"name\":\"formae\",\"url\":\"https://docs.formae.ai\",\"publisher\":{\"@id\":\"https://docs.formae.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.formae.ai/documentation/concepts/policy#webpage\",\"url\":\"https://docs.formae.ai/documentation/concepts/policy\",\"name\":\"Policy\",\"description\":\"A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.\",\"dateModified\":\"2026-08-30T21:54:24.318Z\",\"isPartOf\":{\"@id\":\"https://docs.formae.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.formae.ai/documentation/concepts/policy#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.formae.ai/documentation/concepts/policy#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Concepts\",\"item\":\"https://docs.formae.ai/documentation/concepts/forma\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building blocks\",\"item\":\"https://docs.formae.ai/documentation/concepts/forma\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Policy\",\"item\":\"https://docs.formae.ai/documentation/concepts/policy\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.formae.ai/documentation/concepts/policy#article\",\"headline\":\"Policy\",\"name\":\"Policy\",\"description\":\"A policy is a lifecycle rule you attach to a stack: automatic cleanup after a duration, or automatic enforcement of declared state.\",\"url\":\"https://docs.formae.ai/documentation/concepts/policy\",\"mainEntityOfPage\":{\"@id\":\"https://docs.formae.ai/documentation/concepts/policy#webpage\"},\"dateModified\":\"2026-08-30T21:54:24.318Z\",\"publisher\":{\"@id\":\"https://docs.formae.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.formae.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"formae\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"formae","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get started","pages":[{"title":"formae documentation","href":"/documentation"},{"title":"Quick start","href":"/documentation/get-started/quickstart"},{"title":"Quick start with formae Cloud","href":"/documentation/get-started/quickstart-cloud"},{"title":"Quick start with an AI assistant","href":"/documentation/get-started/quickstart-ai-assistant"},{"title":"Write your first forma","href":"/documentation/get-started/write-your-first-forma"}]},{"group":"Guides","pages":[{"group":"Set up your tools","pages":[{"title":"Set up Pkl in your editor","href":"/documentation/guides/pkl-ide-support"},{"title":"AI assistants","href":"/documentation/guides/ai-coding-assistants"},{"title":"Read tfvars in a forma","href":"/documentation/guides/tfvars"}]},{"group":"Install and run the agent","pages":[{"title":"Install and run the agent","href":"/documentation/guides/install-agent"},{"title":"Install and run the agent on Azure","href":"/documentation/guides/install-agent-azure"},{"title":"Install and run the agent on GCP","href":"/documentation/guides/install-agent-gcp"},{"title":"Install the agent with Docker","href":"/documentation/guides/install-agent-docker"},{"title":"Install the agent with Helm","href":"/documentation/guides/install-agent-helm"},{"title":"Extend the agent image","href":"/documentation/guides/extend-the-agent-image"},{"title":"Observe the agent","href":"/documentation/guides/observe-the-agent"},{"title":"Manage profiles","href":"/documentation/guides/manage-profiles"}]},{"group":"Manage infrastructure","pages":[{"title":"Create a target","href":"/documentation/guides/create-a-target"},{"title":"Explore your infrastructure","href":"/documentation/guides/explore-your-infrastructure"},{"title":"Bring existing resources under management","href":"/documentation/guides/bring-resources-under-management"},{"title":"Everyday changes","href":"/documentation/guides/everyday-changes"},{"title":"Manage stack policies","href":"/documentation/guides/policies"},{"title":"Rename a resource","href":"/documentation/guides/rename-a-resource"},{"title":"Incidents and recovery","href":"/documentation/guides/incidents-and-recovery"},{"title":"Troubleshoot a failed command","href":"/documentation/guides/troubleshoot-a-failed-command"},{"title":"Repair duplicated map keys","href":"/documentation/guides/repair-duplicated-map-keys"},{"title":"Cancel a running command","href":"/documentation/guides/cancel-a-running-command"},{"title":"Deal with out-of-band changes","href":"/documentation/guides/deal-with-out-of-band-changes"},{"title":"Build self-service infrastructure","href":"/documentation/guides/build-self-service-infrastructure"},{"title":"Reuse infrastructure with modules","href":"/documentation/guides/reuse-with-modules"},{"title":"Run formae in CI/CD","href":"/documentation/guides/cicd"}]}]},{"group":"Concepts","pages":[{"group":"Building blocks","pages":[{"title":"Forma","href":"/documentation/concepts/forma"},{"title":"Stack","href":"/documentation/concepts/stack"},{"title":"Target","href":"/documentation/concepts/target"},{"title":"Resources","href":"/documentation/concepts/resources"},{"title":"Label","href":"/documentation/concepts/label"},{"title":"Properties","href":"/documentation/concepts/properties"},{"title":"Resolvable","href":"/documentation/concepts/resolvable"},{"title":"Values","href":"/documentation/concepts/values"},{"title":"Secrets and generated credentials","description":"How formae references secrets without storing them, generates credentials it never shows, and rotates them on a schedule.","href":"/documentation/concepts/secrets"},{"group":"Policies","pages":[{"title":"Policy","sidebarTitle":"Overview","href":"/documentation/concepts/policy"},{"title":"TTL policy","sidebarTitle":"TTL","description":"Automatically destroy a stack and its resources after a set duration.","href":"/documentation/concepts/policies/ttl"},{"title":"Auto-reconcile policy","sidebarTitle":"Auto-reconcile","href":"/documentation/concepts/policies/auto-reconcile"}]}]},{"group":"How formae works","pages":[{"title":"Architecture","href":"/documentation/concepts/architecture"},{"title":"Plugins","href":"/documentation/concepts/plugin"},{"title":"Ways to work with formae","href":"/documentation/concepts/ways-to-work"},{"title":"Apply modes","href":"/documentation/concepts/apply-modes"},{"title":"Synchronization","href":"/documentation/concepts/synchronization"},{"title":"Discovery","href":"/documentation/concepts/discovery"}]}]},{"group":"Reference","pages":[{"group":"CLI","pages":[{"title":"CLI reference","href":"/documentation/reference/cli"},{"title":"formae apply","href":"/documentation/reference/cli/apply"},{"title":"formae destroy","href":"/documentation/reference/cli/destroy"},{"title":"formae status","href":"/documentation/reference/cli/status"},{"title":"formae command","href":"/documentation/reference/cli/command"},{"title":"formae cancel","href":"/documentation/reference/cli/cancel"},{"title":"formae connect","href":"/documentation/reference/cli/connect"},{"title":"formae inventory","href":"/documentation/reference/cli/inventory"},{"title":"formae extract","href":"/documentation/reference/cli/extract"},{"title":"formae eval","href":"/documentation/reference/cli/eval"},{"title":"formae project","href":"/documentation/reference/cli/project"},{"title":"formae plugin","href":"/documentation/reference/cli/plugin"},{"title":"formae profile","href":"/documentation/reference/cli/profile"},{"title":"formae agent","href":"/documentation/reference/cli/agent"},{"title":"formae update","href":"/documentation/reference/cli/update"},{"title":"formae clean","href":"/documentation/reference/cli/clean"}]},{"title":"Configuration","href":"/documentation/reference/configuration"},{"title":"CLI themes","href":"/documentation/reference/themes"},{"title":"Security and networking","href":"/documentation/reference/security-and-networking"},{"title":"Pkl cheatsheet","href":"/documentation/reference/pkl-cheatsheet"},{"group":"Cloud providers","pages":[{"group":"AWS","pages":[{"title":"AWS configuration","href":"/documentation/reference/providers/aws/configuration"},{"group":"Common patterns","pages":[{"title":"Static website (S3 + CloudFront)","href":"/documentation/reference/providers/aws/patterns/static-website-s3-cloudfront"},{"title":"Base VPC networking","href":"/documentation/reference/providers/aws/patterns/base-vpc-networking"},{"title":"CloudFront edge","href":"/documentation/reference/providers/aws/patterns/cloudfront-edge"},{"title":"A self-service database","href":"/documentation/reference/providers/aws/patterns/a-self-service-database"},{"title":"ML platform","href":"/documentation/reference/providers/aws/patterns/ml-platform"},{"title":"Deploy a Lambda","href":"/documentation/reference/providers/aws/patterns/deploy-a-lambda"},{"title":"Deploy an ECS service","href":"/documentation/reference/providers/aws/patterns/deploy-an-ecs-service"},{"title":"Bookstore on EKS","href":"/documentation/reference/providers/aws/patterns/bookstore-on-eks"}]},{"title":"AWS supported resources","href":"/documentation/reference/providers/aws/supported-resources"}]},{"group":"Azure","pages":[{"title":"Azure configuration","href":"/documentation/reference/providers/azure/configuration"},{"group":"Common patterns","pages":[{"title":"Lay down base networking","href":"/documentation/reference/providers/azure/patterns/lay-down-base-networking"},{"title":"Run a PostgreSQL database","href":"/documentation/reference/providers/azure/patterns/run-a-postgresql-database"},{"title":"Provision an AKS cluster","href":"/documentation/reference/providers/azure/patterns/provision-an-aks-cluster"},{"title":"Deploy a virtual machine","href":"/documentation/reference/providers/azure/patterns/deploy-a-virtual-machine"},{"title":"Deploy the bookstore on AKS","href":"/documentation/reference/providers/azure/patterns/deploy-the-bookstore-on-aks"}]},{"title":"Azure supported resources","href":"/documentation/reference/providers/azure/supported-resources"}]},{"group":"GCP","pages":[{"title":"GCP configuration","href":"/documentation/reference/providers/gcp/configuration"},{"group":"Common patterns","pages":[{"title":"Deploy base VPC networking","href":"/documentation/reference/providers/gcp/patterns/deploy-base-vpc-networking"},{"title":"Deploy an HTTP(S) load balancer","href":"/documentation/reference/providers/gcp/patterns/deploy-an-https-load-balancer"},{"title":"Deploy the bookstore on GKE","href":"/documentation/reference/providers/gcp/patterns/deploy-the-bookstore-on-gke"}]},{"title":"GCP supported resources","href":"/documentation/reference/providers/gcp/supported-resources"}]},{"group":"OCI","pages":[{"title":"OCI configuration","href":"/documentation/reference/providers/oci/configuration"},{"group":"Common patterns","pages":[{"title":"Deploy base VCN networking","href":"/documentation/reference/providers/oci/patterns/deploy-base-vcn-networking"},{"title":"Deploy an OKE Kubernetes cluster","href":"/documentation/reference/providers/oci/patterns/deploy-an-oke-kubernetes-cluster"}]},{"title":"OCI supported resources","href":"/documentation/reference/providers/oci/supported-resources"}]},{"group":"Kubernetes","pages":[{"title":"Kubernetes configuration","href":"/documentation/reference/providers/kubernetes/configuration"},{"title":"Kubernetes with installation OIDC","href":"/documentation/reference/providers/kubernetes/oidc"},{"group":"Common patterns","pages":[{"title":"Deploy a Helm chart","href":"/documentation/reference/providers/kubernetes/patterns/deploy-a-helm-chart"},{"title":"Deploy the bookstore webapp","href":"/documentation/reference/providers/kubernetes/patterns/deploy-the-bookstore-webapp"},{"title":"Deploy a Crossplane control plane","href":"/documentation/reference/providers/kubernetes/patterns/deploy-a-crossplane-control-plane"},{"title":"Deploy the LGTM observability stack","href":"/documentation/reference/providers/kubernetes/patterns/deploy-the-lgtm-observability-stack"}]},{"title":"Kubernetes supported resources","href":"/documentation/reference/providers/kubernetes/supported-resources"}]}]},{"title":"Plugin catalog","href":"/documentation/reference/plugin-catalog"},{"title":"Release notes","href":"/documentation/reference/release-notes"}]}]},{"tab":"Plugin development","pages":[{"title":"Plugin development","href":"/plugin-development"}]}]},"title":"Policy - formae","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["10e4515597"],"chunks":["BannerMarkdown-cfwQA_n9.js","dist-2LoAhjKH.js","lib--scc4DXi.js","lib-B8HbPgcC.js","clsx-DZLdJUrt.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}