This commit is contained in:
2024-11-12 13:41:38 +03:00
parent 040af43607
commit 36879efd58
517 changed files with 37877 additions and 1900 deletions

View File

@@ -238,12 +238,6 @@ func resourceDiskUpdate(ctx context.Context, d *schema.ResourceData, m interface
DiskID: disk.ID,
}
if reason, ok := d.GetOk("reason"); ok {
req.Reason = reason.(string)
} else {
req.Reason = "Terraform automatic restore"
}
_, err := c.CloudAPI().Disks().Restore(ctx, req)
if err != nil {
warnings.Add(err)
@@ -362,7 +356,6 @@ func resourceDiskDelete(ctx context.Context, d *schema.ResourceData, m interface
DiskID: disk.ID,
Detach: d.Get("detach").(bool),
Permanently: d.Get("permanently").(bool),
Reason: d.Get("reason").(string),
}
c := m.(*controller.ControllerCfg)
@@ -437,12 +430,6 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
Default: false,
Description: "Whether to completely delete the disk, works only with non attached disks",
},
"reason": {
Type: schema.TypeString,
Optional: true,
Default: "",
Description: "Reason for deletion",
},
"shareable": {
Type: schema.TypeBool,
Optional: true,
@@ -677,27 +664,27 @@ func resourceDiskSchemaMake() map[string]*schema.Schema {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"disk_id": {
Type: schema.TypeInt,
Type: schema.TypeInt,
Computed: true,
},
"pool_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"role": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"self_volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"storage_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
"volume_id": {
Type: schema.TypeString,
Type: schema.TypeString,
Computed: true,
},
},

View File

@@ -177,7 +177,6 @@ func resourceDiskReplicationDelete(ctx context.Context, d *schema.ResourceData,
DiskID: disk.ID,
Detach: d.Get("detach").(bool),
Permanently: d.Get("permanently").(bool),
Reason: d.Get("reason").(string),
}
log.Debugf("resourceDiskReplicationDelete: delete disk replica for disk with ID: %d", diskId)
@@ -243,11 +242,6 @@ func resourceDiskReplicationSchemaMake() map[string]*schema.Schema {
Default: false,
Description: "Delete disk permanently",
},
"reason": {
Type: schema.TypeString,
Optional: true,
Description: "Reason for disk deletion",
},
"replica_disk_id": {
Type: schema.TypeInt,
Computed: true,