Skip to content

Commit d075c82

Browse files
modular-magicianEdward Sun
and
Edward Sun
authored
filter nil (#6916) (#13188)
Co-authored-by: Edward Sun <[email protected]> Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Edward Sun <[email protected]>
1 parent 5fc4734 commit d075c82

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.changelog/6916.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
cloud composer: fixed a crash when updating `ip_allocation_policy` of `google_composer_environment`
3+
```

google/resource_composer_environment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ func expandComposerEnvironmentConfigNodeConfig(v interface{}, d *schema.Resource
17401740

17411741
func expandComposerEnvironmentIPAllocationPolicy(v interface{}, d *schema.ResourceData, config *Config) (*composer.IPAllocationPolicy, error) {
17421742
l := v.([]interface{})
1743-
if len(l) == 0 {
1743+
if len(l) == 0 || l[0] == nil {
17441744
return nil, nil
17451745
}
17461746
raw := l[0]

0 commit comments

Comments
 (0)