Skip to content

Commit

Permalink
Allow storage_class_name to be ""
Browse files Browse the repository at this point in the history
  • Loading branch information
lawliet89 authored and Jessica Gadling committed Jan 3, 2020
1 parent b68803e commit 1e0e89c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kubernetes/structure_persistent_volume_claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func expandPersistentVolumeClaimSpec(l []interface{}) (*v1.PersistentVolumeClaim
if v, ok := in["volume_name"].(string); ok {
obj.VolumeName = v
}
if v, ok := in["storage_class_name"].(string); ok && v != "" {
if v, ok := in["storage_class_name"].(string); ok {
obj.StorageClassName = ptrToString(v)
}
return obj, nil
Expand Down
6 changes: 3 additions & 3 deletions kubernetes/structure_persistent_volume_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ func flattenPersistentVolumeSpec(in v1.PersistentVolumeSpec) []interface{} {
if in.PersistentVolumeReclaimPolicy != "" {
att["persistent_volume_reclaim_policy"] = in.PersistentVolumeReclaimPolicy
}
if in.StorageClassName != "" {
att["storage_class_name"] = in.StorageClassName
}

att["storage_class_name"] = in.StorageClassName

if in.NodeAffinity != nil {
att["node_affinity"] = flattenVolumeNodeAffinity(in.NodeAffinity)
}
Expand Down

0 comments on commit 1e0e89c

Please sign in to comment.