@@ -704,14 +704,6 @@ func resourceContainerCluster() *schema.Resource {
704
704
Description : `The IP address of this cluster's Kubernetes master.` ,
705
705
},
706
706
707
- "instance_group_urls" : {
708
- Type : schema .TypeList ,
709
- Computed : true ,
710
- Deprecated : `Please use node_pool.instance_group_urls instead.` ,
711
- Elem : & schema.Schema {Type : schema .TypeString },
712
- Description : `List of instance group URLs which have been assigned to the cluster.` ,
713
- },
714
-
715
707
"master_version" : {
716
708
Type : schema .TypeString ,
717
709
Computed : true ,
@@ -1559,14 +1551,6 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro
1559
1551
return err
1560
1552
}
1561
1553
1562
- igUrls , err := getInstanceGroupUrlsFromManagerUrls (config , userAgent , cluster .InstanceGroupUrls )
1563
- if err != nil {
1564
- return err
1565
- }
1566
- if err := d .Set ("instance_group_urls" , igUrls ); err != nil {
1567
- return err
1568
- }
1569
-
1570
1554
if err := d .Set ("vertical_pod_autoscaling" , flattenVerticalPodAutoscaling (cluster .VerticalPodAutoscaling )); err != nil {
1571
1555
return err
1572
1556
}
@@ -2490,30 +2474,6 @@ func containerClusterAwaitRestingState(config *Config, project, location, cluste
2490
2474
return state , err
2491
2475
}
2492
2476
2493
- // container engine's API returns the instance group manager's URL instead of the instance
2494
- // group's URL in its responses, while the field is named as if it should have been the group
2495
- // and not the manager. This shim should be supported for backwards compatibility reasons.
2496
- func getInstanceGroupUrlsFromManagerUrls (config * Config , userAgent string , igmUrls []string ) ([]string , error ) {
2497
- instanceGroupURLs := make ([]string , 0 , len (igmUrls ))
2498
- for _ , u := range igmUrls {
2499
- if ! instanceGroupManagerURL .MatchString (u ) {
2500
- instanceGroupURLs = append (instanceGroupURLs , u )
2501
- continue
2502
- }
2503
- matches := instanceGroupManagerURL .FindStringSubmatch (u )
2504
- instanceGroupManager , err := config .NewComputeClient (userAgent ).InstanceGroupManagers .Get (matches [1 ], matches [2 ], matches [3 ]).Do ()
2505
- if isGoogleApiErrorWithCode (err , 404 ) {
2506
- // The IGM URL is stale; don't include it
2507
- continue
2508
- }
2509
- if err != nil {
2510
- return nil , fmt .Errorf ("Error reading instance group manager returned as an instance group URL: %s" , err )
2511
- }
2512
- instanceGroupURLs = append (instanceGroupURLs , instanceGroupManager .InstanceGroup )
2513
- }
2514
- return instanceGroupURLs , nil
2515
- }
2516
-
2517
2477
func expandClusterAddonsConfig (configured interface {}) * container.AddonsConfig {
2518
2478
l := configured .([]interface {})
2519
2479
if len (l ) == 0 || l [0 ] == nil {
0 commit comments