@@ -36,28 +36,28 @@ func resourceVcdTmEdgeClusterQos() *schema.Resource {
36
36
Description : fmt .Sprintf ("Region ID of %s" , labelTmEdgeCluster ),
37
37
},
38
38
"ingress_committed_bandwidth_mbps" : {
39
- Type : schema .TypeString ,
39
+ Type : schema .TypeString , // string + validation due to usual problem of differentiation between 0 and empty value for TypeInt
40
40
Optional : true ,
41
41
Description : fmt .Sprintf ("Ingress committed bandwidth in Mbps for %s" , labelTmEdgeCluster ),
42
42
ValidateFunc : emptyOrIsIntAndAtLeast (1 ),
43
43
RequiredWith : []string {"ingress_burst_size_bytes" },
44
44
},
45
45
"ingress_burst_size_bytes" : {
46
- Type : schema .TypeString ,
46
+ Type : schema .TypeString , // string + validation due to usual problem of differentiation between 0 and empty value for TypeInt
47
47
Optional : true ,
48
48
Description : fmt .Sprintf ("Ingress burst size bytes for %s" , labelTmEdgeCluster ),
49
49
ValidateFunc : emptyOrIsIntAndAtLeast (1 ),
50
50
RequiredWith : []string {"ingress_committed_bandwidth_mbps" },
51
51
},
52
52
"egress_committed_bandwidth_mbps" : {
53
- Type : schema .TypeString ,
53
+ Type : schema .TypeString , // string + validation due to usual problem of differentiation between 0 and empty value for TypeInt
54
54
Optional : true ,
55
55
Description : fmt .Sprintf ("Egress committed bandwidth in Mbps for %s" , labelTmEdgeCluster ),
56
56
ValidateFunc : emptyOrIsIntAndAtLeast (1 ),
57
57
RequiredWith : []string {"egress_burst_size_bytes" },
58
58
},
59
59
"egress_burst_size_bytes" : {
60
- Type : schema .TypeString ,
60
+ Type : schema .TypeString , // string + validation due to usual problem of differentiation between 0 and empty value for TypeInt
61
61
Optional : true ,
62
62
Description : fmt .Sprintf ("Ingress burst size bytes for %s" , labelTmEdgeCluster ),
63
63
ValidateFunc : emptyOrIsIntAndAtLeast (1 ),
@@ -92,7 +92,6 @@ func resourceVcdTmEdgeClusterQosCreate(ctx context.Context, d *schema.ResourceDa
92
92
93
93
func resourceVcdTmEdgeClusterQosUpdate (ctx context.Context , d * schema.ResourceData , meta interface {}) diag.Diagnostics {
94
94
vcdClient := meta .(* VCDClient )
95
-
96
95
c := crudConfig [* govcd.TmEdgeCluster , types.TmEdgeCluster ]{
97
96
entityLabel : labelTmEdgeClusterQos ,
98
97
getTypeFunc : getTmEdgeClusterQosType ,
@@ -115,7 +114,6 @@ func resourceVcdTmEdgeClusterQosRead(ctx context.Context, d *schema.ResourceData
115
114
116
115
func resourceVcdTmEdgeClusterQosDelete (ctx context.Context , d * schema.ResourceData , meta interface {}) diag.Diagnostics {
117
116
vcdClient := meta .(* VCDClient )
118
-
119
117
c := crudConfig [* govcd.TmEdgeCluster , types.TmEdgeCluster ]{
120
118
entityLabel : labelTmEdgeClusterQos ,
121
119
getEntityFunc : vcdClient .GetTmEdgeClusterById ,
@@ -126,7 +124,6 @@ func resourceVcdTmEdgeClusterQosDelete(ctx context.Context, d *schema.ResourceDa
126
124
127
125
func resourceVcdTmEdgeClusterQosImport (ctx context.Context , d * schema.ResourceData , meta interface {}) ([]* schema.ResourceData , error ) {
128
126
vcdClient := meta .(* VCDClient )
129
-
130
127
ec , err := vcdClient .GetTmEdgeClusterByName (d .Id ())
131
128
if err != nil {
132
129
return nil , fmt .Errorf ("error retrieving %s by Name '%s': %s" , labelTmEdgeClusterQos , d .Id (), err )
0 commit comments