Skip to content

Commit 8023c05

Browse files
modular-magicianEdward Sun
andauthored
filter nil (#6916) (#4956)
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 45aa6e6 commit 8023c05

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.changelog/6916.txt

Lines changed: 3 additions & 0 deletions
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-beta/resource_composer_environment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1766,7 +1766,7 @@ func expandComposerEnvironmentConfigNodeConfig(v interface{}, d *schema.Resource
17661766

17671767
func expandComposerEnvironmentIPAllocationPolicy(v interface{}, d *schema.ResourceData, config *Config) (*composer.IPAllocationPolicy, error) {
17681768
l := v.([]interface{})
1769-
if len(l) == 0 {
1769+
if len(l) == 0 || l[0] == nil {
17701770
return nil, nil
17711771
}
17721772
raw := l[0]

0 commit comments

Comments
 (0)