Skip to content

Commit

Permalink
Remove error status check in GKE cluster on read (#3115) (#1759)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Feb 12, 2020
1 parent 4c33028 commit fbbccd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/3115.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
container: `google_container_cluster` will allow importing / updating / deleting clusters in error states
```
3 changes: 0 additions & 3 deletions google-beta/resource_container_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1232,9 +1232,6 @@ func resourceContainerClusterRead(d *schema.ResourceData, meta interface{}) erro
if err != nil {
return handleNotFoundError(err, d, fmt.Sprintf("Container Cluster %q", d.Get("name").(string)))
}
if cluster.Status == "ERROR" || cluster.Status == "DEGRADED" {
return fmt.Errorf("Cluster %q has status %q with message %q", d.Get("name"), cluster.Status, cluster.StatusMessage)
}

d.Set("name", cluster.Name)
if err := d.Set("network_policy", flattenNetworkPolicy(cluster.NetworkPolicy)); err != nil {
Expand Down

0 comments on commit fbbccd9

Please sign in to comment.