--- title: "使用Terraform与Cato Cloud集成" slug: "using-terraform-with-the-cato-cloud" updated: 2026-09-18T23:12:17Z published: 2026-09-18T23:12:17Z canonical: "knowledge.catonetworks.com/using-terraform-with-the-cato-cloud" --- > ## Documentation Index > Fetch the complete documentation index at: https://knowledge.catonetworks.com/llms.txt > Use this file to discover all available pages before exploring further. # 使用Terraform与Cato Cloud集成 ## 概况 [Cato Networks Terraform提供商](https://registry.terraform.io/namespaces/catonetworks)允许您通过基于基础设施即代码(IaC)的自动化管理账户。您可以直接在Terraform中以声明方式配置和维护资源,例如Socket站点、IPsec站点、广域网防火墙规则、路由策略和身份集成。 - 将Cato的全球云网络集成到CI/CD管道中 - 在各个环境中实施一致的网络和安全策略 - 简化云、数据中心及分支位置的安全连接配置 该提供商支持独立使用和与Cato认证的Terraform模块集成以进行云部署。有关详细信息,请参阅[https://registry.terraform.io/providers/catonetworks/cato/latest](https://registry.terraform.io/providers/catonetworks/cato/latest) Cato Terraform 提供程序使用 API,API 需要一个[API密钥](/v1/docs/generating-api-keys-for-the-cato-api). ### 版本控制 Terraform 提供商遵循正式的语义版本控制方案(`X.Y.Z`),因此您可以从任何发布版本了解到其包含的内容,并控制您的配置接受的更新。在您的提供商块中设置版本约束,以允许在主要版本内更新,同时阻止重大升级。 - 修补程序(`X.Y.Z`)和小版本(`X.Y.0`)不包含任何破坏性变更。 - 主要版本(`X.0.0`)可能需要配置或状态迁移 - Beta版本(`X.Y.Z-beta.N`)被排除在自动更新之外,必须明确固定。 ## 可用模块 Terraform提供商的实施、模块和示例可在相应的存储库中找到:[https://github.com/catonetworks](https://github.com/catonetworks)。 以下是可用模块的摘要: | 功能 | 说明 | 链接 | | --- | --- | --- | | Socket站点模块 | 促进CMA中物理Socket站点的创建和批量配置。 | [https://registry.terraform.io/modules/catonetworks/socket](https://registry.terraform.io/modules/catonetworks/socket) | | AWS的IPsec站点模块 | 创建AWS资源并从AWS设置到Cato平台的IPsec隧道以实现安全连接。 | [https://registry.terraform.io/modules/catonetworks/ipsec-aws](https://registry.terraform.io/modules/catonetworks/ipsec-aws) | | Azure的IPsec站点模块 | 创建Azure资源并从Azure设置到Cato平台的IPsec隧道以实现安全连接。 | [https://registry.terraform.io/modules/catonetworks/ipsec-azure](https://registry.terraform.io/modules/catonetworks/ipsec-azure) | | Azure虚拟WAN IPsec模块 | 在Cato Cloud和Azure虚拟WAN之间提供主IPsec和备IPsec隧道以实现高可用性。 | [https://registry.terraform.io/modules/catonetworks/azure-vwan](https://registry.terraform.io/modules/catonetworks/azure-vwan) | | 站点位置验证模块 | 将CSV文件中的站点位置数据与Cato系统中的地理标准进行验证。 | [https://registry.terraform.io/modules/catonetworks/sitelocation](https://registry.terraform.io/modules/catonetworks/sitelocation) | | vSocket AWS模块 | 在AWS中部署虚拟Socket(3-NIC vSocket)EC2实例,并将其注册为Socket站点。 | [https://registry.terraform.io/modules/catonetworks/vsocket-aws](https://registry.terraform.io/modules/catonetworks/vsocket-aws) | | vSocket AWS与VPC模块 | 在AWS中创建一个VPC并部署一个虚拟Socket EC2实例,并将其注册到CMA。 | [https://registry.terraform.io/modules/catonetworks/vsocket-aws-vpc](https://registry.terraform.io/modules/catonetworks/vsocket-aws-vpc) | | vSocket AWS传输网关模块 | 在AWS中创建一个VPC并部署一个虚拟Socket EC2实例,并将其注册到CMA。 将部署附加到传输网关并为EC2实例指定默认路由。 | [https://registry.terraform.io/modules/catonetworks/vsocket-aws-tgw/cato/latest](https://registry.terraform.io/modules/catonetworks/vsocket-aws-tgw/cato/latest) | | vSocket AWS HA模块 | 在AWS中为高可用性提供主虚拟和副虚拟Socket实例。 | [https://registry.terraform.io/modules/catonetworks/vsocket-aws-ha](https://registry.terraform.io/modules/catonetworks/vsocket-aws-ha) | | vSocket AWS HA与VPC模块 | 在现有AWS VPC中部署HA虚拟Socket,并设置所有所需的网络。 | [https://registry.terraform.io/modules/catonetworks/vsocket-aws-ha-vpc](https://registry.terraform.io/modules/catonetworks/vsocket-aws-ha-vpc) | | vSocket AWS HA传输网关模块 | 在现有AWS VPC中部署HA虚拟Socket,并设置所有所需的网络。 将部署附加到传输网关并为EC2实例指定默认路由。 | [https://registry.terraform.io/modules/catonetworks/vsocket-aws-tgw-ha](https://registry.terraform.io/modules/catonetworks/vsocket-aws-tgw-ha) | | vSocket Azure 3-NIC模块 | 在Azure中部署虚拟Socket(3-NIC vSocket)并将其注册为Socket站点。 | [https://registry.terraform.io/modules/catonetworks/vsocket-azure](https://registry.terraform.io/modules/catonetworks/vsocket-azure) | | vSocket Azure 2-NIC模块 | 在Azure中部署虚拟Socket(2-NIC vSocket)并将其注册为Socket站点。 | [https://registry.terraform.io/modules/catonetworks/vsocket-azure-vnet-2nic/cato/latest](https://registry.terraform.io/modules/catonetworks/vsocket-azure-vnet-2nic/cato/latest) | | vSocket Azure与VNet模块 | 在Azure中创建一个VNet并部署一个在CMA中注册的虚拟Socket实例。 | [https://registry.terraform.io/modules/catonetworks/vsocket-azure-vnet](https://registry.terraform.io/modules/catonetworks/vsocket-azure-vnet) | | vSocket Azure HA模块 | 在Azure中部署高可用性虚拟Socket,并将其注册为Socket站点。 | [https://registry.terraform.io/modules/catonetworks/vsocket-azure-ha](https://registry.terraform.io/modules/catonetworks/vsocket-azure-ha) | | vSocket Azure 2-NIC HA模块 | 在Azure中部署高可用性(2 NIC)虚拟Socket,并将其注册为Socket站点。 | [https://registry.terraform.io/modules/catonetworks/vsocket-azure-ha-2nic/cato/latest](https://registry.terraform.io/modules/catonetworks/vsocket-azure-ha-2nic/cato/latest) | | vSocket Azure HA与VNet模块 | 在Azure中创建一个VNet并部署与CMA集成的HA虚拟Socket。 | [https://registry.terraform.io/modules/catonetworks/vsocket-azure-ha-vnet](https://registry.terraform.io/modules/catonetworks/vsocket-azure-ha-vnet) | | vSocket GCP模块 | 在GCP中部署单个虚拟Socket实例,并将其注册为Socket站点。 | [https://registry.terraform.io/modules/catonetworks/vsocket-gcp](https://registry.terraform.io/modules/catonetworks/vsocket-gcp) | | vSocket GCP与VPC模块 | 在GCP中创建一个VPC并部署一个虚拟Socket,并将其集成到CMA。 | [https://registry.terraform.io/modules/catonetworks/vsocket-gcp-vpc](https://registry.terraform.io/modules/catonetworks/vsocket-gcp-vpc) | | 批量互联网防火墙规则模块 | 从JSON配置文件导入互联网防火墙(FW)规则和节,并定义这些规则和节在Cato互联网FW策略中的顺序。 | [https://registry.terraform.io/modules/catonetworks/bulk-if-rules/cato/latest](https://registry.terraform.io/modules/catonetworks/bulk-if-rules/cato/latest) | | 批量WAN防火墙规则模块 | 从JSON配置文件导入WAN防火墙(FW)规则和节,并定义这些规则和节在Cato WAN FW策略中的顺序。 | [https://registry.terraform.io/modules/catonetworks/bulk-wf-rules/cato/latest](https://registry.terraform.io/modules/catonetworks/bulk-wf-rules/cato/latest) | | 批量网络范围模块 | 通过接受CSV解码的数据或JSON数组,将多个站点网络范围及相关的DHCP设置导入,并自动将其转换为所需的嵌套结构。 | [https://registry.terraform.io/modules/catonetworks/network-ranges-bulk/cato/latest](https://registry.terraform.io/modules/catonetworks/network-ranges-bulk/cato/latest) | | 批量TLS规则模块 | 从JSON配置文件导入TLS检查规则和部分,并定义这些规则和部分在Cato策略中的顺序。 | [https://registry.terraform.io/modules/catonetworks/bulk-tls-rules/cato/latest](https://registry.terraform.io/modules/catonetworks/bulk-tls-rules/cato/latest) | | 广域网网络规则模块 | 从JSON配置文件导入广域网网络规则和部分,并定义这些规则和部分在Cato策略中的顺序。 | [https://registry.terraform.io/modules/catonetworks/bulk-wnw-rules/cato/latest](https://registry.terraform.io/modules/catonetworks/bulk-wnw-rules/cato/latest) | ## 文章更新日志 | 日期 | 说明 | | --- | --- | | 2026年9月17日 | 添加版本控制部分 |