@@ -81,19 +81,18 @@ var (
8181 "value" : Representation {repType : Optional , create : `value` , update : `value2` },
8282 }
8383
84- // @CODEGEN: OKE does not support regional subnets
85- NodePoolResourceDependencies = ClusterRequiredOnlyResource + InstanceCommonVariables +
86- generateResourceFromRepresentationMap ("oci_core_subnet" , "nodePool_Subnet_1" , Optional , Create ,
87- getMultipleUpdatedRepresenationCopy (
88- []string {"cidr_block" , "dns_label" },
89- []interface {}{Representation {repType : Optional , create : `10.0.22.0/24` }, Representation {repType : Optional , create : `nodepool1` }},
90- subnetRepresentation )) +
91- generateResourceFromRepresentationMap ("oci_core_subnet" , "nodePool_Subnet_2" , Optional , Create ,
92- getMultipleUpdatedRepresenationCopy (
93- []string {"cidr_block" , "dns_label" },
94- []interface {}{Representation {repType : Optional , create : `10.0.23.0/24` }, Representation {repType : Optional , create : `nodepool2` }},
95- subnetRepresentation )) +
96- generateDataSourceFromRepresentationMap ("oci_containerengine_node_pool_option" , "test_node_pool_option" , Required , Create , nodePoolOptionSingularDataSourceRepresentation )
84+ NodePoolResourceDependencies = generateDataSourceFromRepresentationMap ("oci_containerengine_node_pool_option" , "test_node_pool_option" , Required , Create , nodePoolOptionSingularDataSourceRepresentation ) +
85+ generateResourceFromRepresentationMap ("oci_core_subnet" , "nodePool_Subnet_1" , Required , Create , representationCopyWithNewProperties (subnetRepresentation , map [string ]interface {}{"availability_domain" : Representation {repType : Required , create : `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}` }, "cidr_block" : Representation {repType : Required , create : `10.0.22.0/24` }, "dns_label" : Representation {repType : Required , create : `nodepool1` }})) +
86+ generateResourceFromRepresentationMap ("oci_core_subnet" , "nodePool_Subnet_2" , Required , Create , representationCopyWithNewProperties (subnetRepresentation , map [string ]interface {}{"availability_domain" : Representation {repType : Required , create : `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}` }, "cidr_block" : Representation {repType : Required , create : `10.0.23.0/24` }, "dns_label" : Representation {repType : Required , create : `nodepool2` }})) +
87+ generateResourceFromRepresentationMap ("oci_containerengine_cluster" , "test_cluster" , Required , Create , clusterRepresentation ) +
88+ generateResourceFromRepresentationMap ("oci_core_subnet" , "clusterSubnet_1" , Required , Create , representationCopyWithNewProperties (subnetRepresentation , map [string ]interface {}{"availability_domain" : Representation {repType : Required , create : `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}` }, "cidr_block" : Representation {repType : Required , create : `10.0.20.0/24` }, "dns_label" : Representation {repType : Required , create : `cluster1` }})) +
89+ generateResourceFromRepresentationMap ("oci_core_subnet" , "clusterSubnet_2" , Required , Create , representationCopyWithNewProperties (subnetRepresentation , map [string ]interface {}{"availability_domain" : Representation {repType : Required , create : `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}` }, "cidr_block" : Representation {repType : Required , create : `10.0.21.0/24` }, "dns_label" : Representation {repType : Required , create : `cluster2` }})) +
90+ AvailabilityDomainConfig +
91+ generateDataSourceFromRepresentationMap ("oci_containerengine_cluster_option" , "test_cluster_option" , Required , Create , clusterOptionSingularDataSourceRepresentation ) +
92+ OciImageIdsVariable +
93+ generateResourceFromRepresentationMap ("oci_core_vcn" , "test_vcn" , Required , Create , representationCopyWithNewProperties (vcnRepresentation , map [string ]interface {}{
94+ "dns_label" : Representation {repType : Required , create : `dnslabel` },
95+ }))
9796)
9897
9998func TestContainerengineNodePoolResource_basic (t * testing.T ) {
@@ -172,7 +171,7 @@ func TestContainerengineNodePoolResource_basic(t *testing.T) {
172171 resource .TestCheckResourceAttrSet (resourceName , "kubernetes_version" ),
173172 resource .TestCheckResourceAttr (resourceName , "name" , "name" ),
174173 resource .TestCheckResourceAttrSet (resourceName , "node_image_id" ),
175- resource .TestCheckResourceAttr (resourceName , "node_image_name" , "Oracle-Linux-7.4 " ),
174+ resource .TestCheckResourceAttrSet (resourceName , "node_image_name" ),
176175 resource .TestCheckResourceAttr (resourceName , "node_metadata.%" , "1" ),
177176 resource .TestCheckResourceAttr (resourceName , "node_shape" , "VM.Standard2.1" ),
178177 resource .TestCheckResourceAttr (resourceName , "quantity_per_subnet" , "1" ),
@@ -216,7 +215,7 @@ func TestContainerengineNodePoolResource_basic(t *testing.T) {
216215 resource .TestCheckResourceAttrSet (resourceName , "kubernetes_version" ),
217216 resource .TestCheckResourceAttr (resourceName , "name" , "name2" ),
218217 resource .TestCheckResourceAttrSet (resourceName , "node_image_id" ),
219- resource .TestCheckResourceAttr (resourceName , "node_image_name" , "Oracle-Linux-7.4 " ),
218+ resource .TestCheckResourceAttrSet (resourceName , "node_image_name" ),
220219 resource .TestCheckResourceAttr (resourceName , "node_metadata.%" , "1" ),
221220 resource .TestCheckResourceAttr (resourceName , "node_shape" , "VM.Standard2.1" ),
222221 resource .TestCheckResourceAttr (resourceName , "quantity_per_subnet" , "2" ),
0 commit comments