@@ -31,31 +31,34 @@ var (
3131 FileStorageFileSystem2RequiredOnlyResource = acctest .GenerateResourceFromRepresentationMap ("oci_file_storage_file_system" , "test_file_system2" , acctest .Required , acctest .Create , FileStorageFileSystemRepresentation )
3232
3333 FileStorageFileStorageFileSystemDataSourceRepresentation = map [string ]interface {}{
34- "availability_domain" : acctest.Representation {RepType : acctest .Required , Create : `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}` },
35- "compartment_id" : acctest.Representation {RepType : acctest .Required , Create : `${var.compartment_id}` },
36- "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `media-files-1` , Update : `displayName2` },
37- "id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_file_system.test_file_system2.id}` },
38- "parent_file_system_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_file_system.test_file_system.id}` },
39- "source_snapshot_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_snapshot.test_snapshot.id}` },
40- "state" : acctest.Representation {RepType : acctest .Optional , Create : `ACTIVE` },
41- "filter" : acctest.RepresentationGroup {RepType : acctest .Required , Group : FileStorageFileSystemDataSourceFilterRepresentation }}
34+ "availability_domain" : acctest.Representation {RepType : acctest .Required , Create : `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}` },
35+ "compartment_id" : acctest.Representation {RepType : acctest .Required , Create : `${var.compartment_id}` },
36+ "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `media-files-1` , Update : `displayName2` },
37+ "filesystem_snapshot_policy_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id}` },
38+ "id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_file_system.test_file_system2.id}` },
39+ "parent_file_system_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_file_system.test_file_system.id}` },
40+ "source_snapshot_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_snapshot.test_snapshot.id}` },
41+ "state" : acctest.Representation {RepType : acctest .Optional , Create : `ACTIVE` },
42+ "filter" : acctest.RepresentationGroup {RepType : acctest .Required , Group : FileStorageFileSystemDataSourceFilterRepresentation }}
4243 FileStorageFileSystemDataSourceFilterRepresentation = map [string ]interface {}{
4344 "name" : acctest.Representation {RepType : acctest .Required , Create : `id` },
4445 "values" : acctest.Representation {RepType : acctest .Required , Create : []string {`${oci_file_storage_file_system.test_file_system2.id}` }},
4546 }
4647
4748 FileStorageFileSystemRepresentation = map [string ]interface {}{
48- "availability_domain" : acctest.Representation {RepType : acctest .Required , Create : `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}` },
49- "compartment_id" : acctest.Representation {RepType : acctest .Required , Create : `${var.compartment_id}` },
50- "defined_tags" : acctest.Representation {RepType : acctest .Optional , Create : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}` , Update : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}` },
51- "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `media-files-1` , Update : `displayName2` },
52- "freeform_tags" : acctest.Representation {RepType : acctest .Optional , Create : map [string ]string {"Department" : "Finance" }, Update : map [string ]string {"Department" : "Accounting" }},
53- "source_snapshot_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_snapshot.test_snapshot.id}` },
54- "kms_key_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_kms_key.kms_key_id_for_create.id}` , Update : `${oci_kms_key.kms_key_id_for_update.id}` },
55- "lifecycle" : acctest.RepresentationGroup {RepType : acctest .Required , Group : ignoreDefinedTagsDifferencesRepresentation },
49+ "availability_domain" : acctest.Representation {RepType : acctest .Required , Create : `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}` },
50+ "compartment_id" : acctest.Representation {RepType : acctest .Required , Create : `${var.compartment_id}` },
51+ "defined_tags" : acctest.Representation {RepType : acctest .Optional , Create : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}` , Update : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}` },
52+ "display_name" : acctest.Representation {RepType : acctest .Optional , Create : `media-files-1` , Update : `displayName2` },
53+ "filesystem_snapshot_policy_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id}` },
54+ "freeform_tags" : acctest.Representation {RepType : acctest .Optional , Create : map [string ]string {"Department" : "Finance" }, Update : map [string ]string {"Department" : "Accounting" }},
55+ "kms_key_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_kms_key.kms_key_id_for_create.id}` , Update : `${oci_kms_key.kms_key_id_for_update.id}` },
56+ "source_snapshot_id" : acctest.Representation {RepType : acctest .Optional , Create : `${oci_file_storage_snapshot.test_snapshot.id}` },
57+ "lifecycle" : acctest.RepresentationGroup {RepType : acctest .Required , Group : ignoreDefinedTagsDifferencesRepresentation },
5658 }
5759
5860 FileStorageFileSystemResourceDependencies = acctest .GenerateResourceFromRepresentationMap ("oci_file_storage_file_system" , "test_file_system" , acctest .Required , acctest .Create , FileStorageFileSystemRepresentation ) +
61+ acctest .GenerateResourceFromRepresentationMap ("oci_file_storage_filesystem_snapshot_policy" , "test_filesystem_snapshot_policy" , acctest .Required , acctest .Create , FileStorageFilesystemSnapshotPolicyRepresentation ) +
5962 acctest .GenerateResourceFromRepresentationMap ("oci_file_storage_snapshot" , "test_snapshot" , acctest .Required , acctest .Create , FileStorageSnapshotRepresentation ) +
6063 AvailabilityDomainConfig +
6164 DefinedTagsDependencies +
@@ -121,6 +124,7 @@ func TestFileStorageFileSystemResource_basic(t *testing.T) {
121124 resource .TestCheckResourceAttrSet (resourceName , "availability_domain" ),
122125 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
123126 resource .TestCheckResourceAttr (resourceName , "display_name" , "media-files-1" ),
127+ resource .TestCheckResourceAttrSet (resourceName , "filesystem_snapshot_policy_id" ),
124128 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
125129 resource .TestCheckResourceAttrSet (resourceName , "id" ),
126130 resource .TestCheckResourceAttrSet (resourceName , "kms_key_id" ),
@@ -152,6 +156,7 @@ func TestFileStorageFileSystemResource_basic(t *testing.T) {
152156 resource .TestCheckResourceAttrSet (resourceName , "availability_domain" ),
153157 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentIdU ),
154158 resource .TestCheckResourceAttr (resourceName , "display_name" , "media-files-1" ),
159+ resource .TestCheckResourceAttrSet (resourceName , "filesystem_snapshot_policy_id" ),
155160 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
156161 resource .TestCheckResourceAttrSet (resourceName , "id" ),
157162 resource .TestCheckResourceAttrSet (resourceName , "kms_key_id" ),
@@ -178,6 +183,7 @@ func TestFileStorageFileSystemResource_basic(t *testing.T) {
178183 resource .TestCheckResourceAttrSet (resourceName , "availability_domain" ),
179184 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
180185 resource .TestCheckResourceAttr (resourceName , "display_name" , "displayName2" ),
186+ resource .TestCheckResourceAttrSet (resourceName , "filesystem_snapshot_policy_id" ),
181187 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
182188 resource .TestCheckResourceAttrSet (resourceName , "id" ),
183189 resource .TestCheckResourceAttrSet (resourceName , "kms_key_id" ),
@@ -205,6 +211,7 @@ func TestFileStorageFileSystemResource_basic(t *testing.T) {
205211 resource .TestCheckResourceAttrSet (datasourceName , "availability_domain" ),
206212 resource .TestCheckResourceAttr (datasourceName , "compartment_id" , compartmentId ),
207213 resource .TestCheckResourceAttr (datasourceName , "display_name" , "displayName2" ),
214+ resource .TestCheckResourceAttrSet (datasourceName , "filesystem_snapshot_policy_id" ),
208215 resource .TestCheckResourceAttrSet (datasourceName , "id" ),
209216 resource .TestCheckResourceAttrSet (datasourceName , "parent_file_system_id" ),
210217 resource .TestCheckResourceAttrSet (datasourceName , "source_snapshot_id" ),
0 commit comments