terrafrom在使用的时候需要有需要判断来赋值,例如:
1 2 3 4 |
resource “aws_instance” "myinstawnce"{ count = "${var.env =='prod'?2:1 }" } |
就是根据env来确定需要几台机器,如果是prod , 就是2 ,如果不是,就是1
Latest posts by Zhiming Zhang (see all)
- aws eks node 自动化扩展工具 Karpenter - 8月 10, 2022
- ReplicationController and ReplicaSet in Kubernetes - 12月 20, 2021
- public key fingerprint - 5月 27, 2021