知识卡片
栈参数保持简单
栈参数允许同一份基础设施代码创建不同实例,例如用环境标识构造唯一资源名、用数量参数调整容量。优先使用字符串、数值等简单类型,只为当前真实需求添加参数。若布尔开关会增删整组服务,使实例结构大幅分叉,应考虑拆栈,而不是继续扩大参数空间。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 配置基础设施栈实例 · 查看原书依据
The more configurable a stack project is, the more each instance may vary from others, and the more difficult it can be to test and maintain the code. So it’s best to keep stack parameters simple and to use them in simple ways: Prefer simple parameter types, like strings, numbers, and perhaps lists and key-value
参考来源
- 位置:《Infrastructure As Code》第8章《配置基础设施栈实例》(来源项目:book-sources;源文件:extracted/Infrastructure As Code/_epub-src/OEBPS/ch08.html)
- 结论依据:原文说明栈参数允许同一份基础设施代码创建不同实例,例如用环境标识构造唯一资源名、用数量参数调整容量;本卡据此解释其用途及适用边界。
- 原始内容:The more configurable a stack project is, the more each instance may vary from others, and the more difficult it can be to test and maintain the code. So it’s best to keep stack parameters simple and to use them in simple ways: Prefer simple parameter types, like strings, numbers, and perhaps lists and key-value