@@ -938,6 +938,24 @@ func TestAccNetappVolume_volumeExportPolicyWithSquashMode(t *testing.T) {
938938 ImportStateVerify: true,
939939 ImportStateVerifyIgnore: []string{"restore_parameters", "location", "name", "deletion_policy", "labels", "terraform_labels"},
940940 },
941+ {
942+ Config: testAccNetappVolume_volumeExportPolicyWithoutSquashMode(context),
943+ },
944+ {
945+ ResourceName: "google_netapp_volume.test_volume",
946+ ImportState: true,
947+ ImportStateVerify: true,
948+ ImportStateVerifyIgnore: []string{"restore_parameters", "location", "name", "deletion_policy", "labels", "terraform_labels"},
949+ },
950+ {
951+ Config: testAccNetappVolume_volumeExportPolicyWithoutSquashModeUpdate(context),
952+ },
953+ {
954+ ResourceName: "google_netapp_volume.test_volume",
955+ ImportState: true,
956+ ImportStateVerify: true,
957+ ImportStateVerifyIgnore: []string{"restore_parameters", "location", "name", "deletion_policy", "labels", "terraform_labels"},
958+ },
941959 },
942960 })
943961}
@@ -1222,4 +1240,80 @@ func testAccNetappVolume_volumeExportPolicyWithSquashMode_rootSquash_readNoneAcc
12221240 }
12231241 `, context)
12241242}
1243+
1244+ func testAccNetappVolume_volumeExportPolicyWithoutSquashMode(context map[string]interface{}) string {
1245+ return acctest.Nprintf(`
1246+ resource "google_netapp_storage_pool" "default" {
1247+ provider = google-beta
1248+ name = "tf-test-pool%{random_suffix}"
1249+ location = "northamerica-northeast1"
1250+ service_level = "PREMIUM"
1251+ capacity_gib = "2048"
1252+ network = data.google_compute_network.default.id
1253+ }
1254+ resource "time_sleep" "wait_3_minutes" {
1255+ depends_on = [google_netapp_storage_pool.default]
1256+ create_duration = "3m"
1257+ }
1258+ resource "google_netapp_volume" "test_volume" {
1259+ provider = google-beta
1260+ location = "northamerica-northeast1"
1261+ name = "tf-test-test-volume%{random_suffix}"
1262+ capacity_gib = "100"
1263+ share_name = "tf-test-test-volume%{random_suffix}"
1264+ storage_pool = google_netapp_storage_pool.default.name
1265+ protocols = ["NFSV3"]
1266+ export_policy {
1267+ rules {
1268+ access_type = "READ_NONE"
1269+ allowed_clients = "0.0.0.0/0"
1270+ nfsv3 = true
1271+ }
1272+ }
1273+ }
1274+
1275+ data "google_compute_network" "default" {
1276+ provider = google-beta
1277+ name = "%{network_name}"
1278+ }
1279+ `, context)
1280+ }
1281+
1282+ func testAccNetappVolume_volumeExportPolicyWithoutSquashModeUpdate(context map[string]interface{}) string {
1283+ return acctest.Nprintf(`
1284+ resource "google_netapp_storage_pool" "default" {
1285+ provider = google-beta
1286+ name = "tf-test-pool%{random_suffix}"
1287+ location = "northamerica-northeast1"
1288+ service_level = "PREMIUM"
1289+ capacity_gib = "2048"
1290+ network = data.google_compute_network.default.id
1291+ }
1292+ resource "time_sleep" "wait_3_minutes" {
1293+ depends_on = [google_netapp_storage_pool.default]
1294+ create_duration = "3m"
1295+ }
1296+ resource "google_netapp_volume" "test_volume" {
1297+ provider = google-beta
1298+ location = "northamerica-northeast1"
1299+ name = "tf-test-test-volume%{random_suffix}"
1300+ capacity_gib = "200"
1301+ share_name = "tf-test-test-volume%{random_suffix}"
1302+ storage_pool = google_netapp_storage_pool.default.name
1303+ protocols = ["NFSV3"]
1304+ export_policy {
1305+ rules {
1306+ access_type = "READ_NONE"
1307+ allowed_clients = "0.0.0.0/0"
1308+ nfsv3 = true
1309+ }
1310+ }
1311+ }
1312+
1313+ data "google_compute_network" "default" {
1314+ provider = google-beta
1315+ name = "%{network_name}"
1316+ }
1317+ `, context)
1318+ }
12251319{{ end }}
0 commit comments