diff --git a/ovh/resource_cloud_project_database.go b/ovh/resource_cloud_project_database.go index 4963bb8c3..c43456101 100644 --- a/ovh/resource_cloud_project_database.go +++ b/ovh/resource_cloud_project_database.go @@ -105,6 +105,15 @@ func resourceCloudProjectDatabase() *schema.Resource { Required: true, }, + //Optional/Computed + "disk_size": { + Type: schema.TypeInt, + Description: "Disk size attributes of the cluster", + Optional: true, + Computed: true, + ValidateFunc: validateCloudProjectDatabaseDiskSize, + }, + //Computed "backup_time": { Type: schema.TypeString, @@ -180,12 +189,6 @@ func resourceCloudProjectDatabase() *schema.Resource { Description: "Current status of the cluster", Computed: true, }, - "disk_size": { - Type: schema.TypeInt, - Description: "Disk size attributes of the cluster", - Optional: true, - ValidateFunc: validateCloudProjectDatabaseDiskSize, - }, "disk_type": { Type: schema.TypeString, Description: "Disk type attributes of the cluster", diff --git a/ovh/types_cloud_project_database.go b/ovh/types_cloud_project_database.go index 09ea4c05c..805b166a7 100644 --- a/ovh/types_cloud_project_database.go +++ b/ovh/types_cloud_project_database.go @@ -177,7 +177,7 @@ func (opts *CloudProjectDatabaseCreateOpts) FromResource(d *schema.ResourceData) opts.NetworkId = nodes[0].NetworkId opts.SubnetId = nodes[0].SubnetId opts.Version = d.Get("version").(string) - opts.Disk = CloudProjectDatabaseDisk{Size: d.Get("disk_size").(int), Type: d.Get("disk_type").(string)} + opts.Disk = CloudProjectDatabaseDisk{Size: d.Get("disk_size").(int)} return nil, opts } @@ -204,7 +204,7 @@ func (opts *CloudProjectDatabaseUpdateOpts) FromResource(d *schema.ResourceData) opts.Plan = d.Get("plan").(string) opts.Flavor = d.Get("flavor").(string) opts.Version = d.Get("version").(string) - opts.Disk = CloudProjectDatabaseDisk{Size: d.Get("disk_size").(int), Type: d.Get("disk_type").(string)} + opts.Disk = CloudProjectDatabaseDisk{Size: d.Get("disk_size").(int)} return nil, opts }