Skip to content

Commit

Permalink
fix(nasVolume): Add missing regionCode while updating (#265)
Browse files Browse the repository at this point in the history
* add_regionCode_to_nas_volume

* add_regionCode_to_nas_volume

---------

Co-authored-by: Sungminlee <[email protected]>
  • Loading branch information
minosmlee and Sungminlee authored Mar 24, 2023
1 parent 22b9f18 commit b0e8892
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ncloud/resource_ncloud_nas_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package ncloud

import (
"fmt"
"github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/vnas"
"log"
"time"

"github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/vnas"

"github.com/NaverCloudPlatform/ncloud-sdk-go-v2/ncloud"
"github.com/NaverCloudPlatform/ncloud-sdk-go-v2/services/server"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand Down Expand Up @@ -509,6 +510,7 @@ func changeClassicNasVolumeSize(d *schema.ResourceData, config *ProviderConfig)

func changeVpcNasVolumeSize(d *schema.ResourceData, config *ProviderConfig) error {
reqParams := &vnas.ChangeNasVolumeSizeRequest{
RegionCode: &config.RegionCode,
NasVolumeInstanceNo: ncloud.String(d.Id()),
VolumeSize: Int32PtrOrNil(d.GetOk("volume_size")),
}
Expand Down Expand Up @@ -556,6 +558,7 @@ func setClassicNasVolumeAccessControl(d *schema.ResourceData, config *ProviderCo

func setVpcNasVolumeAccessControl(d *schema.ResourceData, config *ProviderConfig) error {
reqParams := &vnas.SetNasVolumeAccessControlRequest{
RegionCode: &config.RegionCode,
NasVolumeInstanceNo: ncloud.String(d.Id()),
ServerInstanceNoList: expandStringInterfaceList(d.Get("server_instance_no_list").([]interface{})),
}
Expand Down

0 comments on commit b0e8892

Please sign in to comment.