@@ -15,11 +15,17 @@ import (
1515var (
1616 clusterKubeConfigSingularDataSourceRepresentation = map [string ]interface {}{
1717 "cluster_id" : Representation {repType : Required , create : `${oci_containerengine_cluster.test_cluster.id}` },
18- "expiration" : Representation {repType : Optional , create : `2592000` },
19- "token_version" : Representation {repType : Optional , create : `1.0.0` },
18+ "token_version" : Representation {repType : Optional , create : `2.0.0` },
2019 }
2120
22- ClusterKubeConfigResourceConfig = ClusterResourceConfig
21+ ClusterKubeConfigResourceConfig = generateResourceFromRepresentationMap ("oci_containerengine_cluster" , "test_cluster" , Required , Create , clusterRepresentation ) +
22+ 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` }})) +
23+ 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` }})) +
24+ AvailabilityDomainConfig +
25+ generateDataSourceFromRepresentationMap ("oci_containerengine_cluster_option" , "test_cluster_option" , Required , Create , clusterOptionSingularDataSourceRepresentation ) +
26+ generateResourceFromRepresentationMap ("oci_core_vcn" , "test_vcn" , Required , Create , representationCopyWithNewProperties (vcnRepresentation , map [string ]interface {}{
27+ "dns_label" : Representation {repType : Required , create : `dnslabel` },
28+ }))
2329)
2430
2531func TestContainerengineClusterKubeConfigResource_basic (t * testing.T ) {
@@ -47,8 +53,7 @@ func TestContainerengineClusterKubeConfigResource_basic(t *testing.T) {
4753 compartmentIdVariableStr + ClusterKubeConfigResourceConfig ,
4854 Check : resource .ComposeAggregateTestCheckFunc (
4955 resource .TestCheckResourceAttrSet (singularDatasourceName , "cluster_id" ),
50- resource .TestCheckResourceAttr (singularDatasourceName , "expiration" , "2592000" ),
51- resource .TestCheckResourceAttr (singularDatasourceName , "token_version" , "1.0.0" ),
56+ resource .TestCheckResourceAttr (singularDatasourceName , "token_version" , "2.0.0" ),
5257 resource .TestCheckResourceAttrSet (singularDatasourceName , "content" ),
5358 ),
5459 },
0 commit comments