官术网_书友最值得收藏!

  • Learning DevOps
  • Mikael Krief
  • 116字
  • 2021-06-24 12:32:06

Better visibility with the separation of files

When executing Terraform code, all files in the execution directory that have the .tf extension are automatically executed; in our example, we have provider.tf and main.tf. It is good to separate the code into several files in order to improve the readability of the code and its evolution.

Using our example script, we can do better and separate it with the following:

  • Rg.tf, which contains the code for the resource group
  • Network.tf, which contains the code for the VNet and subnet
  • Compute.tf, which contains the code for the network interface, public IP, storage, and virtual machine
主站蜘蛛池模板: 高州市| 丰城市| 四平市| 大埔区| 恩平市| 高雄县| 通化市| 铅山县| 师宗县| 西城区| 芮城县| 洞头县| 潜山县| 彭泽县| 东兰县| 尼木县| 葵青区| 锦州市| 吉首市| 东源县| 郓城县| 庆元县| 怀仁县| 海城市| 天祝| 图木舒克市| 通化县| 稷山县| 报价| 余姚市| 武强县| 黑水县| 连州市| 扎兰屯市| 双柏县| 葫芦岛市| 琼结县| 黄山市| 吴旗县| 六安市| 西林县|