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

  • 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
主站蜘蛛池模板: 辽阳市| 宁国市| 广灵县| 北海市| 乡宁县| 望城县| 青河县| 龙岩市| 永州市| 郴州市| 禹州市| 通河县| 民勤县| 灵武市| 镇安县| 安阳县| 西昌市| 衢州市| 陆良县| 淮阳县| 琼结县| 双柏县| 沙洋县| 东丰县| 岚皋县| 合山市| 财经| 乐都县| 环江| 全南县| 南澳县| 来安县| 抚州市| 抚松县| 固原市| 寻甸| 恩施市| 郁南县| 东乡| 仪征市| 久治县|