@@ -43,6 +43,12 @@ func resourceDedicatedNASHAPartitionAccess() *schema.Resource {
43
43
Optional : true ,
44
44
ForceNew : true ,
45
45
},
46
+ "acl_description" : {
47
+ Type : schema .TypeString ,
48
+ Optional : true ,
49
+ ForceNew : true ,
50
+ Description : "A brief description of the ACL" ,
51
+ },
46
52
},
47
53
}
48
54
}
@@ -54,13 +60,14 @@ func resourceDedicatedNASHAPartitionAccessCreate(c context.Context, d *schema.Re
54
60
ipsubnet , _ := d .Get ("ip" ).(string )
55
61
56
62
access := & DedicatedNASHAPartitionAccess {
57
- IP : d .Get ("ip" ).(string ),
58
- Type : d .Get ("type" ).(string ),
63
+ IP : d .Get ("ip" ).(string ),
64
+ Type : d .Get ("type" ).(string ),
65
+ AclDescription : d .Get ("acl_description" ).(string ),
59
66
}
60
67
61
68
resp := & DedicatedNASHATask {}
62
69
63
- endpoint := fmt .Sprintf ("/dedicated/nasha/%s/partition/%s/access" , serviceName , partitionName )
70
+ endpoint := fmt .Sprintf ("/dedicated/nasha/%s/partition/%s/access" , url . PathEscape ( serviceName ), url . PathEscape ( partitionName ) )
64
71
65
72
err := config .OVHClient .Post (endpoint , access , resp )
66
73
if err != nil {
@@ -101,7 +108,7 @@ func resourceDedicatedNASHAPartitionAccessRead(c context.Context, d *schema.Reso
101
108
102
109
resp := & DedicatedNASHAPartitionAccess {}
103
110
104
- endpoint := fmt .Sprintf ("/dedicated/nasha/%s/partition/%s/access/%s" , serviceName , partitionName , url .PathEscape (ipsubnet ))
111
+ endpoint := fmt .Sprintf ("/dedicated/nasha/%s/partition/%s/access/%s" , url . PathEscape ( serviceName ), url . PathEscape ( partitionName ) , url .PathEscape (ipsubnet ))
105
112
106
113
err := config .OVHClient .Get (endpoint , resp )
107
114
if err != nil {
@@ -112,7 +119,9 @@ func resourceDedicatedNASHAPartitionAccessRead(c context.Context, d *schema.Reso
112
119
}
113
120
return diag .Errorf ("Error calling %s:\n \t '%q'" , endpoint , err )
114
121
}
122
+
115
123
d .Set ("type" , resp .Type )
124
+ d .Set ("acl_description" , resp .AclDescription )
116
125
117
126
return nil
118
127
}
@@ -123,7 +132,7 @@ func resourceDedicatedNASHAPartitionAccessDelete(c context.Context, d *schema.Re
123
132
partitionName := d .Get ("partition_name" ).(string )
124
133
ipsubnet , _ := d .Get ("ip" ).(string )
125
134
126
- endpoint := fmt .Sprintf ("/dedicated/nasha/%s/partition/%s/access/%s" , serviceName , partitionName , url .PathEscape (ipsubnet ))
135
+ endpoint := fmt .Sprintf ("/dedicated/nasha/%s/partition/%s/access/%s" , url . PathEscape ( serviceName ), url . PathEscape ( partitionName ) , url .PathEscape (ipsubnet ))
127
136
128
137
resp := & DedicatedNASHATask {}
129
138
0 commit comments