@@ -7,11 +7,11 @@ Example Usage
77data "tencentcloud_vpc_instances" "foo" {
88}
99
10- resource "tencentcloud_vpc_acl " "main" {
10+ resource "tencentcloud_vpc_acls " "main" {
1111 vpc_id = data.tencentcloud_vpc_instances.foo.instance_list.0.vpc_id
1212}
1313
14- resource "tencentcloud_vpc_acl " "main" {
14+ resource "tencentcloud_vpc_acls " "main" {
1515 name = "test_acl"
1616}
1717
@@ -84,7 +84,7 @@ func dataSourceTencentCloudVpcAcls() *schema.Resource {
8484 "subnets" : {
8585 Type : schema .TypeList ,
8686 Computed : true ,
87- Description : "" ,
87+ Description : "Subnets associated with the network ACL. " ,
8888 Elem : & schema.Resource {
8989 Schema : map [string ]* schema.Schema {
9090 "vpc_id" : {
@@ -95,7 +95,7 @@ func dataSourceTencentCloudVpcAcls() *schema.Resource {
9595 "subnet_id" : {
9696 Type : schema .TypeString ,
9797 Computed : true ,
98- Description : "Subnet instance `ID`" ,
98+ Description : "Subnet instance `ID`. " ,
9999 },
100100 "subnet_name" : {
101101 Type : schema .TypeString ,
@@ -118,13 +118,13 @@ func dataSourceTencentCloudVpcAcls() *schema.Resource {
118118 "ingress" : {
119119 Type : schema .TypeList ,
120120 Computed : true ,
121- Description : "" ,
121+ Description : "Inbound rules of the network ACL. " ,
122122 Elem : & schema.Resource {
123123 Schema : map [string ]* schema.Schema {
124124 "protocol" : {
125125 Type : schema .TypeString ,
126126 Computed : true ,
127- Description : "Type of ip protocol. " ,
127+ Description : "Type of ip protocol." ,
128128 },
129129 "port" : {
130130 Type : schema .TypeString ,
@@ -141,19 +141,24 @@ func dataSourceTencentCloudVpcAcls() *schema.Resource {
141141 Computed : true ,
142142 Description : "An IP address network or segment." ,
143143 },
144+ "description" : {
145+ Type : schema .TypeString ,
146+ Computed : true ,
147+ Description : "Rule description." ,
148+ },
144149 },
145150 },
146151 },
147152 "egress" : {
148153 Type : schema .TypeList ,
149154 Computed : true ,
150- Description : "" ,
155+ Description : "Outbound rules of the network ACL. " ,
151156 Elem : & schema.Resource {
152157 Schema : map [string ]* schema.Schema {
153158 "protocol" : {
154159 Type : schema .TypeString ,
155160 Computed : true ,
156- Description : "Type of ip protocol. " ,
161+ Description : "Type of ip protocol." ,
157162 },
158163 "port" : {
159164 Type : schema .TypeString ,
@@ -170,6 +175,11 @@ func dataSourceTencentCloudVpcAcls() *schema.Resource {
170175 Computed : true ,
171176 Description : "An IP address network or segment." ,
172177 },
178+ "description" : {
179+ Type : schema .TypeString ,
180+ Computed : true ,
181+ Description : "Rule description." ,
182+ },
173183 },
174184 },
175185 },
@@ -181,7 +191,7 @@ func dataSourceTencentCloudVpcAcls() *schema.Resource {
181191}
182192
183193func dataSourceTencentCloudVpcACLRead (d * schema.ResourceData , meta interface {}) error {
184- defer logElapsed ("data_source.tencentcloud_vpc_acl .read" )()
194+ defer logElapsed ("data_source.tencentcloud_vpc_acls .read" )()
185195 var (
186196 logId = getLogId (contextNil )
187197 ctx = context .WithValue (context .TODO (), logIdKey , logId )
@@ -225,15 +235,15 @@ func dataSourceTencentCloudVpcACLRead(d *schema.ResourceData, meta interface{})
225235 for i := range subnetInfo {
226236 v := subnetInfo [i ]
227237 subnet := make (map [string ]interface {}, 5 )
228- subnet ["vpc_id" ] = * v .VpcId
229- subnet ["subnet_id" ] = * v .SubnetId
230- subnet ["subnet_name" ] = * v .SubnetName
231- subnet ["cidr_block" ] = * v .CidrBlock
238+ subnet ["vpc_id" ] = v .VpcId
239+ subnet ["subnet_id" ] = v .SubnetId
240+ subnet ["subnet_name" ] = v .SubnetName
241+ subnet ["cidr_block" ] = v .CidrBlock
232242
233- tag := make (map [string ]string , len (v .TagSet ))
243+ tag := make (map [string ]interface {} , len (v .TagSet ))
234244 for t := range v .TagSet {
235245 tagValue := v .TagSet [t ]
236- tag [* tagValue .Key ] = * tagValue .Value
246+ tag [* tagValue .Key ] = tagValue .Value
237247 }
238248 subnet ["tags" ] = tag
239249
@@ -244,12 +254,12 @@ func dataSourceTencentCloudVpcACLRead(d *schema.ResourceData, meta interface{})
244254 ingress := make ([]map [string ]interface {}, 0 , len (ingressInfo ))
245255 for i := range ingressInfo {
246256 v := ingressInfo [i ]
247- egressMap := make (map [string ]interface {}, 4 )
248- egressMap ["protocol" ] = * v .Protocol
249- egressMap ["port" ] = * v .Port
250- egressMap ["cidr_block" ] = * v .CidrBlock
251- egressMap ["policy" ] = * v .Action
252- egressMap ["description" ] = * v .Description
257+ egressMap := make (map [string ]interface {}, 5 )
258+ egressMap ["protocol" ] = v .Protocol
259+ egressMap ["port" ] = v .Port
260+ egressMap ["cidr_block" ] = v .CidrBlock
261+ egressMap ["policy" ] = v .Action
262+ egressMap ["description" ] = v .Description
253263
254264 ingress = append (ingress , egressMap )
255265 }
@@ -258,12 +268,12 @@ func dataSourceTencentCloudVpcACLRead(d *schema.ResourceData, meta interface{})
258268 egress := make ([]map [string ]interface {}, 0 , len (egressInfo ))
259269 for i := range egressInfo {
260270 v := egressInfo [i ]
261- egressMap := make (map [string ]interface {}, 4 )
262- egressMap ["protocol" ] = * v .Protocol
263- egressMap ["port" ] = * v .Port
264- egressMap ["cidr_block" ] = * v .CidrBlock
265- egressMap ["policy" ] = * v .Action
266- egressMap ["description" ] = * v .Description
271+ egressMap := make (map [string ]interface {}, 5 )
272+ egressMap ["protocol" ] = v .Protocol
273+ egressMap ["port" ] = v .Port
274+ egressMap ["cidr_block" ] = v .CidrBlock
275+ egressMap ["policy" ] = v .Action
276+ egressMap ["description" ] = v .Description
267277
268278 egress = append (egress , egressMap )
269279 }
0 commit comments