@@ -20,10 +20,10 @@ import (
2020
2121var (
2222 VnicAttachmentRequiredOnlyResource = VnicAttachmentResourceDependencies +
23- generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Required , Create , vnicAttachmentRepresentationSubnet )
23+ generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Required , Create , vnicAttachmentRepresentation )
2424
2525 VnicAttachmentResourceConfig = VnicAttachmentResourceDependencies +
26- generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Optional , Create , vnicAttachmentRepresentationSubnet )
26+ generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Optional , Create , vnicAttachmentRepresentation )
2727
2828 vnicAttachmentDataSourceRepresentation = map [string ]interface {}{
2929 "compartment_id" : Representation {repType : Required , create : `${var.compartment_id}` },
4242 "nic_index" : Representation {repType : Optional , create : `0` },
4343 }
4444 vnicAttachmentCreateVnicDetailsRepresentation = map [string ]interface {}{
45+ "subnet_id" : Representation {repType : Required , create : `${oci_core_subnet.test_subnet.id}` },
4546 "assign_public_ip" : Representation {repType : Optional , create : `false` },
4647 "defined_tags" : Representation {repType : 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")}` },
4748 "display_name" : Representation {repType : Optional , create : `displayName` },
5051 "nsg_ids" : Representation {repType : Optional , create : []string {`${oci_core_network_security_group.test_network_security_group.id}` }, update : []string {}},
5152 "private_ip" : Representation {repType : Optional , create : `10.0.0.5` },
5253 "skip_source_dest_check" : Representation {repType : Optional , create : `false` },
53- "subnet_id" : Representation {repType : Required , create : `${oci_core_subnet.test_subnet.id}` },
54- "vlan_id" : Representation {repType : Required , create : `${oci_core_vlan.test_vlan.id}` },
5554 }
5655
5756 VnicAttachmentResourceDependencies = OciImageIdsVariable +
6362 generateResourceFromRepresentationMap ("oci_core_vcn" , "test_vcn" , Required , Create , representationCopyWithNewProperties (vcnRepresentation , map [string ]interface {}{
6463 "dns_label" : Representation {repType : Required , create : `dnslabel` },
6564 })) +
66- generateResourceFromRepresentationMap ("oci_core_vlan" , "test_vlan" , Required , Create , vlanRepresentation ) +
6765 AvailabilityDomainConfig +
6866 DefinedTagsDependencies
6967)
@@ -91,7 +89,7 @@ func TestCoreVnicAttachmentResource_basic(t *testing.T) {
9189 // verify create
9290 {
9391 Config : config + compartmentIdVariableStr + VnicAttachmentResourceDependencies +
94- generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Required , Create , vnicAttachmentRepresentationSubnet ),
92+ generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Required , Create , vnicAttachmentRepresentation ),
9593 Check : resource .ComposeAggregateTestCheckFunc (
9694 resource .TestCheckResourceAttr (resourceName , "create_vnic_details.#" , "1" ),
9795 resource .TestCheckResourceAttrSet (resourceName , "create_vnic_details.0.subnet_id" ),
@@ -106,7 +104,7 @@ func TestCoreVnicAttachmentResource_basic(t *testing.T) {
106104 // verify create with optionals
107105 {
108106 Config : config + compartmentIdVariableStr + VnicAttachmentResourceDependencies +
109- generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Optional , Create , vnicAttachmentRepresentationSubnet ),
107+ generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Optional , Create , vnicAttachmentRepresentation ),
110108 Check : resource .ComposeAggregateTestCheckFunc (
111109 resource .TestCheckResourceAttrSet (resourceName , "availability_domain" ),
112110 resource .TestCheckResourceAttrSet (resourceName , "compartment_id" ),
@@ -135,7 +133,7 @@ func TestCoreVnicAttachmentResource_basic(t *testing.T) {
135133 Config : config +
136134 generateDataSourceFromRepresentationMap ("oci_core_vnic_attachments" , "test_vnic_attachments" , Optional , Update , vnicAttachmentDataSourceRepresentation ) +
137135 compartmentIdVariableStr + VnicAttachmentResourceDependencies +
138- generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Optional , Update , vnicAttachmentRepresentationSubnet ),
136+ generateResourceFromRepresentationMap ("oci_core_vnic_attachment" , "test_vnic_attachment" , Optional , Update , vnicAttachmentRepresentation ),
139137 Check : resource .ComposeAggregateTestCheckFunc (
140138 resource .TestCheckResourceAttr (datasourceName , "compartment_id" , compartmentId ),
141139 resource .TestCheckResourceAttrSet (datasourceName , "instance_id" ),
0 commit comments