@@ -48,54 +48,54 @@ func ResourceTencentCloudCvmActionTimer() *schema.Resource {
48
48
ForceNew : true ,
49
49
Description : "Execution time, expressed according to ISO8601 standard and using UTC time. The format is YYYY-MM-DDThh:mm:ssZ. For example, 2018-05-29T11:26:40Z, the execution time must be 5 minutes longer than the current time." ,
50
50
},
51
- "externals" : {
52
- Type : schema .TypeList ,
53
- MaxItems : 1 ,
54
- Optional : true ,
55
- ForceNew : true ,
56
- Description : "Extended data." ,
57
- Elem : & schema.Resource {
58
- Schema : map [string ]* schema.Schema {
59
- "release_address" : {
60
- Type : schema .TypeBool ,
61
- Optional : true ,
62
- ForceNew : true ,
63
- Description : "Whether to release address of this instance." ,
64
- },
65
- // "unsupport_networks": {
66
- // Type: schema.TypeSet,
67
- // Elem: &schema.Schema{Type: schema.TypeString},
68
- // Optional: true,
69
- // Description: "Unsupported network type, Value range: BASIC - Basic Network; VPC1.0 - Private Network VPC1.0.",
70
- // },
71
- // "storage_block_attr": {
72
- // Type: schema.TypeList,
73
- // MaxItems: 1,
74
- // Optional: true,
75
- // Description: "HDD local storage properties.",
76
- // Elem: &schema.Resource{
77
- // Schema: map[string]*schema.Schema{
78
- // "type": {
79
- // Type: schema.TypeString,
80
- // Optional: true,
81
- // Description: "HDD local storage type, Value is: LOCAL_PRO.",
82
- // },
83
- // "min_size": {
84
- // Type: schema.TypeInt,
85
- // Optional: true,
86
- // Description: "Minimum capacity for HDD local storage.",
87
- // },
88
- // "max_size": {
89
- // Type: schema.TypeInt,
90
- // Optional: true,
91
- // Description: "Maximum capacity of HDD local storage.",
92
- // },
93
- // },
94
- // },
95
- // },
96
- },
97
- },
98
- },
51
+ // "externals": {
52
+ // Type: schema.TypeList,
53
+ // MaxItems: 1,
54
+ // Optional: true,
55
+ // ForceNew: true,
56
+ // Description: "Extended data.",
57
+ // Elem: &schema.Resource{
58
+ // Schema: map[string]*schema.Schema{
59
+ // "release_address": {
60
+ // Type: schema.TypeBool,
61
+ // Optional: true,
62
+ // ForceNew: true,
63
+ // Description: "Whether to release address of this instance.",
64
+ // },
65
+ // "unsupport_networks": {
66
+ // Type: schema.TypeSet,
67
+ // Elem: &schema.Schema{Type: schema.TypeString},
68
+ // Optional: true,
69
+ // Description: "Unsupported network type, Value range: BASIC - Basic Network; VPC1.0 - Private Network VPC1.0.",
70
+ // },
71
+ // "storage_block_attr": {
72
+ // Type: schema.TypeList,
73
+ // MaxItems: 1,
74
+ // Optional: true,
75
+ // Description: "HDD local storage properties.",
76
+ // Elem: &schema.Resource{
77
+ // Schema: map[string]*schema.Schema{
78
+ // "type": {
79
+ // Type: schema.TypeString,
80
+ // Optional: true,
81
+ // Description: "HDD local storage type, Value is: LOCAL_PRO.",
82
+ // },
83
+ // "min_size": {
84
+ // Type: schema.TypeInt,
85
+ // Optional: true,
86
+ // Description: "Minimum capacity for HDD local storage.",
87
+ // },
88
+ // "max_size": {
89
+ // Type: schema.TypeInt,
90
+ // Optional: true,
91
+ // Description: "Maximum capacity of HDD local storage.",
92
+ // },
93
+ // },
94
+ // },
95
+ // },
96
+ // },
97
+ // },
98
+ // },
99
99
},
100
100
},
101
101
},
@@ -127,41 +127,41 @@ func resourceTencentCloudCvmActionTimerCreate(d *schema.ResourceData, meta inter
127
127
actionTimer .ActionTime = helper .String (v .(string ))
128
128
}
129
129
130
- if externalsMap , ok := helper .InterfaceToMap (dMap , "externals" ); ok {
131
- externals := cvm.Externals {}
132
- if v , ok := externalsMap ["release_address" ]; ok {
133
- externals .ReleaseAddress = helper .Bool (v .(bool ))
134
- }
135
-
136
- // if v, ok := externalsMap["unsupport_networks"]; ok {
137
- // unsupportNetworksSet := v.(*schema.Set).List()
138
- // for i := range unsupportNetworksSet {
139
- // if unsupportNetworksSet[i] != nil {
140
- // unsupportNetworks := unsupportNetworksSet[i].(string)
141
- // externals.UnsupportNetworks = append(externals.UnsupportNetworks, &unsupportNetworks)
142
- // }
143
- // }
144
- // }
145
- //
146
- // if storageBlockAttrMap, ok := helper.InterfaceToMap(externalsMap, "storage_block_attr"); ok {
147
- // storageBlock := cvm.StorageBlock{}
148
- // if v, ok := storageBlockAttrMap["type"]; ok {
149
- // storageBlock.Type = helper.String(v.(string))
150
- // }
151
- //
152
- // if v, ok := storageBlockAttrMap["min_size"]; ok {
153
- // storageBlock.MinSize = helper.IntInt64(v.(int))
154
- // }
155
- //
156
- // if v, ok := storageBlockAttrMap["max_size"]; ok {
157
- // storageBlock.MaxSize = helper.IntInt64(v.(int))
158
- // }
159
- //
160
- // externals.StorageBlockAttr = &storageBlock
161
- // }
162
-
163
- actionTimer .Externals = & externals
164
- }
130
+ // if externalsMap, ok := helper.InterfaceToMap(dMap, "externals"); ok {
131
+ // externals := cvm.Externals{}
132
+ // if v, ok := externalsMap["release_address"]; ok {
133
+ // externals.ReleaseAddress = helper.Bool(v.(bool))
134
+ // }
135
+
136
+ // if v, ok := externalsMap["unsupport_networks"]; ok {
137
+ // unsupportNetworksSet := v.(*schema.Set).List()
138
+ // for i := range unsupportNetworksSet {
139
+ // if unsupportNetworksSet[i] != nil {
140
+ // unsupportNetworks := unsupportNetworksSet[i].(string)
141
+ // externals.UnsupportNetworks = append(externals.UnsupportNetworks, &unsupportNetworks)
142
+ // }
143
+ // }
144
+ // }
145
+
146
+ // if storageBlockAttrMap, ok := helper.InterfaceToMap(externalsMap, "storage_block_attr"); ok {
147
+ // storageBlock := cvm.StorageBlock{}
148
+ // if v, ok := storageBlockAttrMap["type"]; ok {
149
+ // storageBlock.Type = helper.String(v.(string))
150
+ // }
151
+
152
+ // if v, ok := storageBlockAttrMap["min_size"]; ok {
153
+ // storageBlock.MinSize = helper.IntInt64(v.(int))
154
+ // }
155
+
156
+ // if v, ok := storageBlockAttrMap["max_size"]; ok {
157
+ // storageBlock.MaxSize = helper.IntInt64(v.(int))
158
+ // }
159
+
160
+ // externals.StorageBlockAttr = &storageBlock
161
+ // }
162
+
163
+ // actionTimer.Externals = &externals
164
+ // }
165
165
166
166
request .ActionTimer = & actionTimer
167
167
}
@@ -224,35 +224,35 @@ func resourceTencentCloudCvmActionTimerRead(d *schema.ResourceData, meta interfa
224
224
actionTimerMap ["action_time" ] = InstanceActionTimer .ActionTime
225
225
}
226
226
227
- if InstanceActionTimer .Externals != nil {
228
- externalsMap := map [string ]interface {}{}
229
- if InstanceActionTimer .Externals .ReleaseAddress != nil {
230
- externalsMap ["release_address" ] = InstanceActionTimer .Externals .ReleaseAddress
231
- }
227
+ // if InstanceActionTimer.Externals != nil {
228
+ // externalsMap := map[string]interface{}{}
229
+ // if InstanceActionTimer.Externals.ReleaseAddress != nil {
230
+ // externalsMap["release_address"] = InstanceActionTimer.Externals.ReleaseAddress
231
+ // }
232
232
233
- // if InstanceActionTimer.Externals.UnsupportNetworks != nil {
234
- // externalsMap["unsupport_networks"] = InstanceActionTimer.Externals.UnsupportNetworks
235
- // }
236
- //
237
- // if InstanceActionTimer.Externals.StorageBlockAttr != nil {
238
- // storageBlockAttrMap := map[string]interface{}{}
239
- // if InstanceActionTimer.Externals.StorageBlockAttr.Type != nil {
240
- // storageBlockAttrMap["type"] = InstanceActionTimer.Externals.StorageBlockAttr.Type
241
- // }
242
- //
243
- // if InstanceActionTimer.Externals.StorageBlockAttr.MinSize != nil {
244
- // storageBlockAttrMap["min_size"] = InstanceActionTimer.Externals.StorageBlockAttr.MinSize
245
- // }
246
- //
247
- // if InstanceActionTimer.Externals.StorageBlockAttr.MaxSize != nil {
248
- // storageBlockAttrMap["max_size"] = InstanceActionTimer.Externals.StorageBlockAttr.MaxSize
249
- // }
250
- //
251
- // externalsMap["storage_block_attr"] = []interface{}{storageBlockAttrMap}
252
- // }
253
-
254
- actionTimerMap ["externals" ] = []interface {}{externalsMap }
255
- }
233
+ // if InstanceActionTimer.Externals.UnsupportNetworks != nil {
234
+ // externalsMap["unsupport_networks"] = InstanceActionTimer.Externals.UnsupportNetworks
235
+ // }
236
+
237
+ // if InstanceActionTimer.Externals.StorageBlockAttr != nil {
238
+ // storageBlockAttrMap := map[string]interface{}{}
239
+ // if InstanceActionTimer.Externals.StorageBlockAttr.Type != nil {
240
+ // storageBlockAttrMap["type"] = InstanceActionTimer.Externals.StorageBlockAttr.Type
241
+ // }
242
+
243
+ // if InstanceActionTimer.Externals.StorageBlockAttr.MinSize != nil {
244
+ // storageBlockAttrMap["min_size"] = InstanceActionTimer.Externals.StorageBlockAttr.MinSize
245
+ // }
246
+
247
+ // if InstanceActionTimer.Externals.StorageBlockAttr.MaxSize != nil {
248
+ // storageBlockAttrMap["max_size"] = InstanceActionTimer.Externals.StorageBlockAttr.MaxSize
249
+ // }
250
+
251
+ // externalsMap["storage_block_attr"] = []interface{}{storageBlockAttrMap}
252
+ // }
253
+
254
+ // actionTimerMap["externals"] = []interface{}{externalsMap}
255
+ // }
256
256
257
257
_ = d .Set ("action_timer" , []interface {}{actionTimerMap })
258
258
0 commit comments