知识卡片
命令语言也能声明状态
命令式语言描述如何构造结果,声明式语言描述要什么。但语言语法与部署模型是两个维度:TypeScript或Python代码可以只是生成期望状态,由工具再以声明式方式比较和收敛资源。因此命令式写法不必然失去幂等性,声明式外观也不自动保证无破坏性替换。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 基础设施工具与语言 · 查看原书依据
Other tools, including CDK, Pulumi, and most IfC tools, support imperative languages. (Pulumi also supports at least one declarative language, YAML). It’s important to note, however, that most of these tools use a declarative model. The procedural or object-oriented infrastructure logic creates data structures that model the desired state of the infrastructure, which the tool
参考来源
- 位置:《Infrastructure As Code》第4章《基础设施工具与语言》(来源项目 book-sources,源文件:extracted/Infrastructure As Code/_epub-src/OEBPS/ch04.html)
- 结论依据:原文对该概念的定义、应用条件与作用机制直接支持上述解释。
- 原始内容:Other tools, including CDK, Pulumi, and most IfC tools, support imperative languages. (Pulumi also supports at least one declarative language, YAML). It’s important to note, however, that most of these tools use a declarative model. The procedural or object-oriented infrastructure logic creates data structures that model the desired state of the infrastructure, which the tool