
# 模板约束与限制
使用RFS服务进行模板部署，模板文件内容具有如下约束与限制：
- 模块的数量限制为50，模块嵌套深度限制为3。
- 模板中对count参数的值最大限制为1024。
- 模板中对for_each参数所遍历的键值对数量最大限制为1024。
- 不能使用[Provisioners功能](https://www.terraform.io/docs/provisioners/index.html)、[Backend Configuration功能](https://registry.terraform.io/providers/huaweicloud/huaweicloud/latest/docs/guides/remote-state-backend)和[Cloud 功能](https://developer.hashicorp.com/terraform/cli/v1.5.x/cloud/settings#the-cloud-block)。
- 可以使用[Module Sources功能](https://www.terraform.io/docs/modules/sources.html)，但仅支持Local Modules。
- 可以使用[HuaweiCloud Provider](https://registry.terraform.io/providers/huaweicloud/huaweicloud/latest)，但Provider内部分资源禁止使用。具体清单列举如下：
  - huaweicloud_vod_watermark_template
  
  - huaweicloud_compute_keypair
  
  - huaweicloud_identity_access_key
  
  - huaweicloud_images_image_v2
  
  - huaweicloud_kps_keypair
  
  - huaweicloud_obs_bucket_object
  
  - huaweicloud_iotda_batchtask
  
  - huaweicloud_cce_chart
  
  - huaweicloud_iotda_batchtask_file
  
  - huaweicloud_cse_microservice
  
  - huaweicloud_cdm_\*
  
  - huaweicloud_iec_\*
  
  - huaweicloud_meeting_\*
  
  - huaweicloud_vod_\*
  
  - huaweicloud_ges_\*
  
  - huaweicloud_ucs_\*
  
  - huaweicloud_cloudtable_\*
  
  - huaweicloud_bcs_\*
  
  - huaweicloud_dis_\*
  
  - huaweicloud_sdrs_\*
  
  - huaweicloud_codearts_deploy_\*
  
  - huaweicloud_asm_\*
  
  - huaweicloud_cph_\*
   
- 部分函数禁止使用。具体清单列举如下：
  - [abspath](https://developer.hashicorp.com/terraform/language/functions/abspath)
  
  - [basename](https://developer.hashicorp.com/terraform/language/functions/basename)
  
  - [dirname](https://developer.hashicorp.com/terraform/language/functions/dirname)
  
  - [file](https://www.terraform.io/docs/language/functions/file.html)
  
  - [filebase64](https://www.terraform.io/docs/language/functions/filebase64.html)
  
  - [filebase64sha256](https://developer.hashicorp.com/terraform/language/functions/filebase64sha256)
  
  - [filebase64sha512](https://developer.hashicorp.com/terraform/language/functions/filebase64sha512)
  
  - [fileexists](https://www.terraform.io/docs/language/functions/fileexists.html)
  
  - [fileset](https://www.terraform.io/docs/language/functions/fileset.html)
  
  - [filemd5](https://developer.hashicorp.com/terraform/language/functions/filemd5)
  
  - [filesha1](https://developer.hashicorp.com/terraform/language/functions/filesha1)
  
  - [filesha256](https://developer.hashicorp.com/terraform/language/functions/filesha256)
  
  - [filesha512](https://developer.hashicorp.com/terraform/language/functions/filesha512)
  
  - [pathexpand](https://developer.hashicorp.com/terraform/language/functions/pathexpand)
  
  - [templatefile](https://www.terraform.io/docs/language/functions/templatefile.html)
  
  
  ![](https://support.huaweicloud.com/tr-aos/public_sys-resources/warning_3.0-zh-cn.png)
  不建议使用nonsensitive方法输出敏感信息。随意使用此方法可能会导致本该被隐藏的敏感信息被服务明文打印出来从而导致敏感信息泄露
  如果必须进行输出，建议优先考虑编码后再输出（如nonsensitive(sha256(var.sensitive_value))）
  
 
