Skip to content

Commit

Permalink
unable to update authenticator_groups_config (#6755) (#13111)
Browse files Browse the repository at this point in the history
* unable to update authenticator_groups_config

Co-authored-by: Edward Sun <sunedward@google.com>
Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
Co-authored-by: Edward Sun <sunedward@google.com>
  • Loading branch information
modular-magician and Edward Sun committed Nov 22, 2022
1 parent d2fb86b commit e95011e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/6755.txt
@@ -0,0 +1,3 @@
```release-note:bug
container: fixed unable to update `authenticator_groups_config` on `google_container_cluster`
```
11 changes: 9 additions & 2 deletions google/resource_container_cluster.go
Expand Up @@ -3804,9 +3804,16 @@ func expandContainerClusterAuthenticatorGroupsConfig(configured interface{}) *co
}

config := l[0].(map[string]interface{})
return &container.AuthenticatorGroupsConfig{
SecurityGroup: config["security_group"].(string),
result := &container.AuthenticatorGroupsConfig{}
if securityGroup, ok := config["security_group"]; ok {
if securityGroup == nil || securityGroup.(string) == "" {
result.Enabled = false
} else {
result.Enabled = true
result.SecurityGroup = securityGroup.(string)
}
}
return result
}

func expandNodePoolDefaults(configured interface{}) *container.NodePoolDefaults {
Expand Down

0 comments on commit e95011e

Please sign in to comment.