应用平台 APPSTAGE-TF模板包:VPC资源RFS模板文件

时间:2024-10-21 10:40:12

VPC资源 RFS 模板文件

{
	"terraform": {
		"required_providers": {
			"huaweicloud": {
				"source": "huawei.com/provider/huaweicloud",
				"version": "1.56.0"
			}
		}
	},
	"provider": {
		"huaweicloud": {
			"auth_url": "https://iam.cn-north-4.myhuaweicloud.com/v3",
			"insecure": true,
			"region": "cn-north-4"
		}
	},
	"resource": {
		"huaweicloud_vpc": {
			"vpc-krkup": {
				"name": "vpc-rfs-001",
				"cidr": "192.168.0.0/16",
				"enterprise_project_id": "2191bb05-****-****-****-96f098494b8d"
			}
		},
		"huaweicloud_vpc_subnet": {
			"vpc-subnet-ppnwk": {
				"name": "subnet-rfs-001",
				"cidr": "192.168.3.0/24",
				"gateway_ip": "192.168.3.1",
				"vpc_id": "c6131e37-****-****-****-5fffa75982f3",
				"depends_on": ["huaweicloud_vpc.vpc-krkup"]
			}
		},
		"huaweicloud_vpcep_endpoint": {
			"vpcep_endpoint-4epnv": {
				"service_id": "ebc591db-****-****-****-15354c9bef25",
				"network_id": "${huaweicloud_vpc_subnet.vpc-subnet-ppnwk.id}",
				"vpc_id": "${huaweicloud_vpc_subnet.vpc-subnet-ppnwk.vpc_id}"
			}
		},
		"huaweicloud_networking_secgroup": {
			"sg-rmo7v": {
				"name": "sg-rfs-all-deny",
				"enterprise_project_id": "2191bb05-****-****-****-96f098494b8d",
				"description": "通用Web服务器,默认放通22、3389、80、443端口和ICMP协议。 适用于需要远程登录、公网ping及用于网站服务的云服务器场景。",
				"depends_on": ["huaweicloud_vpc.vpc-krkup"]
			}
		},
		"huaweicloud_networking_secgroup_rule": {
			"sg-rule-d28sj": {
				"action": "allow",
				"direction": "ingress",
				"ethertype": "IPv4",
				"protocol": "icmp",
				"remote_ip_prefix": "0.0.0.0/0",
				"priority": 1,
				"security_group_id": "${huaweicloud_networking_secgroup.sg-rmo7v.id}"
			}
		}
	}
}
support.huaweicloud.com/devg-appstage/appstage_06_0100.html